version 1.6.2.5, 2013/08/05 13:09:20
|
version 1.7.6.2, 2014/09/12 00:29:27
|
Line 52 initdev()
|
Line 52 initdev()
|
exit 3 |
exit 3 |
fi |
fi |
|
|
|
disklabel $1 2>&- | awk -vcfgsize=${CFG_NAND_SIZE:-65536} '($1 == "a:") { |
|
cfgsize /= 512; |
|
for (i = 1; i <= NF; i++) { |
|
if (i == 2) |
|
printf("%s ", $i - cfgsize); |
|
else if (i == 3) { |
|
offset = $i; |
|
printf("%s ", cfgsize + offset); |
|
} else |
|
printf("%s ", $i); |
|
} |
|
printf("\n"); |
|
printf("g: %d %d cfg 0 0 0\n", cfgsize, offset); |
|
next; |
|
} |
|
{ printf("%s\n", $0); }' >/tmp/disklabel.tmp |
|
if disklabel -R -m ${TARGET} $1 /tmp/disklabel.tmp; then |
|
rm -f /tmp/disklabel.tmp |
|
echo "OK" |
|
else |
|
echo "Failed!" |
|
exit 3 |
|
fi |
|
|
if newfs -b8192 -f1024 -m0 -Lelwix ${1}a; then |
if newfs -b8192 -f1024 -m0 -Lelwix ${1}a; then |
echo "+++ Formatting ... OK" |
echo "+++ Formatting ... OK" |
else |
else |