aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--disk-utils/sfdisk.c2
-rw-r--r--tests/expected/sfdisk/gpt-list-pmbr9
-rwxr-xr-xtests/ts/sfdisk/gpt6
3 files changed, 16 insertions, 1 deletions
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
index 1be40caad4..68df57c0d5 100644
--- a/disk-utils/sfdisk.c
+++ b/disk-utils/sfdisk.c
@@ -76,7 +76,7 @@ enum {
};
struct sfdisk {
- int act; /* action */
+ int act; /* ACT_* */
int partno; /* -N <partno>, default -1 */
const char *label; /* --label <label> */
const char *label_nested; /* --label-nested <label> */
diff --git a/tests/expected/sfdisk/gpt-list-pmbr b/tests/expected/sfdisk/gpt-list-pmbr
new file mode 100644
index 0000000000..c2a56c781e
--- /dev/null
+++ b/tests/expected/sfdisk/gpt-list-pmbr
@@ -0,0 +1,9 @@
+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 Size Id Type
+<removed>1 1 102399 102399 50M ee GPT
diff --git a/tests/ts/sfdisk/gpt b/tests/ts/sfdisk/gpt
index c09dee2a79..90cb1a3661 100755
--- a/tests/ts/sfdisk/gpt
+++ b/tests/ts/sfdisk/gpt
@@ -102,5 +102,11 @@ ts_fdisk_clean $TS_DEVICE
ts_finalize_subtest
+ts_init_subtest "list-pmbr"
+$TS_CMD_SFDISK --list --label-nested dos ${TS_DEVICE} >> $TS_OUTPUT 2>&1
+ts_fdisk_clean $TS_DEVICE
+ts_finalize_subtest
+
+
rmmod scsi_debug
ts_finalize