Fix usb image's size detection

Conversion issue when dropping mkusbimg. Use work_dir/iso
to get the proper image size

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
Aaron Griffin 2008-12-24 10:33:36 -08:00
parent 29d05d6bea
commit fbd2ce5cb0

View File

@ -261,7 +261,7 @@ command_usb () {
fsimg="${imgname}.part1"
# ext2 overhead's upper bound is 6%, empirically tested up to 1GB
rootsize=$(du -bs ${IMGROOT}|cut -f1)
rootsize=$(du -bs "${work_dir}/iso" | cut -f1)
imgsz=$(( (${rootsize}*106)/100/512 + 1)) # image size in sectors
# create the filesystem image file