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>
This commit is contained in:
Karel Zak 2007-08-27 23:31:25 +02:00
parent eeadb4f4cb
commit 1e322675f9
2 changed files with 9 additions and 1 deletions

View File

@ -23,7 +23,7 @@ Be verbose.
.I "\-h," "\-\-help"
Display help (it is also displayed when setarch takes no arguments).
.TP
.I "\-3"
.I "\-3," "\-\-3gb"
Specifies that processes should use a maximum of 3GB of address space on systems where it is supported (ADDR_LIMIT_3GB).
.TP
.I "\-B"

View File

@ -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;