1.1 --- a/makesd-common Sat May 25 17:47:08 2019 +0200
1.2 +++ b/makesd-common Sat May 25 17:48:27 2019 +0200
1.3 @@ -31,3 +31,18 @@
1.4 IFS=$OLDIFS
1.5 return $STATUS
1.6 }
1.7 +
1.8 +# test_align_cylinder <args>
1.9 +#
1.10 +# Test for the cylinder alignment option.
1.11 +
1.12 +test_align_cylinder()
1.13 +{
1.14 + if [ "$1" = '--align' ] ; then
1.15 + ALIGN_CYLINDER="$1"
1.16 + return 0
1.17 + else
1.18 + ALIGN_CYLINDER=
1.19 + return 1
1.20 + fi
1.21 +}
2.1 --- a/makesd-partition Sat May 25 17:47:08 2019 +0200
2.2 +++ b/makesd-partition Sat May 25 17:48:27 2019 +0200
2.3 @@ -36,6 +36,10 @@
2.4
2.5 check_device
2.6
2.7 +# Test for the cylinder alignment option.
2.8 +
2.9 +if test_align_cylinder $* ; then shift 1 ; fi
2.10 +
2.11 # Initialise sfdisk usage.
2.12
2.13 init_sfdisk "$DEV"
2.14 @@ -43,5 +47,5 @@
2.15 # Convert the partitioning summary into a partition table description.
2.16 # Present the table to sfdisk.
2.17
2.18 - "$PARTTABLE" $* \
2.19 + "$PARTTABLE" $ALIGN_CYLINDER \
2.20 | "$SFDISK" $SFDISK_OPTIONS "$DEV"
3.1 --- a/makesd-partition-table Sat May 25 17:47:08 2019 +0200
3.2 +++ b/makesd-partition-table Sat May 25 17:48:27 2019 +0200
3.3 @@ -205,12 +205,7 @@
3.4
3.5 # Test for the cylinder alignment option.
3.6
3.7 -if [ "$1" = '--align' ] ; then
3.8 - ALIGN_CYLINDER="$1"
3.9 - shift 1
3.10 -else
3.11 - ALIGN_CYLINDER=
3.12 -fi
3.13 +if test_align_cylinder $* ; then shift 1 ; fi
3.14
3.15 # Obtain details of the selected device.
3.16