diff options
| author | Karel Zak <kzak@redhat.com> | 2014-09-04 14:16:08 +0200 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2014-10-07 14:55:30 +0200 |
| commit | 207de32a97b14ea57a8bd1ba454e901aa223bd37 (patch) | |
| tree | 6f4c807af1b898fe9159aff774c9976bd2173bd1 /disk-utils/sfdisk.c | |
| parent | 9c1f9dd3a0dec0ccb7afc63cc47f04f8edc1b5de (diff) | |
| download | util-linux-207de32a97b14ea57a8bd1ba454e901aa223bd37.tar.gz | |
sfdisk: --list just one device
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/sfdisk.c')
| -rw-r--r-- | disk-utils/sfdisk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c index 41ede33065..3cbd10feed 100644 --- a/disk-utils/sfdisk.c +++ b/disk-utils/sfdisk.c @@ -148,8 +148,8 @@ static int command_list_partitions(struct sfdisk *sf, int argc, char **argv) fdisk_enable_listonly(sf->cxt, 1); - if (argc > optind) { - for (i = optind; i < argc; i++) + if (argc) { + for (i = 0; i < argc; i++) print_device_pt(sf->cxt, argv[i], 0); } else print_all_devices_pt(sf->cxt); |
