Check this bash script for me, please.

#/bin/sh
#
# if a floppy can be formatted 1.68 megabytes
#    with 0 bad blocks
# else
#    format 1.44 megabytes
# fi
# mkfs.msdos /dev/fd0
#
if   (superformat /dev/fd0u1680 && badblocks -c 512 -n /dev/fd0u1680);
then
     mkfs.msdos /dev/fd0u1680
else superformat /dev/fd0u1440 
     mkfs.msdos /dev/fd0u1440
fi
mdir
#

 I'm thinking that 'badblocks' can find bad blocks and still return
a 'true' condition.  If this is true, is there any way to cause
the smaller format?

 If 'superformat /dev/fd0u1680' fails, it drops back to '/dev/fd0u1440'.

Regards, Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to