summaryrefslogtreecommitdiffstats
path: root/sys-utils/setarch.c
diff options
context:
space:
mode:
authorKarel Zak2007-08-27 23:31:25 +0200
committerKarel Zak2007-08-27 23:34:08 +0200
commit1e322675f96b4ff4f198b4ec6673059ceb30fbf1 (patch)
treec88836d6fe24afc2f5c728de4caffedfdd284d85 /sys-utils/setarch.c
parentsetarch: finish adding parisc support (diff)
downloadkernel-qcow2-util-linux-1e322675f96b4ff4f198b4ec6673059ceb30fbf1.tar.gz
kernel-qcow2-util-linux-1e322675f96b4ff4f198b4ec6673059ceb30fbf1.tar.xz
kernel-qcow2-util-linux-1e322675f96b4ff4f198b4ec6673059ceb30fbf1.zip
setarch: add --3gb option fot compatibility with Debian linux{32,64} command
Debian had a pre-existing linux{32,64} command which supported only --3gb and --4gb. Adding support for those options allows setarch to replace that package. (Note that long options are expected for all setarch flags in the next release.) Signed-off-by: LaMont Jones <lamont@mmjgroup.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/setarch.c')
-rw-r--r--sys-utils/setarch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
index e4a204adb..6eba24ae8 100644
--- a/sys-utils/setarch.c
+++ b/sys-utils/setarch.c
@@ -212,6 +212,14 @@ int main(int argc, char *argv[])
if (!strcmp(arg, "--help"))
show_help();
+ /* compatibitity with an old Debian setarch implementation
+ * TODO: add long options for all flags
+ */
+ if (!strcmp(arg, "--3gb"))
+ arg="-3";
+ else if (!strcmp(arg, "--4gb"))
+ continue; /* just ignore this one */
+
for (n = 1; arg[n]; n++) {
int f;