Permalink
Browse files

did fail with tffs major ids < 100

  • Loading branch information...
PeterPawn committed Aug 16, 2017
1 parent a3dd18d commit 4ebfec268b00e83c0230186a77ebec2c35482ddc
Showing with 9 additions and 9 deletions.
  1. +1 −1 customconfig/bin/custom_config/link_to_export
  2. +1 −1 tffs/tbackup
  3. +1 −1 tffs/tcat
  4. +1 −1 tffs/tdel
  5. +1 −1 tffs/tinstall
  6. +1 −1 tffs/tlist
  7. +1 −1 tffs/tvi
  8. +1 −1 toolbox/add_user_to_fritzos
  9. +1 −1 toolbox/skip_auth_from_homenetwork
@@ -30,7 +30,7 @@ source $YF_CONFIG_EXPORTS
##################################################################################
if [ ${#YF_CONFIG_SAVE_AS} -gt 0 ]; then
if [ -c $YF_CONFIG_SAVE_AS ]; then
tffs_major=$(sed -n -e "s|\([0-9]*\) tffs\$|\1|p" /proc/devices)
tffs_major=$(sed -n -e "s|^ *\([0-9]\{1,3\}\) tffs\$|\1|p" /proc/devices)
if [ ${#tffs_major} -eq 0 ]; then
$YF_CONFIG_LOG "Unable to determine the TFFS major device ID from /proc/devices."
exit 1
View
@@ -59,7 +59,7 @@ td=/tmp/tbkp_$$_$(date +%s)
mkdir -p $td || exit 1
printf "cleanup\n" >/proc/tffs
printf "info\n" >/proc/tffs
major=$(sed -n -e 's/^\(.*\) tffs/\1/p' /proc/devices)
major=$(sed -n -e "s|^ *\([0-9]\{1,3\}\) tffs\$|\1|p" /proc/devices)
if [ ${#major} -eq 0 ]; then
printf "\r\x1B[0KUnable to find the major device ID for TFFS driver.\n" 1>&2
exit 1
View
@@ -25,7 +25,7 @@ if [ -z "$1" ]; then
printf "<id> - TFFS character device minor id\n" 1>&2
exit 1
fi
major=$(sed -n -e 's/^\([0-9]*\) tffs.*/\1/p' /proc/devices)
major=$(sed -n -e "s|^ *\([0-9]\{1,3\}\) tffs\$|\1|p" /proc/devices)
if ! [ "$(expr "$1" : "\(^[0-9]*$\)")" = "$1" ]; then
printf "Non-numeric argument '%s' specified.\n" "$1" 1>&2
exit 1
View
@@ -5,7 +5,7 @@ if [ -z $1 ]; then
printf "<id> - TFFS character device minor id\n" 1>&2
exit 1
fi
major=$(sed -n -e 's/^\([0-9]*\) tffs.*/\1/p' /proc/devices)
major=$(sed -n -e "s|^ *\([0-9]\{1,3\}\) tffs\$|\1|p" /proc/devices)
if ! [ "$(expr "$1" : "\(^[0-9]*$\)")" = "$1" ]; then
printf "Non-numeric argument '%s' specified.\n" "$1" 1>&2
exit 1
View
@@ -5,7 +5,7 @@ if [ -z $1 ] || [ -z $2 ] || [ -t 0 ]; then
printf "<id> - TFFS character device minor id\n" 1>&2
exit 1
fi
major=$(sed -n -e 's/^\([0-9]*\) tffs.*/\1/p' /proc/devices)
major=$(sed -n -e "s|^ *\([0-9]\{1,3\}\) tffs\$|\1|p" /proc/devices)
if ! [ "$(expr "$1" : "\(^[0-9]*$\)")" = "$1" ]; then
printf "Non-numeric argument '%s' specified.\n" "$1" 1>&2
exit 1
View
@@ -264,7 +264,7 @@ td=/var/tmp/tfls_$$_$(date +%s)
mkdir -p $td || exit 1
#printf "cleanup\n" >/proc/tffs
printf "info\n" >/proc/tffs
major=$(sed -n -e 's/^\(.*\) tffs/\1/p' /proc/devices)
major=$(sed -n -e "s|^ *\([0-9]\{1,3\}\) tffs\$|\1|p" /proc/devices)
if [ ${#major} -eq 0 ]; then
printf "\r\x1B[0KUnable to find the major device ID for TFFS driver.\n" 1>&2
exit 1
View
@@ -23,7 +23,7 @@ if [ -z $1 ]; then
printf "will be asked to stop 'ctlmgr' while storing the new data.\n" 1>&2
exit 1
fi
major=$(sed -n -e 's/^\([0-9]*\) tffs.*/\1/p' /proc/devices)
major=$(sed -n -e "s|^ *\([0-9]\{1,3\}\) tffs\$|\1|p" /proc/devices)
[ "$(expr "$1" : "\(^[0-9]*$\)")" = "$1" ] && i=$1 || i=-1
if [ $i -gt 0 ] && [ $i -le 255 ]; then
minor=$i
@@ -138,7 +138,7 @@ if ! [ -e "$proc/devices" ]; then
[ $debug -eq 1 ] && printf "The file '%s/devices' does not exist, please mount procfs first.\n" "$proc" 1>&2
exit 1
fi
major=$(sed -n -e "s|^\([0-9]\{1,3\}\)[ \t]tffs\$|\1|p" "$proc/devices")
major=$(sed -n -e "s|^ *\([0-9]\{1,3\}\) tffs\$|\1|p" "$proc/devices")
if [ ${#major} -eq 0 ]; then
[ $debug -eq 1 ] && printf "No TFFS device was found in '%s/devices'.\n" "$proc" 1>&2
exit 1
@@ -130,7 +130,7 @@ if ! [ -e "$proc/devices" ]; then
[ $debug -eq 1 ] && printf "The file '%s/devices' does not exist, please mount procfs first.\n" "$proc" 1>&2
exit 1
fi
major=$(sed -n -e "s|^\([0-9]\{1,3\}\)[ \t]tffs\$|\1|p" "$proc/devices")
major=$(sed -n -e "s|^ *\([0-9]\{1,3\}\) tffs\$|\1|p" "$proc/devices")
if [ ${#major} -eq 0 ]; then
[ $debug -eq 1 ] && printf "No TFFS device was found in '%s/devices'.\n" "$proc" 1>&2
exit 1

0 comments on commit 4ebfec2

Please sign in to comment.