From 378c18e5f024ac5a8aef4cb40d7c9aa9633d144c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 16:30:35 +0200 Subject: Adding upstream version 2.38.1. Signed-off-by: Daniel Baumann --- tests/expected/fdisk/align-512-4K | 80 ++++++++ tests/expected/fdisk/align-512-4K-63 | 81 ++++++++ tests/expected/fdisk/align-512-4K-md | 80 ++++++++ tests/expected/fdisk/align-512-512 | 68 +++++++ tests/expected/fdisk/align-512-512-topology | 80 ++++++++ tests/expected/fdisk/bsd_0_64.BE | 213 ++++++++++++++++++++ tests/expected/fdisk/bsd_0_64.LE | 213 ++++++++++++++++++++ tests/expected/fdisk/bsd_0_64_alpha.LE | 217 +++++++++++++++++++++ tests/expected/fdisk/bsd_1_0.BE | 213 ++++++++++++++++++++ tests/expected/fdisk/bsd_1_0.LE | 213 ++++++++++++++++++++ tests/expected/fdisk/gpt | 0 tests/expected/fdisk/gpt-change-type-by-number | 20 ++ tests/expected/fdisk/gpt-change-type-by-uuid | 20 ++ tests/expected/fdisk/gpt-corrupt-backup-table | 20 ++ tests/expected/fdisk/gpt-corrupt-primary-table | 20 ++ tests/expected/fdisk/gpt-create-again-partition | 20 ++ tests/expected/fdisk/gpt-create-partitions | 0 tests/expected/fdisk/gpt-delete-partition | 19 ++ tests/expected/fdisk/gpt-empty-pt | 12 ++ tests/expected/fdisk/gpt-resize | 43 ++++ tests/expected/fdisk/gpt-resize.err | 4 + tests/expected/fdisk/id | 1 + tests/expected/fdisk/id-create-mbr-with-id-0x1 | 1 + .../expected/fdisk/id-create-mbr-with-id-0x1.sparc | 0 tests/expected/fdisk/id-create-mbr-with-id-0x2 | 1 + .../expected/fdisk/id-create-mbr-with-id-0x2.sparc | 0 tests/expected/fdisk/id.sparc | 1 + tests/expected/fdisk/mbr-dos-mode | 0 .../fdisk/mbr-dos-mode-create-another-log-par | 20 ++ .../fdisk/mbr-dos-mode-create-extended-par | 16 ++ .../expected/fdisk/mbr-dos-mode-create-logical-par | 20 ++ .../fdisk/mbr-dos-mode-create-primary-partition | 15 ++ .../fdisk/mbr-dos-mode-delete-extended-par | 12 ++ .../expected/fdisk/mbr-dos-mode-delete-logical-par | 17 ++ .../expected/fdisk/mbr-dos-mode-delete-primary-par | 19 ++ tests/expected/fdisk/mbr-dos-mode-empty-pt | 13 ++ .../fdisk/mbr-dos-mode-re-create-primary-par | 15 ++ .../expected/fdisk/mbr-dos-mode-set-partition-type | 15 ++ .../fdisk/mbr-dos-mode-set-primary-par-active | 15 ++ .../fdisk/mbr-nondos-mode-1nd-primary-delete | 19 ++ tests/expected/fdisk/mbr-nondos-mode-1st-active | 15 ++ tests/expected/fdisk/mbr-nondos-mode-1st-primary | 15 ++ .../fdisk/mbr-nondos-mode-1st-primary-delete | 20 ++ .../fdisk/mbr-nondos-mode-1st-primary-recreate | 15 ++ tests/expected/fdisk/mbr-nondos-mode-2nd-primary | 16 ++ tests/expected/fdisk/mbr-nondos-mode-empty-pt | 14 ++ tests/expected/fdisk/mbr-nondos-mode-extended | 17 ++ .../expected/fdisk/mbr-nondos-mode-extended-delete | 12 ++ .../fdisk/mbr-nondos-mode-first-sector-at-end | 47 +++++ tests/expected/fdisk/mbr-nondos-mode-logical | 21 ++ .../expected/fdisk/mbr-nondos-mode-logical-delete | 18 ++ .../fdisk/mbr-nondos-mode-logical-recreate | 21 ++ tests/expected/fdisk/mbr-sort | 0 .../fdisk/mbr-sort-create-logical-partitions | 22 +++ .../fdisk/mbr-sort-create-primary-partitions | 18 ++ tests/expected/fdisk/mbr-sort-empty-pt | 10 + tests/expected/fdisk/mbr-sort-fix-order | 20 ++ tests/expected/fdisk/oddinput | 7 + tests/expected/fdisk/oddinput.err | 4 + tests/expected/fdisk/oddinput.toosmall | 1 + tests/expected/fdisk/sunlabel | 0 .../expected/fdisk/sunlabel-create-first-partition | 16 ++ .../fdisk/sunlabel-create-second-partition | 29 +++ .../expected/fdisk/sunlabel-delete-all-partitions | 1 + tests/expected/fdisk/sunlabel-empty-sun-pt | 14 ++ .../fdisk/sunlabel-set-first-par-mountable | 16 ++ .../expected/fdisk/sunlabel-set-first-par-readonly | 16 ++ tests/expected/fdisk/sunlabel-set-partition-sysid | 16 ++ 68 files changed, 2257 insertions(+) create mode 100644 tests/expected/fdisk/align-512-4K create mode 100644 tests/expected/fdisk/align-512-4K-63 create mode 100644 tests/expected/fdisk/align-512-4K-md create mode 100644 tests/expected/fdisk/align-512-512 create mode 100644 tests/expected/fdisk/align-512-512-topology create mode 100644 tests/expected/fdisk/bsd_0_64.BE create mode 100644 tests/expected/fdisk/bsd_0_64.LE create mode 100644 tests/expected/fdisk/bsd_0_64_alpha.LE create mode 100644 tests/expected/fdisk/bsd_1_0.BE create mode 100644 tests/expected/fdisk/bsd_1_0.LE create mode 100644 tests/expected/fdisk/gpt create mode 100644 tests/expected/fdisk/gpt-change-type-by-number create mode 100644 tests/expected/fdisk/gpt-change-type-by-uuid create mode 100644 tests/expected/fdisk/gpt-corrupt-backup-table create mode 100644 tests/expected/fdisk/gpt-corrupt-primary-table create mode 100644 tests/expected/fdisk/gpt-create-again-partition create mode 100644 tests/expected/fdisk/gpt-create-partitions create mode 100644 tests/expected/fdisk/gpt-delete-partition create mode 100644 tests/expected/fdisk/gpt-empty-pt create mode 100644 tests/expected/fdisk/gpt-resize create mode 100644 tests/expected/fdisk/gpt-resize.err create mode 100644 tests/expected/fdisk/id create mode 100644 tests/expected/fdisk/id-create-mbr-with-id-0x1 create mode 100644 tests/expected/fdisk/id-create-mbr-with-id-0x1.sparc create mode 100644 tests/expected/fdisk/id-create-mbr-with-id-0x2 create mode 100644 tests/expected/fdisk/id-create-mbr-with-id-0x2.sparc create mode 100644 tests/expected/fdisk/id.sparc create mode 100644 tests/expected/fdisk/mbr-dos-mode create mode 100644 tests/expected/fdisk/mbr-dos-mode-create-another-log-par create mode 100644 tests/expected/fdisk/mbr-dos-mode-create-extended-par create mode 100644 tests/expected/fdisk/mbr-dos-mode-create-logical-par create mode 100644 tests/expected/fdisk/mbr-dos-mode-create-primary-partition create mode 100644 tests/expected/fdisk/mbr-dos-mode-delete-extended-par create mode 100644 tests/expected/fdisk/mbr-dos-mode-delete-logical-par create mode 100644 tests/expected/fdisk/mbr-dos-mode-delete-primary-par create mode 100644 tests/expected/fdisk/mbr-dos-mode-empty-pt create mode 100644 tests/expected/fdisk/mbr-dos-mode-re-create-primary-par create mode 100644 tests/expected/fdisk/mbr-dos-mode-set-partition-type create mode 100644 tests/expected/fdisk/mbr-dos-mode-set-primary-par-active create mode 100644 tests/expected/fdisk/mbr-nondos-mode-1nd-primary-delete create mode 100644 tests/expected/fdisk/mbr-nondos-mode-1st-active create mode 100644 tests/expected/fdisk/mbr-nondos-mode-1st-primary create mode 100644 tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete create mode 100644 tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate create mode 100644 tests/expected/fdisk/mbr-nondos-mode-2nd-primary create mode 100644 tests/expected/fdisk/mbr-nondos-mode-empty-pt create mode 100644 tests/expected/fdisk/mbr-nondos-mode-extended create mode 100644 tests/expected/fdisk/mbr-nondos-mode-extended-delete create mode 100644 tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end create mode 100644 tests/expected/fdisk/mbr-nondos-mode-logical create mode 100644 tests/expected/fdisk/mbr-nondos-mode-logical-delete create mode 100644 tests/expected/fdisk/mbr-nondos-mode-logical-recreate create mode 100644 tests/expected/fdisk/mbr-sort create mode 100644 tests/expected/fdisk/mbr-sort-create-logical-partitions create mode 100644 tests/expected/fdisk/mbr-sort-create-primary-partitions create mode 100644 tests/expected/fdisk/mbr-sort-empty-pt create mode 100644 tests/expected/fdisk/mbr-sort-fix-order create mode 100644 tests/expected/fdisk/oddinput create mode 100644 tests/expected/fdisk/oddinput.err create mode 100644 tests/expected/fdisk/oddinput.toosmall create mode 100644 tests/expected/fdisk/sunlabel create mode 100644 tests/expected/fdisk/sunlabel-create-first-partition create mode 100644 tests/expected/fdisk/sunlabel-create-second-partition create mode 100644 tests/expected/fdisk/sunlabel-delete-all-partitions create mode 100644 tests/expected/fdisk/sunlabel-empty-sun-pt create mode 100644 tests/expected/fdisk/sunlabel-set-first-par-mountable create mode 100644 tests/expected/fdisk/sunlabel-set-first-par-readonly create mode 100644 tests/expected/fdisk/sunlabel-set-partition-sysid (limited to 'tests/expected/fdisk') diff --git a/tests/expected/fdisk/align-512-4K b/tests/expected/fdisk/align-512-4K new file mode 100644 index 0000000..ec06613 --- /dev/null +++ b/tests/expected/fdisk/align-512-4K @@ -0,0 +1,80 @@ +Create partitions + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + +Device does not contain a recognized partition table. + +Command (m for help): Created a new disklabel. + +Command (m for help): Partition type + p primary (0 primary, 0 extended, 4 free) + e extended (container for logical partitions) +Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-102399, default 102399): +Created a new partition . + +Command (m for help): Partition type + p primary (1 primary, 0 extended, 3 free) + e extended (container for logical partitions) +Select (default p): Partition number (2-4, default 2): First sector (22528-102399, default 22528): Last sector, +/-sectors or +/-size{K,M,G,T,P} (22528-102399, default 102399): +Created a new partition . + +Command (m for help): Partition type + p primary (2 primary, 0 extended, 2 free) + e extended (container for logical partitions) +Select (default p): Partition number (3,4, default 3): First sector (43008-102399, default 43008): Last sector, +/-sectors or +/-size{K,M,G,T,P} (43008-102399, default 102399): +Created a new partition . + +Command (m for help): Partition type + p primary (3 primary, 0 extended, 1 free) + e extended (container for logical partitions) +Select (default e): +Selected partition 4 +First sector (63488-102399, default 63488): Last sector, +/-sectors or +/-size{K,M,G,T,P} (63488-102399, default 102399): +Created a new partition . + +Command (m for help): All primary partitions are in use. +Adding logical partition 5 +First sector (65536-102399, default 65536): Last sector, +/-sectors or +/-size{K,M,G,T,P} (65536-102399, default 102399): +Created a new partition . + +Command (m for help): All primary partitions are in use. +Adding logical partition 6 +First sector (77824-102399, default 77824): Last sector, +/-sectors or +/-size{K,M,G,T,P} (77824-102399, default 102399): +Created a new partition . + +Command (m for help): All primary partitions are in use. +Adding logical partition 7 +First sector (90112-102399, default 90112): Last sector, +/-sectors or +/-size{K,M,G,T,P} (90112-102399, default 102399): +Created a new partition . + +Command (m for help): Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 22527 20480 10M 83 Linux +2 22528 43007 20480 10M 83 Linux +3 43008 63487 20480 10M 83 Linux +4 63488 102399 38912 19M 5 Extended +5 65536 75775 10240 5M 83 Linux +6 77824 88063 10240 5M 83 Linux +7 90112 102399 12288 6M 83 Linux + +Command (m for help): The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. + +Alignment offsets: +0 +0 +0 +0 +0 +0 +0 diff --git a/tests/expected/fdisk/align-512-4K-63 b/tests/expected/fdisk/align-512-4K-63 new file mode 100644 index 0000000..f7a0c9f --- /dev/null +++ b/tests/expected/fdisk/align-512-4K-63 @@ -0,0 +1,81 @@ +Create partitions + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + +Device does not contain a recognized partition table. + +Command (m for help): Created a new disklabel. + +Command (m for help): Partition type + p primary (0 primary, 0 extended, 4 free) + e extended (container for logical partitions) +Select (default p): Partition number (1-4, default 1): First sector (7-102399, default 7): Last sector, +/-sectors or +/-size{K,M,G,T,P} (7-102399, default 102399): +Created a new partition . + +Command (m for help): Partition type + p primary (1 primary, 0 extended, 3 free) + e extended (container for logical partitions) +Select (default p): Partition number (2-4, default 2): First sector (20487-102399, default 20487): Last sector, +/-sectors or +/-size{K,M,G,T,P} (20487-102399, default 102399): +Created a new partition . + +Command (m for help): Partition type + p primary (2 primary, 0 extended, 2 free) + e extended (container for logical partitions) +Select (default p): Partition number (3,4, default 3): First sector (40967-102399, default 40967): Last sector, +/-sectors or +/-size{K,M,G,T,P} (40967-102399, default 102399): +Created a new partition . + +Command (m for help): Partition type + p primary (3 primary, 0 extended, 1 free) + e extended (container for logical partitions) +Select (default e): +Selected partition 4 +First sector (61447-102399, default 61447): Last sector, +/-sectors or +/-size{K,M,G,T,P} (61447-102399, default 102399): +Created a new partition . + +Command (m for help): All primary partitions are in use. +Adding logical partition 5 +First sector (61454-102399, default 63487): Last sector, +/-sectors or +/-size{K,M,G,T,P} (63487-102399, default 102399): +Created a new partition . + +Command (m for help): All primary partitions are in use. +Adding logical partition 6 +First sector (61454-102399, default 75775): Last sector, +/-sectors or +/-size{K,M,G,T,P} (75775-102399, default 102399): +Created a new partition . + +Command (m for help): All primary partitions are in use. +Adding logical partition 7 +First sector (61454-102399, default 88063): Last sector, +/-sectors or +/-size{K,M,G,T,P} (88063-102399, default 102399): +Created a new partition . + +Command (m for help): Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Alignment offset: 3584 bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 7 20486 20480 10M 83 Linux +2 20487 40966 20480 10M 83 Linux +3 40967 61446 20480 10M 83 Linux +4 61447 102399 40953 20M 5 Extended +5 63487 73726 10240 5M 83 Linux +6 75775 86014 10240 5M 83 Linux +7 88063 102399 14337 7M 83 Linux + +Command (m for help): The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. + +Alignment offsets: +0 +0 +0 +0 +0 +0 +0 diff --git a/tests/expected/fdisk/align-512-4K-md b/tests/expected/fdisk/align-512-4K-md new file mode 100644 index 0000000..d8ca0d7 --- /dev/null +++ b/tests/expected/fdisk/align-512-4K-md @@ -0,0 +1,80 @@ +Create partitions + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + +Device does not contain a recognized partition table. + +Command (m for help): Created a new disklabel. + +Command (m for help): Partition type + p primary (0 primary, 0 extended, 4 free) + e extended (container for logical partitions) +Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-102399, default 102399): +Created a new partition . + +Command (m for help): Partition type + p primary (1 primary, 0 extended, 3 free) + e extended (container for logical partitions) +Select (default p): Partition number (2-4, default 2): First sector (51199-102399, default 51200): Last sector, +/-sectors or +/-size{K,M,G,T,P} (51200-102399, default 102399): +Created a new partition . + +Command (m for help): Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 4096 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 51198 49151 24M 83 Linux +2 51200 100350 49151 24M 83 Linux + +Command (m for help): The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. + +Alignment offsets: +0 +0 +Create partitions (MD) + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + +Device does not contain a recognized partition table. +Created a new disklabel. + +Command (m for help): Partition type + p primary (0 primary, 0 extended, 4 free) + e extended (container for logical partitions) +Select (default p): Partition number (1-4, default 1): First sector (2048-97791, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-97791, default 97791): +Created a new partition . + +Command (m for help): Partition type + p primary (1 primary, 0 extended, 3 free) + e extended (container for logical partitions) +Select (default p): Partition number (2-4, default 2): First sector (22528-97791, default 22528): Last sector, +/-sectors or +/-size{K,M,G,T,P} (22528-97791, default 97791): +Created a new partition . + +Command (m for help): Disk : 47.75 MiB, 50069504 bytes, 97792 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 4096 bytes +I/O size (minimum/optimal): 65536 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +p1 2048 22527 20480 10M 83 Linux +p2 22528 43007 20480 10M 83 Linux + +Command (m for help): The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. + +Alignment offsets (MD): +0 +0 diff --git a/tests/expected/fdisk/align-512-512 b/tests/expected/fdisk/align-512-512 new file mode 100644 index 0000000..782beca --- /dev/null +++ b/tests/expected/fdisk/align-512-512 @@ -0,0 +1,68 @@ +Create partitions + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + +Device does not contain a recognized partition table. + +Command (m for help): Created a new disklabel. + +Command (m for help): Partition type + p primary (0 primary, 0 extended, 4 free) + e extended (container for logical partitions) +Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-102399, default 102399): +Created a new partition . + +Command (m for help): Partition type + p primary (1 primary, 0 extended, 3 free) + e extended (container for logical partitions) +Select (default p): Partition number (2-4, default 2): First sector (22528-102399, default 22528): Last sector, +/-sectors or +/-size{K,M,G,T,P} (22528-102399, default 102399): +Created a new partition . + +Command (m for help): Partition type + p primary (2 primary, 0 extended, 2 free) + e extended (container for logical partitions) +Select (default p): Partition number (3,4, default 3): First sector (43008-102399, default 43008): Last sector, +/-sectors or +/-size{K,M,G,T,P} (43008-102399, default 102399): +Created a new partition . + +Command (m for help): Partition type + p primary (3 primary, 0 extended, 1 free) + e extended (container for logical partitions) +Select (default e): +Selected partition 4 +First sector (63488-102399, default 63488): Last sector, +/-sectors or +/-size{K,M,G,T,P} (63488-102399, default 102399): +Created a new partition . + +Command (m for help): All primary partitions are in use. +Adding logical partition 5 +First sector (65536-102399, default 65536): Last sector, +/-sectors or +/-size{K,M,G,T,P} (65536-102399, default 102399): +Created a new partition . + +Command (m for help): All primary partitions are in use. +Adding logical partition 6 +First sector (77824-102399, default 77824): Last sector, +/-sectors or +/-size{K,M,G,T,P} (77824-102399, default 102399): +Created a new partition . + +Command (m for help): All primary partitions are in use. +Adding logical partition 7 +First sector (90112-102399, default 90112): Last sector, +/-sectors or +/-size{K,M,G,T,P} (90112-102399, default 102399): +Created a new partition . + +Command (m for help): Disk : 50 MiB, 52428800 bytes, 102400 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +p1 2048 22527 20480 10M 83 Linux +p2 22528 43007 20480 10M 83 Linux +p3 43008 63487 20480 10M 83 Linux +p4 63488 102399 38912 19M 5 Extended +p5 65536 75775 10240 5M 83 Linux +p6 77824 88063 10240 5M 83 Linux +p7 90112 102399 12288 6M 83 Linux + +Command (m for help): diff --git a/tests/expected/fdisk/align-512-512-topology b/tests/expected/fdisk/align-512-512-topology new file mode 100644 index 0000000..2ca9893 --- /dev/null +++ b/tests/expected/fdisk/align-512-512-topology @@ -0,0 +1,80 @@ +Create partitions + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + +Device does not contain a recognized partition table. + +Command (m for help): Created a new disklabel. + +Command (m for help): Partition type + p primary (0 primary, 0 extended, 4 free) + e extended (container for logical partitions) +Select (default p): Partition number (1-4, default 1): First sector (2048-102399, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-102399, default 102399): +Created a new partition . + +Command (m for help): Partition type + p primary (1 primary, 0 extended, 3 free) + e extended (container for logical partitions) +Select (default p): Partition number (2-4, default 2): First sector (22528-102399, default 22528): Last sector, +/-sectors or +/-size{K,M,G,T,P} (22528-102399, default 102399): +Created a new partition . + +Command (m for help): Partition type + p primary (2 primary, 0 extended, 2 free) + e extended (container for logical partitions) +Select (default p): Partition number (3,4, default 3): First sector (43008-102399, default 43008): Last sector, +/-sectors or +/-size{K,M,G,T,P} (43008-102399, default 102399): +Created a new partition . + +Command (m for help): Partition type + p primary (3 primary, 0 extended, 1 free) + e extended (container for logical partitions) +Select (default e): +Selected partition 4 +First sector (63488-102399, default 63488): Last sector, +/-sectors or +/-size{K,M,G,T,P} (63488-102399, default 102399): +Created a new partition . + +Command (m for help): All primary partitions are in use. +Adding logical partition 5 +First sector (65536-102399, default 65536): Last sector, +/-sectors or +/-size{K,M,G,T,P} (65536-102399, default 102399): +Created a new partition . + +Command (m for help): All primary partitions are in use. +Adding logical partition 6 +First sector (77824-102399, default 77824): Last sector, +/-sectors or +/-size{K,M,G,T,P} (77824-102399, default 102399): +Created a new partition . + +Command (m for help): All primary partitions are in use. +Adding logical partition 7 +First sector (90112-102399, default 90112): Last sector, +/-sectors or +/-size{K,M,G,T,P} (90112-102399, default 102399): +Created a new partition . + +Command (m for help): Disk : 50 MiB, 52428800 bytes, 102400 sectors +Disk model: scsi_debug +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 22527 20480 10M 83 Linux +2 22528 43007 20480 10M 83 Linux +3 43008 63487 20480 10M 83 Linux +4 63488 102399 38912 19M 5 Extended +5 65536 75775 10240 5M 83 Linux +6 77824 88063 10240 5M 83 Linux +7 90112 102399 12288 6M 83 Linux + +Command (m for help): The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. + +Alignment offsets: +0 +0 +0 +0 +0 +0 +0 diff --git a/tests/expected/fdisk/bsd_0_64.BE b/tests/expected/fdisk/bsd_0_64.BE new file mode 100644 index 0000000..4f41d03 --- /dev/null +++ b/tests/expected/fdisk/bsd_0_64.BE @@ -0,0 +1,213 @@ +BSD_LABELSECTOR=0 +BSD_LABELOFFSET=64 +BSD_EXTRA= +BYTE_ORDER=BE + +Initialize empty image +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 +Create new DOS partition table +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................| +000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: +------------------- + +Create 1st primary partition +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 00 |!..A............| +000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 4095 2048 83 Linux 0/32/33 0/65/1 +------------------- + +Create 2nd primary partition +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 83 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 +Set 2nd partition type +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 4095 2048 83 Linux 0/32/33 0/65/1 +2 4096 20479 16384 a5 FreeBSD 0/65/2 1/70/5 +------------------- + +Create default BSD +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200040 82 56 45 57 00 06 00 00 00 00 00 00 00 00 00 00 |.VEW............| +00200050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200060 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 3f |...............?| +00200070 00 00 00 ff 00 00 00 01 00 00 3e c1 00 00 3e c1 |..........>...>.| +00200080 00 00 00 00 00 00 00 00 0e 10 00 01 00 00 00 00 |................| +00200090 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| +002000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +002000c0 00 00 00 00 82 56 45 57 62 33 00 04 00 00 20 00 |.....VEWb3.... .| +002000d0 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 |.. .............| +002000e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +002000f0 00 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 |......@.........| +00200100 00 00 00 00 00 00 3e c1 00 00 00 00 00 00 00 00 |......>.........| +00200110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): Disk 2: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1 cylinders +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: bsd + +Slice Start End Sectors Size Type Fsize Bsize Cpg +c 4096 20479 16384 8M unused 0 0 0 +d 0 16064 16065 7.8M unused 0 0 0 + +Partition table entries are not in disk order. + +Command (m for help): Leaving nested disklabel. + +Command (m for help): +------------------- + +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200040 82 56 45 57 00 06 00 00 00 00 00 00 00 00 00 00 |.VEW............| +00200050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200060 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 3f |...............?| +00200070 00 00 00 ff 00 00 00 01 00 00 3e c1 00 00 3e c1 |..........>...>.| +00200080 00 00 00 00 00 00 00 00 0e 10 00 01 00 00 00 00 |................| +00200090 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| +002000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +002000c0 00 00 00 00 82 56 45 57 7d 32 00 04 00 00 20 00 |.....VEW}2.... .| +002000d0 00 00 20 00 00 00 08 01 00 00 10 00 00 00 00 00 |.. .............| +002000e0 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +002000f0 00 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 |......@.........| +00200100 00 00 00 00 00 00 3e c1 00 00 00 00 00 00 00 00 |......>.........| +00200110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): Disk 2: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1 cylinders +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: bsd + +Slice Start End Sectors Size Type Fsize Bsize Cpg +a 4096 6144 2049 1M 4.2BSD 0 0 0 +c 4096 20479 16384 8M unused 0 0 0 +d 0 16064 16065 7.8M unused 0 0 0 + +Partition table entries are not in disk order. + +Command (m for help): Leaving nested disklabel. + +Command (m for help): +------------------- + + + +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): +00 unused 05 4.1BSD 09 4.4LFS 0d boot +01 swap 06 Eighth Edition 0a unknown 0e ADOS +02 Version 6 07 4.2BSD 0b HPFS 0f HFS +03 Version 7 08 MS-DOS 0c ISO-9660 10 AdvFS +04 System V + +Command (m for help): diff --git a/tests/expected/fdisk/bsd_0_64.LE b/tests/expected/fdisk/bsd_0_64.LE new file mode 100644 index 0000000..9663f16 --- /dev/null +++ b/tests/expected/fdisk/bsd_0_64.LE @@ -0,0 +1,213 @@ +BSD_LABELSECTOR=0 +BSD_LABELOFFSET=64 +BSD_EXTRA= +BYTE_ORDER=LE + +Initialize empty image +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 +Create new DOS partition table +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................| +000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: +------------------- + +Create 1st primary partition +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 00 |!..A............| +000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 4095 2048 83 Linux 0/32/33 0/65/1 +------------------- + +Create 2nd primary partition +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 83 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 +Set 2nd partition type +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 4095 2048 83 Linux 0/32/33 0/65/1 +2 4096 20479 16384 a5 FreeBSD 0/65/2 1/70/5 +------------------- + +Create default BSD +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200040 57 45 56 82 06 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00200050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200060 00 00 00 00 00 00 00 00 00 02 00 00 3f 00 00 00 |............?...| +00200070 ff 00 00 00 01 00 00 00 c1 3e 00 00 c1 3e 00 00 |.........>...>..| +00200080 00 00 00 00 00 00 00 00 10 0e 01 00 00 00 00 00 |................| +00200090 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 |........ .......| +002000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +002000c0 00 00 00 00 57 45 56 82 33 62 04 00 00 20 00 00 |....WEV.3b... ..| +002000d0 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |. ..............| +002000e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +002000f0 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 00 |.....@..........| +00200100 00 00 00 00 c1 3e 00 00 00 00 00 00 00 00 00 00 |.....>..........| +00200110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): Disk 2: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1 cylinders +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: bsd + +Slice Start End Sectors Size Type Fsize Bsize Cpg +c 4096 20479 16384 8M unused 0 0 0 +d 0 16064 16065 7.8M unused 0 0 0 + +Partition table entries are not in disk order. + +Command (m for help): Leaving nested disklabel. + +Command (m for help): +------------------- + +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200040 57 45 56 82 06 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00200050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200060 00 00 00 00 00 00 00 00 00 02 00 00 3f 00 00 00 |............?...| +00200070 ff 00 00 00 01 00 00 00 c1 3e 00 00 c1 3e 00 00 |.........>...>..| +00200080 00 00 00 00 00 00 00 00 10 0e 01 00 00 00 00 00 |................| +00200090 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 |........ .......| +002000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +002000c0 00 00 00 00 57 45 56 82 35 7a 04 00 00 20 00 00 |....WEV.5z... ..| +002000d0 00 20 00 00 01 08 00 00 00 10 00 00 00 00 00 00 |. ..............| +002000e0 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +002000f0 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 00 |.....@..........| +00200100 00 00 00 00 c1 3e 00 00 00 00 00 00 00 00 00 00 |.....>..........| +00200110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): Disk 2: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1 cylinders +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: bsd + +Slice Start End Sectors Size Type Fsize Bsize Cpg +a 4096 6144 2049 1M 4.2BSD 0 0 0 +c 4096 20479 16384 8M unused 0 0 0 +d 0 16064 16065 7.8M unused 0 0 0 + +Partition table entries are not in disk order. + +Command (m for help): Leaving nested disklabel. + +Command (m for help): +------------------- + + + +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): +00 unused 05 4.1BSD 09 4.4LFS 0d boot +01 swap 06 Eighth Edition 0a unknown 0e ADOS +02 Version 6 07 4.2BSD 0b HPFS 0f HFS +03 Version 7 08 MS-DOS 0c ISO-9660 10 AdvFS +04 System V + +Command (m for help): diff --git a/tests/expected/fdisk/bsd_0_64_alpha.LE b/tests/expected/fdisk/bsd_0_64_alpha.LE new file mode 100644 index 0000000..ab39149 --- /dev/null +++ b/tests/expected/fdisk/bsd_0_64_alpha.LE @@ -0,0 +1,217 @@ +BSD_LABELSECTOR=0 +BSD_LABELOFFSET=64 +BSD_EXTRA=_alpha +BYTE_ORDER=LE + +Initialize empty image +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 +Create new DOS partition table +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................| +000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: +------------------- + +Create 1st primary partition +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 00 |!..A............| +000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux +------------------- + +Create 2nd primary partition +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 04 |!..A............| +000001d0 01 3e 83 13 41 36 00 10 00 00 00 40 00 00 00 00 |.>..A6.....@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 +Set 2nd partition type +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 04 |!..A............| +000001d0 01 3e a5 13 41 36 00 10 00 00 00 40 00 00 00 00 |.>..A6.....@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Size Id Type +1 2048 4095 2048 1M 83 Linux +2 4096 20479 16384 8M a5 FreeBSD +------------------- + +Create default BSD +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 04 |!..A............| +000001d0 01 3e a5 13 41 36 00 10 00 00 00 40 00 00 00 00 |.>..A6.....@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200040 57 45 56 82 06 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00200050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200060 00 00 00 00 00 00 00 00 00 02 00 00 3f 00 00 00 |............?...| +00200070 ff 00 00 00 01 00 00 00 c1 3e 00 00 c1 3e 00 00 |.........>...>..| +00200080 00 00 00 00 00 00 00 00 10 0e 01 00 00 00 00 00 |................| +00200090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +002000c0 00 00 00 00 57 45 56 82 13 62 04 00 00 20 00 00 |....WEV..b... ..| +002000d0 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |. ..............| +002000e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +002000f0 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 00 |.....@..........| +00200100 00 00 00 00 c1 3e 00 00 00 00 00 00 00 00 00 00 |.....>..........| +00200110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +002001f0 00 00 00 00 00 00 00 00 3a 27 5c 82 1f 23 57 82 |........:'\..#W.| +00200200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): Disk 2: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1 cylinders +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: bsd + +Slice Start End Sectors Size Type Fsize Bsize Cpg +c 4096 20479 16384 8M unused 0 0 0 +d 0 16064 16065 7.8M unused 0 0 0 + +Partition table entries are not in disk order. + +Command (m for help): Leaving nested disklabel. + +Command (m for help): +------------------- + +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 04 |!..A............| +000001d0 01 3e a5 13 41 36 00 10 00 00 00 40 00 00 00 00 |.>..A6.....@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200040 57 45 56 82 06 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00200050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200060 00 00 00 00 00 00 00 00 00 02 00 00 3f 00 00 00 |............?...| +00200070 ff 00 00 00 01 00 00 00 c1 3e 00 00 c1 3e 00 00 |.........>...>..| +00200080 00 00 00 00 00 00 00 00 10 0e 01 00 00 00 00 00 |................| +00200090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +002000c0 00 00 00 00 57 45 56 82 15 7a 04 00 00 20 00 00 |....WEV..z... ..| +002000d0 00 20 00 00 01 08 00 00 00 10 00 00 00 00 00 00 |. ..............| +002000e0 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +002000f0 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 00 |.....@..........| +00200100 00 00 00 00 c1 3e 00 00 00 00 00 00 00 00 00 00 |.....>..........| +00200110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +002001f0 00 00 00 00 00 00 00 00 43 4f 5c 82 20 2b 57 82 |........CO\. +W.| +00200200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): Disk 2: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1 cylinders +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: bsd + +Slice Start End Sectors Size Type Fsize Bsize Cpg +a 4096 6144 2049 1M 4.2BSD 0 0 0 +c 4096 20479 16384 8M unused 0 0 0 +d 0 16064 16065 7.8M unused 0 0 0 + +Partition table entries are not in disk order. + +Command (m for help): Leaving nested disklabel. + +Command (m for help): +------------------- + + + +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): +00 unused 05 4.1BSD 09 4.4LFS 0d boot +01 swap 06 Eighth Edition 0a unknown 0e ADOS +02 Version 6 07 4.2BSD 0b HPFS 0f HFS +03 Version 7 08 ext2 0c ISO-9660 10 AdvFS +04 System V + +Command (m for help): diff --git a/tests/expected/fdisk/bsd_1_0.BE b/tests/expected/fdisk/bsd_1_0.BE new file mode 100644 index 0000000..4c201b0 --- /dev/null +++ b/tests/expected/fdisk/bsd_1_0.BE @@ -0,0 +1,213 @@ +BSD_LABELSECTOR=1 +BSD_LABELOFFSET=0 +BSD_EXTRA= +BYTE_ORDER=BE + +Initialize empty image +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 +Create new DOS partition table +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................| +000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: +------------------- + +Create 1st primary partition +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 00 |!..A............| +000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 4095 2048 83 Linux 0/32/33 0/65/1 +------------------- + +Create 2nd primary partition +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 83 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 +Set 2nd partition type +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 4095 2048 83 Linux 0/32/33 0/65/1 +2 4096 20479 16384 a5 FreeBSD 0/65/2 1/70/5 +------------------- + +Create default BSD +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200200 82 56 45 57 00 06 00 00 00 00 00 00 00 00 00 00 |.VEW............| +00200210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200220 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 3f |...............?| +00200230 00 00 00 ff 00 00 00 01 00 00 3e c1 00 00 3e c1 |..........>...>.| +00200240 00 00 00 00 00 00 00 00 0e 10 00 01 00 00 00 00 |................| +00200250 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| +00200260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200280 00 00 00 00 82 56 45 57 62 33 00 04 00 00 20 00 |.....VEWb3.... .| +00200290 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 |.. .............| +002002a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +002002b0 00 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 |......@.........| +002002c0 00 00 00 00 00 00 3e c1 00 00 00 00 00 00 00 00 |......>.........| +002002d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): Disk 2: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1 cylinders +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: bsd + +Slice Start End Sectors Size Type Fsize Bsize Cpg +c 4096 20479 16384 8M unused 0 0 0 +d 0 16064 16065 7.8M unused 0 0 0 + +Partition table entries are not in disk order. + +Command (m for help): Leaving nested disklabel. + +Command (m for help): +------------------- + +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200200 82 56 45 57 00 06 00 00 00 00 00 00 00 00 00 00 |.VEW............| +00200210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200220 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 3f |...............?| +00200230 00 00 00 ff 00 00 00 01 00 00 3e c1 00 00 3e c1 |..........>...>.| +00200240 00 00 00 00 00 00 00 00 0e 10 00 01 00 00 00 00 |................| +00200250 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 |........... ....| +00200260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200280 00 00 00 00 82 56 45 57 7d 32 00 04 00 00 20 00 |.....VEW}2.... .| +00200290 00 00 20 00 00 00 08 01 00 00 10 00 00 00 00 00 |.. .............| +002002a0 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +002002b0 00 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 |......@.........| +002002c0 00 00 00 00 00 00 3e c1 00 00 00 00 00 00 00 00 |......>.........| +002002d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): Disk 2: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1 cylinders +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: bsd + +Slice Start End Sectors Size Type Fsize Bsize Cpg +a 4096 6144 2049 1M 4.2BSD 0 0 0 +c 4096 20479 16384 8M unused 0 0 0 +d 0 16064 16065 7.8M unused 0 0 0 + +Partition table entries are not in disk order. + +Command (m for help): Leaving nested disklabel. + +Command (m for help): +------------------- + + + +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): +00 unused 05 4.1BSD 09 4.4LFS 0d boot +01 swap 06 Eighth Edition 0a unknown 0e ADOS +02 Version 6 07 4.2BSD 0b HPFS 0f HFS +03 Version 7 08 MS-DOS 0c ISO-9660 10 AdvFS +04 System V + +Command (m for help): diff --git a/tests/expected/fdisk/bsd_1_0.LE b/tests/expected/fdisk/bsd_1_0.LE new file mode 100644 index 0000000..3f14e8e --- /dev/null +++ b/tests/expected/fdisk/bsd_1_0.LE @@ -0,0 +1,213 @@ +BSD_LABELSECTOR=1 +BSD_LABELOFFSET=0 +BSD_EXTRA= +BYTE_ORDER=LE + +Initialize empty image +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 +Create new DOS partition table +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................| +000001c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: +------------------- + +Create 1st primary partition +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 00 |!..A............| +000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 4095 2048 83 Linux 0/32/33 0/65/1 +------------------- + +Create 2nd primary partition +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 83 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 +Set 2nd partition type +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 4095 2048 83 Linux 0/32/33 0/65/1 +2 4096 20479 16384 a5 FreeBSD 0/65/2 1/70/5 +------------------- + +Create default BSD +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200200 57 45 56 82 06 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00200210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200220 00 00 00 00 00 00 00 00 00 02 00 00 3f 00 00 00 |............?...| +00200230 ff 00 00 00 01 00 00 00 c1 3e 00 00 c1 3e 00 00 |.........>...>..| +00200240 00 00 00 00 00 00 00 00 10 0e 01 00 00 00 00 00 |................| +00200250 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 |........ .......| +00200260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200280 00 00 00 00 57 45 56 82 33 62 04 00 00 20 00 00 |....WEV.3b... ..| +00200290 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |. ..............| +002002a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +002002b0 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 00 |.....@..........| +002002c0 00 00 00 00 c1 3e 00 00 00 00 00 00 00 00 00 00 |.....>..........| +002002d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): Disk 2: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1 cylinders +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: bsd + +Slice Start End Sectors Size Type Fsize Bsize Cpg +c 4096 20479 16384 8M unused 0 0 0 +d 0 16064 16065 7.8M unused 0 0 0 + +Partition table entries are not in disk order. + +Command (m for help): Leaving nested disklabel. + +Command (m for help): +------------------- + +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +000001b0 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 20 |............... | +000001c0 21 00 83 41 01 00 00 08 00 00 00 08 00 00 00 41 |!..A...........A| +000001d0 02 00 a5 46 05 01 00 10 00 00 00 40 00 00 00 00 |...F.......@....| +000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00000200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200200 57 45 56 82 06 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00200210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200220 00 00 00 00 00 00 00 00 00 02 00 00 3f 00 00 00 |............?...| +00200230 ff 00 00 00 01 00 00 00 c1 3e 00 00 c1 3e 00 00 |.........>...>..| +00200240 00 00 00 00 00 00 00 00 10 0e 01 00 00 00 00 00 |................| +00200250 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 |........ .......| +00200260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200280 00 00 00 00 57 45 56 82 35 7a 04 00 00 20 00 00 |....WEV.5z... ..| +00200290 00 20 00 00 01 08 00 00 00 10 00 00 00 00 00 00 |. ..............| +002002a0 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +002002b0 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 00 |.....@..........| +002002c0 00 00 00 00 c1 3e 00 00 00 00 00 00 00 00 00 00 |.....>..........| +002002d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00a00000 + +---layout---------- + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): Disk 2: 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1 cylinders +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: bsd + +Slice Start End Sectors Size Type Fsize Bsize Cpg +a 4096 6144 2049 1M 4.2BSD 0 0 0 +c 4096 20479 16384 8M unused 0 0 0 +d 0 16064 16065 7.8M unused 0 0 0 + +Partition table entries are not in disk order. + +Command (m for help): Leaving nested disklabel. + +Command (m for help): +------------------- + + + +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Entering nested BSD disklabel. + +Command (m for help): +00 unused 05 4.1BSD 09 4.4LFS 0d boot +01 swap 06 Eighth Edition 0a unknown 0e ADOS +02 Version 6 07 4.2BSD 0b HPFS 0f HFS +03 Version 7 08 MS-DOS 0c ISO-9660 10 AdvFS +04 System V + +Command (m for help): diff --git a/tests/expected/fdisk/gpt b/tests/expected/fdisk/gpt new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/fdisk/gpt-change-type-by-number b/tests/expected/fdisk/gpt-change-type-by-number new file mode 100644 index 0000000..33a6630 --- /dev/null +++ b/tests/expected/fdisk/gpt-change-type-by-number @@ -0,0 +1,20 @@ + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 4095 2048 1M EFI System +2 4096 6143 2048 1M Linux filesystem +3 6144 8191 2048 1M Linux filesystem +4 8192 10239 2048 1M Linux filesystem +5 10240 12287 2048 1M Linux filesystem +6 12288 14335 2048 1M Linux filesystem +7 14336 16383 2048 1M Linux filesystem +8 16384 18431 2048 1M Linux filesystem +------------------- + diff --git a/tests/expected/fdisk/gpt-change-type-by-uuid b/tests/expected/fdisk/gpt-change-type-by-uuid new file mode 100644 index 0000000..34b7919 --- /dev/null +++ b/tests/expected/fdisk/gpt-change-type-by-uuid @@ -0,0 +1,20 @@ + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 4095 2048 1M EFI System +2 4096 6143 2048 1M Linux filesystem +3 6144 8191 2048 1M Linux filesystem +4 8192 10239 2048 1M Linux filesystem +5 10240 12287 2048 1M Linux swap +6 12288 14335 2048 1M Linux filesystem +7 14336 16383 2048 1M Linux filesystem +8 16384 18431 2048 1M Linux filesystem +------------------- + diff --git a/tests/expected/fdisk/gpt-corrupt-backup-table b/tests/expected/fdisk/gpt-corrupt-backup-table new file mode 100644 index 0000000..34b7919 --- /dev/null +++ b/tests/expected/fdisk/gpt-corrupt-backup-table @@ -0,0 +1,20 @@ + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 4095 2048 1M EFI System +2 4096 6143 2048 1M Linux filesystem +3 6144 8191 2048 1M Linux filesystem +4 8192 10239 2048 1M Linux filesystem +5 10240 12287 2048 1M Linux swap +6 12288 14335 2048 1M Linux filesystem +7 14336 16383 2048 1M Linux filesystem +8 16384 18431 2048 1M Linux filesystem +------------------- + diff --git a/tests/expected/fdisk/gpt-corrupt-primary-table b/tests/expected/fdisk/gpt-corrupt-primary-table new file mode 100644 index 0000000..34b7919 --- /dev/null +++ b/tests/expected/fdisk/gpt-corrupt-primary-table @@ -0,0 +1,20 @@ + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 4095 2048 1M EFI System +2 4096 6143 2048 1M Linux filesystem +3 6144 8191 2048 1M Linux filesystem +4 8192 10239 2048 1M Linux filesystem +5 10240 12287 2048 1M Linux swap +6 12288 14335 2048 1M Linux filesystem +7 14336 16383 2048 1M Linux filesystem +8 16384 18431 2048 1M Linux filesystem +------------------- + diff --git a/tests/expected/fdisk/gpt-create-again-partition b/tests/expected/fdisk/gpt-create-again-partition new file mode 100644 index 0000000..34b7919 --- /dev/null +++ b/tests/expected/fdisk/gpt-create-again-partition @@ -0,0 +1,20 @@ + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 4095 2048 1M EFI System +2 4096 6143 2048 1M Linux filesystem +3 6144 8191 2048 1M Linux filesystem +4 8192 10239 2048 1M Linux filesystem +5 10240 12287 2048 1M Linux swap +6 12288 14335 2048 1M Linux filesystem +7 14336 16383 2048 1M Linux filesystem +8 16384 18431 2048 1M Linux filesystem +------------------- + diff --git a/tests/expected/fdisk/gpt-create-partitions b/tests/expected/fdisk/gpt-create-partitions new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/fdisk/gpt-delete-partition b/tests/expected/fdisk/gpt-delete-partition new file mode 100644 index 0000000..ed6cfa0 --- /dev/null +++ b/tests/expected/fdisk/gpt-delete-partition @@ -0,0 +1,19 @@ + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +1 2048 4095 2048 1M EFI System +3 6144 8191 2048 1M Linux filesystem +4 8192 10239 2048 1M Linux filesystem +5 10240 12287 2048 1M Linux swap +6 12288 14335 2048 1M Linux filesystem +7 14336 16383 2048 1M Linux filesystem +8 16384 18431 2048 1M Linux filesystem +------------------- + diff --git a/tests/expected/fdisk/gpt-empty-pt b/tests/expected/fdisk/gpt-empty-pt new file mode 100644 index 0000000..788aa65 --- /dev/null +++ b/tests/expected/fdisk/gpt-empty-pt @@ -0,0 +1,12 @@ +Initialize empty image +Create new GPT partition table + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: +------------------- + diff --git a/tests/expected/fdisk/gpt-resize b/tests/expected/fdisk/gpt-resize new file mode 100644 index 0000000..d6a331a --- /dev/null +++ b/tests/expected/fdisk/gpt-resize @@ -0,0 +1,43 @@ +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes + +>>> Created a new disklabel. +p1: Created a new partition . +p2: Done. + +New situation: +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +p1 2048 18431 16384 8M Linux filesystem + +The partition table has been altered. +----- fixing after resize: ----- + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Partition number (2-128, default 2): First sector (18432-40926, default 18432): Last sector, +/-sectors or +/-size{K,M,G,T,P} (18432-40926, default 38911): +Created a new partition . + +Command (m for help): The partition table has been altered. +Calling ioctl() to re-read partition table. + +The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or partx(8). + +----- list result: ----- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: gpt +Disk identifier: + +Device Start End Sectors Size Type +p1 2048 18431 16384 8M Linux filesystem +p2 18432 38911 20480 10M Linux filesystem diff --git a/tests/expected/fdisk/gpt-resize.err b/tests/expected/fdisk/gpt-resize.err new file mode 100644 index 0000000..8c89224 --- /dev/null +++ b/tests/expected/fdisk/gpt-resize.err @@ -0,0 +1,4 @@ +----- fixing after resize: ----- +GPT PMBR size mismatch (20479 != 40959) will be corrected by write. +The backup GPT table is not on the end of the device. This problem will be corrected by write. +Re-reading the partition table failed.: Invalid argument diff --git a/tests/expected/fdisk/id b/tests/expected/fdisk/id new file mode 100644 index 0000000..960bb6b --- /dev/null +++ b/tests/expected/fdisk/id @@ -0,0 +1 @@ +Initialize empty image diff --git a/tests/expected/fdisk/id-create-mbr-with-id-0x1 b/tests/expected/fdisk/id-create-mbr-with-id-0x1 new file mode 100644 index 0000000..a9527e4 --- /dev/null +++ b/tests/expected/fdisk/id-create-mbr-with-id-0x1 @@ -0,0 +1 @@ +Disk identifier: 0x00000001 diff --git a/tests/expected/fdisk/id-create-mbr-with-id-0x1.sparc b/tests/expected/fdisk/id-create-mbr-with-id-0x1.sparc new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/fdisk/id-create-mbr-with-id-0x2 b/tests/expected/fdisk/id-create-mbr-with-id-0x2 new file mode 100644 index 0000000..a0a9884 --- /dev/null +++ b/tests/expected/fdisk/id-create-mbr-with-id-0x2 @@ -0,0 +1 @@ +Disk identifier: 0x00000002 diff --git a/tests/expected/fdisk/id-create-mbr-with-id-0x2.sparc b/tests/expected/fdisk/id-create-mbr-with-id-0x2.sparc new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/fdisk/id.sparc b/tests/expected/fdisk/id.sparc new file mode 100644 index 0000000..960bb6b --- /dev/null +++ b/tests/expected/fdisk/id.sparc @@ -0,0 +1 @@ +Initialize empty image diff --git a/tests/expected/fdisk/mbr-dos-mode b/tests/expected/fdisk/mbr-dos-mode new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/fdisk/mbr-dos-mode-create-another-log-par b/tests/expected/fdisk/mbr-dos-mode-create-another-log-par new file mode 100644 index 0000000..61f04c0 --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-create-another-log-par @@ -0,0 +1,20 @@ +9589eaaed698d2402945ab3e513c1eb4 mbr-dos-mode.img + +---layout---------- +Disk : 54.91 MiB, 57577472 bytes, 112456 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +1 1 1 1 83 Linux 0/1/1 0/254/63 +2 2 12 12 5 Extended 1/0/1 11/254/63 +5 6 7 2 83 Linux 5/1/1 6/254/63 +6 2 3 2 83 Linux 1/1/1 2/254/63 + +Partition table entries are not in disk order. +------------------- + diff --git a/tests/expected/fdisk/mbr-dos-mode-create-extended-par b/tests/expected/fdisk/mbr-dos-mode-create-extended-par new file mode 100644 index 0000000..3c2229b --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-create-extended-par @@ -0,0 +1,16 @@ +76987a00b353687cd1dba3ddea9d66f9 mbr-dos-mode.img + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +1 1 1 1 83 Linux 0/1/1 0/254/63 +2 2 12 12 5 Extended 1/0/1 11/254/63 +------------------- + diff --git a/tests/expected/fdisk/mbr-dos-mode-create-logical-par b/tests/expected/fdisk/mbr-dos-mode-create-logical-par new file mode 100644 index 0000000..e37c296 --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-create-logical-par @@ -0,0 +1,20 @@ +a1cd6708e4a6d2e5f6bc9d5c0da0cf3b mbr-dos-mode.img + +---layout---------- +Disk : 54.91 MiB, 57577472 bytes, 112456 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +1 1 1 1 83 Linux 0/1/1 0/254/63 +2 2 12 12 5 Extended 1/0/1 11/254/63 +5 2 3 2 83 Linux 1/1/1 2/254/63 +6 4 5 2 83 Linux 3/1/1 4/254/63 +7 6 7 2 83 Linux 5/1/1 6/254/63 +8 8 9 2 83 Linux 7/1/1 8/254/63 +------------------- + diff --git a/tests/expected/fdisk/mbr-dos-mode-create-primary-partition b/tests/expected/fdisk/mbr-dos-mode-create-primary-partition new file mode 100644 index 0000000..ac8fb0f --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-create-primary-partition @@ -0,0 +1,15 @@ +ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +1 1 1 1 83 Linux 0/1/1 0/254/63 +------------------- + diff --git a/tests/expected/fdisk/mbr-dos-mode-delete-extended-par b/tests/expected/fdisk/mbr-dos-mode-delete-extended-par new file mode 100644 index 0000000..0fbff6e --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-delete-extended-par @@ -0,0 +1,12 @@ +fc3cdb12326656d7996b09b6f76973e7 mbr-dos-mode.img + +---layout---------- +Disk : 54.91 MiB, 57577472 bytes, 112456 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: +------------------- + diff --git a/tests/expected/fdisk/mbr-dos-mode-delete-logical-par b/tests/expected/fdisk/mbr-dos-mode-delete-logical-par new file mode 100644 index 0000000..cdae97e --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-delete-logical-par @@ -0,0 +1,17 @@ +4c6937d529ace5661fb82efb9394154a mbr-dos-mode.img + +---layout---------- +Disk : 54.91 MiB, 57577472 bytes, 112456 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +1 1 1 1 83 Linux 0/1/1 0/254/63 +2 2 12 12 5 Extended 1/0/1 11/254/63 +5 6 7 2 83 Linux 5/1/1 6/254/63 +------------------- + diff --git a/tests/expected/fdisk/mbr-dos-mode-delete-primary-par b/tests/expected/fdisk/mbr-dos-mode-delete-primary-par new file mode 100644 index 0000000..1b9f0a3 --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-delete-primary-par @@ -0,0 +1,19 @@ +1e6d646e5df66a2664cfbbb13fa9a08a mbr-dos-mode.img + +---layout---------- +Disk : 54.91 MiB, 57577472 bytes, 112456 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +2 2 12 12 5 Extended 1/0/1 11/254/63 +5 6 7 2 83 Linux 5/1/1 6/254/63 +6 2 3 2 83 Linux 1/1/1 2/254/63 + +Partition table entries are not in disk order. +------------------- + diff --git a/tests/expected/fdisk/mbr-dos-mode-empty-pt b/tests/expected/fdisk/mbr-dos-mode-empty-pt new file mode 100644 index 0000000..ecb5e4c --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-empty-pt @@ -0,0 +1,13 @@ +f1c9645dbc14efddc7d8a322685f26eb mbr-dos-mode.img +57e721e38d1266c2df055067c18f2cf9 mbr-dos-mode.img + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: +------------------- + diff --git a/tests/expected/fdisk/mbr-dos-mode-re-create-primary-par b/tests/expected/fdisk/mbr-dos-mode-re-create-primary-par new file mode 100644 index 0000000..ac8fb0f --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-re-create-primary-par @@ -0,0 +1,15 @@ +ae4f9b12f4a768849f72ea36938c30c7 mbr-dos-mode.img + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +1 1 1 1 83 Linux 0/1/1 0/254/63 +------------------- + diff --git a/tests/expected/fdisk/mbr-dos-mode-set-partition-type b/tests/expected/fdisk/mbr-dos-mode-set-partition-type new file mode 100644 index 0000000..2a1aacb --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-set-partition-type @@ -0,0 +1,15 @@ +4a5dba818f9962a82a086d8b99b89a17 mbr-dos-mode.img + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +1 1 1 1 bf Solaris 0/1/1 0/254/63 +------------------- + diff --git a/tests/expected/fdisk/mbr-dos-mode-set-primary-par-active b/tests/expected/fdisk/mbr-dos-mode-set-primary-par-active new file mode 100644 index 0000000..5c77ea3 --- /dev/null +++ b/tests/expected/fdisk/mbr-dos-mode-set-primary-par-active @@ -0,0 +1,15 @@ +c30e9c761b71cf95c67e758b93706ac5 mbr-dos-mode.img + +---layout---------- +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 255 heads, 63 sectors/track, 1024 cylinders +Units: cylinders of 16065 * 512 = 8225280 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Cylinders Id Type Start-C/H/S End-C/H/S Attrs +1 * 1 1 1 bf Solaris 0/1/1 0/254/63 80 +------------------- + diff --git a/tests/expected/fdisk/mbr-nondos-mode-1nd-primary-delete b/tests/expected/fdisk/mbr-nondos-mode-1nd-primary-delete new file mode 100644 index 0000000..a639244 --- /dev/null +++ b/tests/expected/fdisk/mbr-nondos-mode-1nd-primary-delete @@ -0,0 +1,19 @@ +Delete primary partition +7b29a3cda33e990e8a7877b81988b933 mbr-nondos-mode.img + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +3 12288 40959 28672 5 Extended 0/195/4 2/140/10 +5 26624 30719 4096 83 Linux 1/167/39 1/232/39 +6 14336 18431 4096 83 Linux 0/227/36 1/37/36 + +Partition table entries are not in disk order. +------------------- + diff --git a/tests/expected/fdisk/mbr-nondos-mode-1st-active b/tests/expected/fdisk/mbr-nondos-mode-1st-active new file mode 100644 index 0000000..564c043 --- /dev/null +++ b/tests/expected/fdisk/mbr-nondos-mode-1st-active @@ -0,0 +1,15 @@ +Set primary partition active +47f024f3b406598a0159400af7382e2c mbr-nondos-mode.img + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 * 2048 8191 6144 83 Linux 0/32/33 0/130/2 80 +------------------- + diff --git a/tests/expected/fdisk/mbr-nondos-mode-1st-primary b/tests/expected/fdisk/mbr-nondos-mode-1st-primary new file mode 100644 index 0000000..8747bb9 --- /dev/null +++ b/tests/expected/fdisk/mbr-nondos-mode-1st-primary @@ -0,0 +1,15 @@ +Create 1st primary partition +e21e16b7452d82e2a2810a1de8c3db05 mbr-nondos-mode.img + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 8191 6144 83 Linux 0/32/33 0/130/2 +------------------- + diff --git a/tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete new file mode 100644 index 0000000..8aaaa1c --- /dev/null +++ b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-delete @@ -0,0 +1,20 @@ +Delete primary partition +0b3611fc71ef2d02842feb621077767e mbr-nondos-mode.img + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +2 8192 12287 4096 83 Linux 0/130/3 0/195/3 +3 12288 40959 28672 5 Extended 0/195/4 2/140/10 +5 26624 30719 4096 83 Linux 1/167/39 1/232/39 +6 14336 18431 4096 83 Linux 0/227/36 1/37/36 + +Partition table entries are not in disk order. +------------------- + diff --git a/tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate new file mode 100644 index 0000000..c359608 --- /dev/null +++ b/tests/expected/fdisk/mbr-nondos-mode-1st-primary-recreate @@ -0,0 +1,15 @@ +Re-create 1st primary partition +e21e16b7452d82e2a2810a1de8c3db05 mbr-nondos-mode.img + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 8191 6144 83 Linux 0/32/33 0/130/2 +------------------- + diff --git a/tests/expected/fdisk/mbr-nondos-mode-2nd-primary b/tests/expected/fdisk/mbr-nondos-mode-2nd-primary new file mode 100644 index 0000000..c3693bf --- /dev/null +++ b/tests/expected/fdisk/mbr-nondos-mode-2nd-primary @@ -0,0 +1,16 @@ +Create 2nd primary partition +3e928fabe884f6d4906b4d9335e7c6a3 mbr-nondos-mode.img + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 8191 6144 83 Linux 0/32/33 0/130/2 +2 8192 12287 4096 83 Linux 0/130/3 0/195/3 +------------------- + diff --git a/tests/expected/fdisk/mbr-nondos-mode-empty-pt b/tests/expected/fdisk/mbr-nondos-mode-empty-pt new file mode 100644 index 0000000..bc18a70 --- /dev/null +++ b/tests/expected/fdisk/mbr-nondos-mode-empty-pt @@ -0,0 +1,14 @@ +Initialize empty image +8f4e33f3dc3e414ff94e5fb6905cba8c mbr-nondos-mode.img +Create new DOS partition table +4e23561dcb81678bb1bd678722c7cbb7 mbr-nondos-mode.img + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: +------------------- + diff --git a/tests/expected/fdisk/mbr-nondos-mode-extended b/tests/expected/fdisk/mbr-nondos-mode-extended new file mode 100644 index 0000000..ba16770 --- /dev/null +++ b/tests/expected/fdisk/mbr-nondos-mode-extended @@ -0,0 +1,17 @@ +Create extended partition +eed98bd91ea08e63ab6cd9aa18ce544e mbr-nondos-mode.img + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 8191 6144 83 Linux 0/32/33 0/130/2 +2 8192 12287 4096 83 Linux 0/130/3 0/195/3 +3 12288 40959 28672 5 Extended 0/195/4 2/140/10 +------------------- + diff --git a/tests/expected/fdisk/mbr-nondos-mode-extended-delete b/tests/expected/fdisk/mbr-nondos-mode-extended-delete new file mode 100644 index 0000000..b467274 --- /dev/null +++ b/tests/expected/fdisk/mbr-nondos-mode-extended-delete @@ -0,0 +1,12 @@ +Delete extended partition +e1ef48d3d42f4ebcfd5bf4baf5e370e9 mbr-nondos-mode.img + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: +------------------- + diff --git a/tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end b/tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end new file mode 100644 index 0000000..3656a0b --- /dev/null +++ b/tests/expected/fdisk/mbr-nondos-mode-first-sector-at-end @@ -0,0 +1,47 @@ +Create new DOS partition table (again) +Create 1st primary at the end of device + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 20000 40959 20960 83 Linux 1/62/30 2/140/10 +------------------- + +Create 2nd primary at the begin of device + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Partition type + p primary (1 primary, 0 extended, 3 free) + e extended (container for logical partitions) +Select (default p): Partition number (2-4, default 2): First sector (2048-19999, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-19999, default 19999): +Created a new partition . + +Command (m for help): The partition table has been altered. +Syncing disks. + + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 20000 40959 20960 83 Linux 1/62/30 2/140/10 +2 2048 19999 17952 83 Linux 0/32/33 1/62/29 + +Partition table entries are not in disk order. +------------------- + diff --git a/tests/expected/fdisk/mbr-nondos-mode-logical b/tests/expected/fdisk/mbr-nondos-mode-logical new file mode 100644 index 0000000..9987693 --- /dev/null +++ b/tests/expected/fdisk/mbr-nondos-mode-logical @@ -0,0 +1,21 @@ +Create logical partitions +7fda11a0988bcb4822105c70cf75c1f2 mbr-nondos-mode.img + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 8191 6144 83 Linux 0/32/33 0/130/2 +2 8192 12287 4096 83 Linux 0/130/3 0/195/3 +3 12288 40959 28672 5 Extended 0/195/4 2/140/10 +5 14336 18431 4096 83 Linux 0/227/36 1/37/36 +6 20480 24575 4096 83 Linux 1/70/6 1/135/6 +7 26624 30719 4096 83 Linux 1/167/39 1/232/39 +8 32768 36863 4096 83 Linux 2/10/9 2/75/9 +------------------- + diff --git a/tests/expected/fdisk/mbr-nondos-mode-logical-delete b/tests/expected/fdisk/mbr-nondos-mode-logical-delete new file mode 100644 index 0000000..c875b4a --- /dev/null +++ b/tests/expected/fdisk/mbr-nondos-mode-logical-delete @@ -0,0 +1,18 @@ +Delete logical partitions +e2b25d19e00bfe88ed44ca4ac9216c39 mbr-nondos-mode.img + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 8191 6144 83 Linux 0/32/33 0/130/2 +2 8192 12287 4096 83 Linux 0/130/3 0/195/3 +3 12288 40959 28672 5 Extended 0/195/4 2/140/10 +5 26624 30719 4096 83 Linux 1/167/39 1/232/39 +------------------- + diff --git a/tests/expected/fdisk/mbr-nondos-mode-logical-recreate b/tests/expected/fdisk/mbr-nondos-mode-logical-recreate new file mode 100644 index 0000000..764404b --- /dev/null +++ b/tests/expected/fdisk/mbr-nondos-mode-logical-recreate @@ -0,0 +1,21 @@ +Create another logical partition +640065c08c007d78166954475cd08ff8 mbr-nondos-mode.img + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 8191 6144 83 Linux 0/32/33 0/130/2 +2 8192 12287 4096 83 Linux 0/130/3 0/195/3 +3 12288 40959 28672 5 Extended 0/195/4 2/140/10 +5 26624 30719 4096 83 Linux 1/167/39 1/232/39 +6 14336 18431 4096 83 Linux 0/227/36 1/37/36 + +Partition table entries are not in disk order. +------------------- + diff --git a/tests/expected/fdisk/mbr-sort b/tests/expected/fdisk/mbr-sort new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/fdisk/mbr-sort-create-logical-partitions b/tests/expected/fdisk/mbr-sort-create-logical-partitions new file mode 100644 index 0000000..9bf6cf5 --- /dev/null +++ b/tests/expected/fdisk/mbr-sort-create-logical-partitions @@ -0,0 +1,22 @@ + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 4096 6143 2048 83 Linux 0/65/2 0/97/33 +2 2048 4095 2048 83 Linux 0/32/33 0/65/1 +3 6144 8191 2048 83 Linux 0/97/34 0/130/2 +4 8192 40959 32768 5 Extended 0/130/3 2/140/10 +5 14336 16383 2048 83 Linux 0/227/36 1/5/4 +6 22528 24575 2048 83 Linux 1/102/38 1/135/6 +7 18432 20479 2048 83 Linux 1/37/37 1/70/5 +8 10240 12287 2048 83 Linux 0/162/35 0/195/3 + +Partition table entries are not in disk order. +------------------- + diff --git a/tests/expected/fdisk/mbr-sort-create-primary-partitions b/tests/expected/fdisk/mbr-sort-create-primary-partitions new file mode 100644 index 0000000..0fc5098 --- /dev/null +++ b/tests/expected/fdisk/mbr-sort-create-primary-partitions @@ -0,0 +1,18 @@ + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 4096 6143 2048 83 Linux 0/65/2 0/97/33 +2 2048 4095 2048 83 Linux 0/32/33 0/65/1 +3 6144 8191 2048 83 Linux 0/97/34 0/130/2 +4 8192 40959 32768 5 Extended 0/130/3 2/140/10 + +Partition table entries are not in disk order. +------------------- + diff --git a/tests/expected/fdisk/mbr-sort-empty-pt b/tests/expected/fdisk/mbr-sort-empty-pt new file mode 100644 index 0000000..338ac65 --- /dev/null +++ b/tests/expected/fdisk/mbr-sort-empty-pt @@ -0,0 +1,10 @@ + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: +------------------- + diff --git a/tests/expected/fdisk/mbr-sort-fix-order b/tests/expected/fdisk/mbr-sort-fix-order new file mode 100644 index 0000000..8802009 --- /dev/null +++ b/tests/expected/fdisk/mbr-sort-fix-order @@ -0,0 +1,20 @@ + +---layout---------- +Disk : 20 MiB, 20971520 bytes, 40960 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: dos +Disk identifier: + +Device Boot Start End Sectors Id Type Start-C/H/S End-C/H/S Attrs +1 2048 4095 2048 83 Linux 0/32/33 0/65/1 +2 4096 6143 2048 83 Linux 0/65/2 0/97/33 +3 6144 8191 2048 83 Linux 0/97/34 0/130/2 +4 8192 40959 32768 5 Extended 0/130/3 2/140/10 +5 10240 12287 2048 83 Linux 0/162/35 0/195/3 +6 14336 16383 2048 83 Linux 0/227/36 1/5/4 +7 18432 20479 2048 83 Linux 1/37/37 1/70/5 +8 22528 24575 2048 83 Linux 1/102/38 1/135/6 +------------------- + diff --git a/tests/expected/fdisk/oddinput b/tests/expected/fdisk/oddinput new file mode 100644 index 0000000..3391422 --- /dev/null +++ b/tests/expected/fdisk/oddinput @@ -0,0 +1,7 @@ +---Initialize empty image +f1c9645dbc14efddc7d8a322685f26eb oddinput.img +---Empty image listing +Disk testimage: 10 MiB, 10485760 bytes, 20480 sectors +Units: cylinders of 16065 * 512 = 8225280 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes diff --git a/tests/expected/fdisk/oddinput.err b/tests/expected/fdisk/oddinput.err new file mode 100644 index 0000000..c39b607 --- /dev/null +++ b/tests/expected/fdisk/oddinput.err @@ -0,0 +1,4 @@ +---Nonexistent file +fdisk: cannot open _a_file_that_does_not_exist_: ENOENT +---Too small file +fdisk: cannot open oddinput.toosmall: EINVAL diff --git a/tests/expected/fdisk/oddinput.toosmall b/tests/expected/fdisk/oddinput.toosmall new file mode 100644 index 0000000..06c75ed --- /dev/null +++ b/tests/expected/fdisk/oddinput.toosmall @@ -0,0 +1 @@ +This file is too small diff --git a/tests/expected/fdisk/sunlabel b/tests/expected/fdisk/sunlabel new file mode 100644 index 0000000..e69de29 diff --git a/tests/expected/fdisk/sunlabel-create-first-partition b/tests/expected/fdisk/sunlabel-create-first-partition new file mode 100644 index 0000000..61fecac --- /dev/null +++ b/tests/expected/fdisk/sunlabel-create-first-partition @@ -0,0 +1,16 @@ +e730c7ec8208601f41963f0485147248 sunlabel.img +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 1 heads, 63 sectors/track, 325 cylinders +Units: cylinders of 63 * 512 = 32256 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: sun +Label ID: Linux cyl 325 alt 0 hd 1 sec 63 +Rpm: 5400 +Alternate cylinders: 0 +Physical cylinders: 325 +Extra sects/cyl: 0 +Interleave: 1 + +Device Start End Cylinders Size Id Type Flags +1 1 128 129 4128768 83 Linux native diff --git a/tests/expected/fdisk/sunlabel-create-second-partition b/tests/expected/fdisk/sunlabel-create-second-partition new file mode 100644 index 0000000..f6442d3 --- /dev/null +++ b/tests/expected/fdisk/sunlabel-create-second-partition @@ -0,0 +1,29 @@ + +Welcome to fdisk . +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): Partition number (2-8, default 2): First cylinder (128-325, default 128): Last cylinder or +/-cylinders or +/-size{K,M,G,T,P} (128-325, default 325): +Created a new partition . + +Command (m for help): The partition table has been altered. +Syncing disks. + +a87e80830aa13d2d68b766962f052750 sunlabel.img +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 1 heads, 63 sectors/track, 325 cylinders +Units: cylinders of 63 * 512 = 32256 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: sun +Label ID: Linux cyl 325 alt 0 hd 1 sec 63 +Rpm: 5400 +Alternate cylinders: 0 +Physical cylinders: 325 +Extra sects/cyl: 0 +Interleave: 1 + +Device Start End Cylinders Size Id Type Flags +1 1 128 129 4128768 4 SunOS usr ur +2 129 325 198 6354432 83 Linux native diff --git a/tests/expected/fdisk/sunlabel-delete-all-partitions b/tests/expected/fdisk/sunlabel-delete-all-partitions new file mode 100644 index 0000000..0dee636 --- /dev/null +++ b/tests/expected/fdisk/sunlabel-delete-all-partitions @@ -0,0 +1 @@ +502ba7a0cfdce2849c3a99881f0590c3 sunlabel.img diff --git a/tests/expected/fdisk/sunlabel-empty-sun-pt b/tests/expected/fdisk/sunlabel-empty-sun-pt new file mode 100644 index 0000000..0d38bd7 --- /dev/null +++ b/tests/expected/fdisk/sunlabel-empty-sun-pt @@ -0,0 +1,14 @@ +f1c9645dbc14efddc7d8a322685f26eb sunlabel.img +f050fd2beb99f8d968bf17450f655f06 sunlabel.img +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 1 heads, 63 sectors/track, 325 cylinders +Units: cylinders of 63 * 512 = 32256 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: sun +Label ID: Linux cyl 325 alt 0 hd 1 sec 63 +Rpm: 5400 +Alternate cylinders: 0 +Physical cylinders: 325 +Extra sects/cyl: 0 +Interleave: 1 diff --git a/tests/expected/fdisk/sunlabel-set-first-par-mountable b/tests/expected/fdisk/sunlabel-set-first-par-mountable new file mode 100644 index 0000000..610dfa1 --- /dev/null +++ b/tests/expected/fdisk/sunlabel-set-first-par-mountable @@ -0,0 +1,16 @@ +3ab76e8491b103eab52b2ae1856c1e30 sunlabel.img +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 1 heads, 63 sectors/track, 325 cylinders +Units: cylinders of 63 * 512 = 32256 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: sun +Label ID: Linux cyl 325 alt 0 hd 1 sec 63 +Rpm: 5400 +Alternate cylinders: 0 +Physical cylinders: 325 +Extra sects/cyl: 0 +Interleave: 1 + +Device Start End Cylinders Size Id Type Flags +1 1 128 129 4128768 4 SunOS usr ur diff --git a/tests/expected/fdisk/sunlabel-set-first-par-readonly b/tests/expected/fdisk/sunlabel-set-first-par-readonly new file mode 100644 index 0000000..042ba76 --- /dev/null +++ b/tests/expected/fdisk/sunlabel-set-first-par-readonly @@ -0,0 +1,16 @@ +da23f66698d9a553162887621d4c7490 sunlabel.img +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 1 heads, 63 sectors/track, 325 cylinders +Units: cylinders of 63 * 512 = 32256 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: sun +Label ID: Linux cyl 325 alt 0 hd 1 sec 63 +Rpm: 5400 +Alternate cylinders: 0 +Physical cylinders: 325 +Extra sects/cyl: 0 +Interleave: 1 + +Device Start End Cylinders Size Id Type Flags +1 1 128 129 4128768 4 SunOS usr r diff --git a/tests/expected/fdisk/sunlabel-set-partition-sysid b/tests/expected/fdisk/sunlabel-set-partition-sysid new file mode 100644 index 0000000..b664433 --- /dev/null +++ b/tests/expected/fdisk/sunlabel-set-partition-sysid @@ -0,0 +1,16 @@ +df75defdb97fbd56222aed18631a22d0 sunlabel.img +Disk : 10 MiB, 10485760 bytes, 20480 sectors +Geometry: 1 heads, 63 sectors/track, 325 cylinders +Units: cylinders of 63 * 512 = 32256 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / bytes +Disklabel type: sun +Label ID: Linux cyl 325 alt 0 hd 1 sec 63 +Rpm: 5400 +Alternate cylinders: 0 +Physical cylinders: 325 +Extra sects/cyl: 0 +Interleave: 1 + +Device Start End Cylinders Size Id Type Flags +1 1 128 129 4128768 4 SunOS usr -- cgit v1.2.3