summaryrefslogtreecommitdiffstats
path: root/sys-utils/setarch.c
diff options
context:
space:
mode:
authorDmitry V. Levin2008-04-16 01:26:56 +0200
committerKarel Zak2008-04-16 11:20:09 +0200
commit3c52010c68c3d554979cca22a529aed15794eb80 (patch)
treea65d090353c6d06dacaa4e933340ae115a9a9f06 /sys-utils/setarch.c
parentlosetup: fix typo in losetup.8 (diff)
downloadkernel-qcow2-util-linux-3c52010c68c3d554979cca22a529aed15794eb80.tar.gz
kernel-qcow2-util-linux-3c52010c68c3d554979cca22a529aed15794eb80.tar.xz
kernel-qcow2-util-linux-3c52010c68c3d554979cca22a529aed15794eb80.zip
setarch: provide backwards compatibility
The getopt_long(3) use introduced by commit 8df90dec2bfd8c876ddd4cea010f40550d4e24aa broke backwards compatibility. Old behavior: $ i386 uname -m i686 New behavior: $ i386 uname -m i386: invalid option -- m Linux Traditional method to fix it is to disable program arguments reordering by prefixing getopt_long's optstring with '+' character. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/setarch.c')
-rw-r--r--sys-utils/setarch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
index aa7c81097..bc6a12d03 100644
--- a/sys-utils/setarch.c
+++ b/sys-utils/setarch.c
@@ -236,7 +236,7 @@ int main(int argc, char *argv[])
}
#endif
- while ((c = getopt_long(argc, argv, "hv3BFILRSTXZ", longopts, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "+hv3BFILRSTXZ", longopts, NULL)) != -1) {
switch (c) {
case 'h':
show_help();