* Makefile.in (kill.exe): Add as a specific target.
* kill.cc (longopts): New. (opts): Ditto. (get_sig): Accept const char * parameter. Return -1 on unknown signal. (test_for_unknown_sig): New function. (listsig): New function. (main): Use getopt_long for option parsing. Implement -l, and -s options. Use test_for_unknown_sig() to test for signal validity.
This commit is contained in:
@ -109,7 +109,7 @@ do_mount (const char *dev, const char *where, int flags)
|
||||
exit (0);
|
||||
}
|
||||
|
||||
struct option longopts[] =
|
||||
static struct option longopts[] =
|
||||
{
|
||||
{"help", no_argument, NULL, 'h' },
|
||||
{"binary", no_argument, NULL, 'b'},
|
||||
@ -127,7 +127,7 @@ struct option longopts[] =
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
char opts[] = "hbfstuxXEpicm";
|
||||
static char opts[] = "hbfstuxXEpicm";
|
||||
|
||||
static void
|
||||
usage (void)
|
||||
|
Reference in New Issue
Block a user