Refactor little progname() for all applictions

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-11-27 17:38:01 +01:00
1 parent 829ff0b9f7
commit f24a03a32c
7 files changed
+94 -22

No files matched your search

+3 -1
View File
@@ -38,6 +38,7 @@
#include "cond.h"
#include "helpers.h"
#include "service.h"
#include "util.h"
#include "utmp-api.h"
#define _PATH_COND _PATH_VARRUN "finit/cond/"
@@ -439,7 +440,7 @@ static int usage(int rc)
" halt Halt system\n"
" poweroff Halt and power off system\n"
" utmp show Raw dump of UTMP/WTMP db\n"
" version Show Finit version\n\n", __progname);
" version Show Finit version\n\n", prognm);
return rc;
}
@@ -471,6 +472,7 @@ int main(int argc, char *argv[])
{NULL, 0, NULL, 0}
};
progname(argv[0]);
while ((c = getopt_long(argc, argv, "dh?v", long_options, NULL)) != EOF) {
switch(c) {
case 'h':