Merge commit 'f8f4ea6ad3ad12a6d41fd4e6c3ec44c4eeb65f3d'

Improves gdisk_test.sh script
This commit is contained in:
Roderick W. Smith
2015-10-17 18:16:47 -04:00
2 changed files with 18 additions and 1 deletions

View File

@@ -28,6 +28,9 @@ sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o
fixparts: $(MBR_LIB_OBJS) fixparts.o
$(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts
test:
./gdisk_test.sh
lint: #no pre-reqs
lint $(SRCS)

View File

@@ -115,9 +115,23 @@ Y
w
Y
EOF
ret=$?
if [ $ret -ne 0 ]
then
pretty_print "FAILED" "gdisk return $ret when creating partition table"
exit 1
fi
;;
sgdisk)
$SGDISK_BIN $TEMP_DISK -${OPT_CLEAR}
ret=$?
if [ $ret -ne 0 ]
then
pretty_print "FAILED" "sgdisk return $ret when creating partition table"
exit 1
fi
;;
esac
@@ -354,7 +368,7 @@ EOF
###################################
# create a file to simulate a real device
dd if=/dev/zero of=$TEMP_DISK bs=1024 count=$TEMP_DISK_SIZE
dd if=/dev/zero of=$TEMP_DISK bs=1024 count=$TEMP_DISK_SIZE > /dev/null 2>&1
if [ -s $TEMP_DISK ]
then