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:
parent
eeadb4f4cb
commit
1e322675f9
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue