summaryrefslogtreecommitdiffstats
path: root/disk-utils
diff options
context:
space:
mode:
authorKarel Zak2015-03-26 18:21:53 +0100
committerKarel Zak2015-03-26 18:21:53 +0100
commit703ab08256d35067381eaf8580b3e92a409f3354 (patch)
treecaaf743ab8e9a2122de413cef2393776eb84b904 /disk-utils
parentdocs: document --exclude for tests (diff)
downloadkernel-qcow2-util-linux-703ab08256d35067381eaf8580b3e92a409f3354.tar.gz
kernel-qcow2-util-linux-703ab08256d35067381eaf8580b3e92a409f3354.tar.xz
kernel-qcow2-util-linux-703ab08256d35067381eaf8580b3e92a409f3354.zip
sfdisk: fix -a vs. -A bug
The -A has been originally used for --activate, since v2.26 it's used for --append. This is stupid mistake. This patch reverts the change to: -A, --activate -a, --append Note that --append is a new command line option in v2.26. Addresses: https://bugs.archlinux.org/task/44349 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils')
-rw-r--r--disk-utils/sfdisk.84
-rw-r--r--disk-utils/sfdisk.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/disk-utils/sfdisk.8 b/disk-utils/sfdisk.8
index 66a8f9955..18227591d 100644
--- a/disk-utils/sfdisk.8
+++ b/disk-utils/sfdisk.8
@@ -59,7 +59,7 @@ interactive session.
If the option \fB\-N\fR is specified, then the changes are applied to
the partition addressed by \fIpartition-number\fR.
.TP
-.BR \-a , " \-\-activate \fIdevice\fR [" \fIpartition-number\fR...]
+.BR \-A , " \-\-activate \fIdevice\fR [" \fIpartition-number\fR...]
Switch on the bootable flag. If no \fIpartition-number\fR is specified,
then all partitions with an enabled flag are listed.
.TP
@@ -108,7 +108,7 @@ Test whether the partition table and partitions seem correct.
.SH OPTIONS
.TP
-.BR \-A , " \-\-append"
+.BR \-a , " \-\-append"
Don't create a new partition table, but only append the specified partitions.
.TP
.BR \-b , " \-\-backup"
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
index b9f79e3d3..c69cae9ce 100644
--- a/disk-utils/sfdisk.c
+++ b/disk-utils/sfdisk.c
@@ -1371,7 +1371,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out)
fputs(_("Display or manipulate a disk partition table.\n"), out);
fputs(_("\nCommands:\n"), out);
- fputs(_(" -a, --activate <dev> [<part> ...] list or set bootable MBR partitions\n"), out);
+ fputs(_(" -A, --activate <dev> [<part> ...] list or set bootable MBR partitions\n"), out);
fputs(_(" -d, --dump <dev> dump partition table (usable for later input)\n"), out);
fputs(_(" -g, --show-geometry [<dev> ...] list geometry of all or specified devices\n"), out);
fputs(_(" -l, --list [<dev> ...] list partitions of each device\n"), out);
@@ -1391,7 +1391,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE *out)
fputs(_(" <type> partition type, GUID for GPT, hex for MBR\n"), out);
fputs(USAGE_OPTIONS, out);
- fputs(_(" -A, --append append partitions to existing partition table\n"), out);
+ fputs(_(" -a, --append append partitions to existing partition table\n"), out);
fputs(_(" -b, --backup backup partition table sectors (see -O)\n"), out);
fputs(_(" --bytes print SIZE in bytes rather than in human readable format\n"), out);
fputs(_(" -f, --force disable all consistency checking\n"), out);
@@ -1445,8 +1445,8 @@ int main(int argc, char *argv[])
};
static const struct option longopts[] = {
- { "activate",no_argument, NULL, 'a' },
- { "append", no_argument, NULL, 'A' },
+ { "activate",no_argument, NULL, 'A' },
+ { "append", no_argument, NULL, 'a' },
{ "backup", no_argument, NULL, 'b' },
{ "backup-file", required_argument, NULL, 'O' },
{ "bytes", no_argument, NULL, OPT_BYTES },
@@ -1491,10 +1491,10 @@ int main(int argc, char *argv[])
while ((c = getopt_long(argc, argv, "aAbcdfghlLo:O:nN:qsTu:vVX:Y:",
longopts, &longidx)) != -1) {
switch(c) {
- case 'a':
+ case 'A':
sf->act = ACT_ACTIVATE;
break;
- case 'A':
+ case 'a':
sf->append = 1;
break;
case 'b':