+The bootable flag on partition 1 is enabled now.
-Disk <removed>: 100 cylinders, 32 heads, 32 sectors/track
-Units: sectors of 512 bytes, counting from 0
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / 32768 bytes
+Disklabel type: dos
+Disk identifier: <removed>
- Device Boot Start End #sectors Id System
-<removed>1 * 2048 8191 6144 83 Linux
-<removed>2 8192 14335 6144 82 Linux swap / Solaris
-<removed>3 14336 20479 6144 83 Linux
-<removed>4 20480 102399 81920 5 Extended
-<removed>5 20481 26624 6144 83 Linux
-<removed>6 26626 102399 75774 83 Linux
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 8191 6144 3M 83 Linux
+<removed>2 8192 14335 6144 3M 82 Linux swap / Solaris
+<removed>3 14336 20479 6144 3M 83 Linux
+<removed>4 20480 102399 81920 40M 5 Extended
+<removed>5 22528 28671 6144 3M 83 Linux
+<removed>6 30720 102399 71680 35M 83 Linux
-sfdisk: Checking that no-one is using this disk right now ...
-sfdisk: OK
-sfdisk: <removed>: unrecognized partition table type
-sfdisk: No partitions found
-sfdisk: Warning: partition 5 does not end at a cylinder boundary
-sfdisk: Warning: partition [6] does not start at a cylinder boundary
+Checking that no-one is using this disk right now ... OK
-Disk <removed>: 100 cylinders, 32 heads, 32 sectors/track
-Old situation:
-New situation:
-Units: sectors of 512 bytes, counting from 0
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / 32768 bytes
- Device Boot Start End #sectors Id System
-<removed>1 * 2048 8191 6144 83 Linux
-<removed>2 8192 14335 6144 82 Linux swap / Solaris
-<removed>3 14336 20479 6144 83 Linux
-<removed>4 20480 102399 81920 5 Extended
-<removed>5 20481 26624 6144 83 Linux
-<removed>6 26626 102399 75774 83 Linux
-Successfully wrote the new partition table
+>>> Script header accepted.
+>>> Script header accepted.
+>>> Created a new <removed>.
+Created a new <removed>.
+<removed>2: Created a new <removed>.
+<removed>3: Created a new <removed>.
+<removed>4: Created a new <removed>.
+<removed>5: Created a new <removed>.
+<removed>6: Created a new <removed>.
+<removed>7:
+New situation:
-sfdisk: If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
-to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
-(See fdisk(8).)
-Re-reading the partition table ...
+Device Boot Start End Sectors Size Id Type
+<removed>1 * 2048 8191 6144 3M 83 Linux
+<removed>2 8192 14335 6144 3M 82 Linux swap / Solaris
+<removed>3 14336 20479 6144 3M 83 Linux
+<removed>4 20480 102399 81920 40M 5 Extended
+<removed>5 20481 26624 6144 3M 83 Linux
+<removed>6 26626 102399 75774 37M 83 Linux
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
-sfdisk: Checking that no-one is using this disk right now ...
-sfdisk: OK
-sfdisk: <removed>: unrecognized partition table type
-sfdisk: No partitions found
-sfdisk: Warning: partition 5 does not end at a cylinder boundary
-sfdisk: Warning: partition [6] does not start at a cylinder boundary
-sfdisk: Warning: no primary partition is marked bootable (active)
-This does not matter for LILO, but the DOS MBR will not boot this disk.
+Checking that no-one is using this disk right now ... OK
-Disk <removed>: 100 cylinders, 32 heads, 32 sectors/track
-Old situation:
-New situation:
-Units: sectors of 512 bytes, counting from 0
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / 32768 bytes
- Device Boot Start End #sectors Id System
-<removed>1 2048 8191 6144 83 Linux
-<removed>2 8192 14335 6144 82 Linux swap / Solaris
-<removed>3 14336 20479 6144 83 Linux
-<removed>4 20480 102399 81920 5 Extended
-<removed>5 20481 26624 6144 83 Linux
-<removed>6 26626 102399 75774 83 Linux
-Successfully wrote the new partition table
+>>> Created a new <removed>.
+Created a new <removed>.
+<removed>2: Created a new <removed>.
+<removed>3: Created a new <removed>.
+<removed>4: Created a new <removed>.
+<removed>5: Created a new <removed>.
+<removed>6: Created a new <removed>.
+<removed>7:
+New situation:
-sfdisk: If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
-to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
-(See fdisk(8).)
-Re-reading the partition table ...
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 8191 6144 3M 83 Linux
+<removed>2 8192 14335 6144 3M 82 Linux swap / Solaris
+<removed>3 14336 20479 6144 3M 83 Linux
+<removed>4 20480 102399 81920 40M 5 Extended
+<removed>5 22528 28671 6144 3M 83 Linux
+<removed>6 30720 102399 71680 35M 83 Linux
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
-sfdisk: Checking that no-one is using this disk right now ...
-sfdisk: OK
-sfdisk: <removed>: unrecognized partition table type
-sfdisk: No partitions found
-sfdisk: Warning: no primary partition is marked bootable (active)
-This does not matter for LILO, but the DOS MBR will not boot this disk.
+Checking that no-one is using this disk right now ... OK
-Disk <removed>: 100 cylinders, 32 heads, 32 sectors/track
-Old situation:
-New situation:
-Units: sectors of 512 bytes, counting from 0
+Disk <removed>: 50 MiB, 52428800 bytes, 102400 sectors
+Units: sectors of 1 * 512 = 512 bytes
+Sector size (logical/physical): 512 bytes / 4096 bytes
+I/O size (minimum/optimal): 4096 bytes / 32768 bytes
- Device Boot Start End #sectors Id System
-<removed>1 2048 8191 6144 83 Linux
-<removed>2 8192 14335 6144 82 Linux swap / Solaris
-<removed>3 1 2047 2047 83 Linux
-<removed>4 0 - 0 0 Empty
-Successfully wrote the new partition table
+>>> Created a new <removed>.
+Created a new <removed>.
+<removed>2: Created a new <removed>.
+<removed>3: Created a new <removed>.
+<removed>4:
+New situation:
-sfdisk: If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
-to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
-(See fdisk(8).)
-Re-reading the partition table ...
+Device Boot Start End Sectors Size Id Type
+<removed>1 2048 8191 6144 3M 83 Linux
+<removed>2 8192 14335 6144 3M 82 Linux swap / Solaris
+<removed>3 14336 102399 88064 43M 83 Linux
+The partition table has been altered.
+Calling ioctl() to re-read partition table.
+Syncing disks.
-# partition table of <removed>
+label: dos
+label-id: 0x1ddc8a79
+device: <removed>
unit: sectors
-<removed>1 : start= 2048, size= 6144, Id=83, bootable
-<removed>2 : start= 8192, size= 6144, Id=82
-<removed>3 : start= 14336, size= 6144, Id=83
-<removed>4 : start= 20480, size= 81920, Id= 5
-<removed>5 : start= 20481, size= 6144, Id=83
-<removed>6 : start= 26626, size= 75774, Id=83
+<removed>1 : start= 2048, size= 6144, type=83, bootable
+<removed>2 : start= 8192, size= 6144, type=82
+<removed>3 : start= 14336, size= 6144, type=83
+<removed>4 : start= 20480, size= 81920, type=5
+<removed>5 : start= 20481, size= 6144, type=83
+<removed>6 : start= 26626, size= 75774, type=83
ts_init_subtest "simple-commas"
$TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>&1 <<EOF
-2048,6144,L
-8192,6144,S
-14336,6144,
+ 2048,6144,L
+8192, 6144,S
+14336 , 6144 ,
20480,,E
-,6144,
+,6144 ,
,,
EOF
ts_fdisk_clean $TS_DEVICE
ts_init_subtest "simple-space"
$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
$TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>&1 <<EOF
-2048,6144,L
-8192,6144,S
+ 2048 6144 L
+8192 6144 S
,,
EOF
ts_fdisk_clean $TS_DEVICE
ts_init_subtest "read-dump"
$TS_CMD_WIPEFS -a ${TS_DEVICE} &> /dev/null
+udevadm settle
$TS_CMD_SFDISK --unit S ${TS_DEVICE} >> $TS_OUTPUT 2>&1 <<EOF
unit: sectors
+label-id: 0x1ddc8a79
${TS_DEVICE}1 : start= 2048, size= 6144, Id=83, bootable
${TS_DEVICE}2 : start= 8192, size= 6144, Id=82