1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 14_command_line_config.dpatch by <jblache@debian.org>
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Add the ability to pass a label name on the command line,
6 ## DP: overriding the label name set in the environment.
9 diff -urNad arcload-0.5~
/loader
/main.c arcload-0.5
/loader
/main.c
10 --- arcload-0.5~
/loader
/main.c
2007-11-26 14:21:58.000000000 +0000
11 +++ arcload-0.5
/loader
/main.c
2007-11-26 14:23:58.000000000 +0000
14 strcpy
(text_label
, "no_system");
16 - if(argc
>1 && !strcmp
(argv
[1],"list"))
18 + /* NOTE
: The PROM piles up some of the env vars
in argv
*/
20 + if (!strcmp
(argv
[1], "list")) {
22 + } else if (!strchr
(argv
[1], '=')) {
23 + /* Not an env var
, for now
, let's just say it's a label name
*/
24 + strcpy
(text_label
, argv
[1]);
29 printf("Loading configuration for '%s'...\n\r", text_label
);