]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: update tests and clean up output
authorKarel Zak <kzak@redhat.com>
Fri, 8 Aug 2014 10:35:20 +0000 (12:35 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 8 Aug 2014 10:35:20 +0000 (12:35 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
13 files changed:
disk-utils/fdisk.c
tests/expected/blkid/md-raid0-whole
tests/expected/blkid/md-raid1-part
tests/expected/blkid/md-raid1-whole
tests/expected/fdisk/align-512-4K
tests/expected/fdisk/align-512-4K-63
tests/expected/fdisk/align-512-4K-md
tests/expected/fdisk/align-512-512
tests/expected/fdisk/align-512-512-topology
tests/expected/fdisk/mbr-dos-mode
tests/expected/fdisk/mbr-nondos-mode
tests/expected/fdisk/mbr-sort
tests/expected/fdisk/oddinput

index 0eeeda116064b4d84627bc6b7a6514cc955220e2..fed7a5745edb4c6993b2ac47753fa7dfb1754152 100644 (file)
@@ -567,17 +567,16 @@ void list_disklabel(struct fdisk_context *cxt)
                }
        }
 
-       itr = fdisk_new_iter(FDISK_ITER_FORWARD);
-
        fputc('\n', stdout);
 
+       itr = fdisk_new_iter(FDISK_ITER_FORWARD);
+
        while (itr && fdisk_table_next_partition(tb, itr, &pa) == 0)
                fdisk_warn_alignment(cxt, fdisk_partition_get_start(pa),
                                          fdisk_partition_get_partno(pa) + 1);
 
-       if (fdisk_table_wrong_order(tb)) {
+       if (fdisk_table_wrong_order(tb))
                fdisk_info(cxt, _("Partition table entries are not in disk order."));
-       }
 
        fdisk_unref_table(tb);
        fdisk_free_iter(itr);
@@ -693,7 +692,6 @@ static void print_device_pt(struct fdisk_context *cxt, char *device, int warnme)
 
        if (fdisk_dev_has_disklabel(cxt))
                list_disklabel(cxt);
-       fputc('\n', stdout);
 }
 
 static void print_all_devices_pt(struct fdisk_context *cxt)
index 83fbff356c91562cf3aa5cde320bb802bb511189..a6ab1ae8acd9ea16a1125bc2c2132f142baf4add 100644 (file)
@@ -32,6 +32,7 @@ Device     Boot Start    End Sectors  Size Id Type
 <removed>p1       2048  22527   20480   10M 83 Linux
 <removed>p2      22528 204543  182016 88.9M 83 Linux
 
+
 Command (m for help): The partition table has been altered.
 Calling ioctl() to re-read partition table.
 Syncing disks.
index 8f73a694e7de8d4084a9465b98265dfe76d27497..db8becfed86038202323dac349be295a2b40d8a1 100644 (file)
@@ -30,6 +30,7 @@ Device     Boot Start    End Sectors Size Id Type
 <removed>1        2048  53247   51200  25M 83 Linux
 <removed>2       53248 104447   51200  25M 83 Linux
 
+
 Command (m for help): The partition table has been altered.
 Calling ioctl() to re-read partition table.
 Syncing disks.
index 6f93f54de385a36db5a6a86bc5c3e49416fab87b..5ac5b01d67288029ff1520c2296b1556a53befe7 100644 (file)
@@ -32,6 +32,7 @@ Device     Boot Start   End Sectors Size Id Type
 /dev/md8p1       2048 22527   20480  10M 83 Linux
 /dev/md8p2      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.
index 49f93751df7d4b7f81c397598d8fb1b6bd0f08ee..261f16912bb722af641f402d8d0426703c42ca97 100644 (file)
@@ -64,6 +64,7 @@ Device     Boot Start    End Sectors Size Id Type
 <removed>6       77824  88063   10240   5M 83 Linux
 <removed>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.
index 6e44cfe2bb7402a269d474c3bb5bb9c156356717..ee58b3a2a0f09f8d590f835327940280640a11d9 100644 (file)
@@ -65,6 +65,7 @@ Device     Boot Start    End Sectors Size Id Type
 <removed>6       75775  86014   10240   5M 83 Linux
 <removed>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.
index 317865a86c47be9c10846330af7db1ab257c7b38..87777f77425fe399d14191fe7245707d0ea19289 100644 (file)
@@ -30,6 +30,7 @@ Device     Boot Start    End Sectors Size Id Type
 <removed>1        2048  43007   40960  20M 83 Linux
 <removed>2       43008 102399   59392  29M 83 Linux
 
+
 Command (m for help): The partition table has been altered.
 Calling ioctl() to re-read partition table.
 Syncing disks.
@@ -69,6 +70,7 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>p1       2048 22527   20480  10M 83 Linux
 <removed>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.
index 27df5705135be1ee6d0f37b5d5150012d77ba98f..b4a0e568a7f1bc6225433386e3180e40a1229581 100644 (file)
@@ -64,4 +64,5 @@ Device     Boot Start    End Sectors Size Id Type
 <removed>p6      77824  88063   10240   5M 83 Linux
 <removed>p7      90112 102399   12288   6M 83 Linux
 
+
 Command (m for help): 
index 8ae0c4057233c0c8a7562e0c432dc601a9cea9bb..7552656eec7583c33e83b5252c74549464a34d45 100644 (file)
@@ -64,6 +64,7 @@ Device     Boot Start    End Sectors Size Id Type
 <removed>6       77824  88063   10240   5M 83 Linux
 <removed>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.
index 5d84ea6f126e2da2995d08c9c705e41ff11ebba3..62c454a989e8436c72bd4953d5c8db2fd6022673 100644 (file)
@@ -161,7 +161,6 @@ Device     Boot Start End Cylinders  Size Id Type
 <removed>6          2   3         2 15.7M 83 Linux
 
 Partition table entries are not in disk order.
-
 -------------------
 
 Delete primary partition
@@ -182,7 +181,6 @@ Device     Boot Start End Cylinders  Size Id Type
 <removed>6          2   3         2 15.7M 83 Linux
 
 Partition table entries are not in disk order.
-
 -------------------
 
 Delete extended partition
index f8af411d28f8054dcbab4344a98d8bede943d22b..89396af46f884c5ee0fc45f814fdb4ea8143e074 100644 (file)
@@ -157,7 +157,6 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>6      14336 18431    4096   2M 83 Linux
 
 Partition table entries are not in disk order.
-
 -------------------
 
 Delete primary partition
@@ -178,7 +177,6 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>6      14336 18431    4096   2M 83 Linux
 
 Partition table entries are not in disk order.
-
 -------------------
 
 Delete primary partition
@@ -198,7 +196,6 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>6      14336 18431    4096   2M 83 Linux
 
 Partition table entries are not in disk order.
-
 -------------------
 
 Delete extended partition
index fb897a3869d0640c3a4cdfcfe17054dc1aef0244..d7fb6aae746b165c6c4ac15b32a30bc4d67dc157 100644 (file)
@@ -6,7 +6,6 @@ Disk <removed>: 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 / 512 bytes
-
 -------------------
 
 Create primary partitions
@@ -26,7 +25,6 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>4       8192 40959   32768  16M  5 Extended
 
 Partition table entries are not in disk order.
-
 -------------------
 
 Create logical partitions
@@ -50,7 +48,6 @@ Device     Boot Start   End Sectors Size Id Type
 <removed>8      10240 12287    2048   1M 83 Linux
 
 Partition table entries are not in disk order.
-
 -------------------
 
 Fix order.
index a1dbdb6e0618c383f2dfd3234af0cea66cc0dfcf..7a91f8d2fe3fbd6c8f3cce968a9cb705f5eb85bd 100644 (file)
@@ -7,7 +7,6 @@ Geometry: 255 heads, 63 sectors/track, 1 cylinders
 Units: cylinders of 16065 * 512 = 8225280 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
-
 Nonexistant file
 fdisk: cannot open _a_file_that_does_not_exist_: No such file or directory
 Too small file