Skip to content

Commit

Permalink
Also use PROGNAME for lockerctl(1)
Browse files Browse the repository at this point in the history
  • Loading branch information
khorben committed Feb 28, 2015
1 parent 5465a9f commit c3f1c38
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/lockerctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
#ifndef LOCALEDIR
# define LOCALEDIR DATADIR "/locale"
#endif
#ifndef PROGNAME
# define PROGNAME "lockerctl"
#endif


/* lockerctl */
Expand All @@ -54,25 +57,25 @@ static int _lockerctl(int action)
static int _usage(void)
{
#ifdef EMBEDDED
fputs(_("Usage: lockerctl [-D|-E|-S|-c|-l|-s|-u|-z]\n"
fprintf(stderr, _("Usage: %s [-D|-E|-S|-c|-l|-s|-u|-z]\n"
" -D Temporarily disable the screensaver\n"
" -E Enable the screensaver again\n"
" -S Display or change settings\n"
" -c Cycle the screen saver\n"
" -l Lock the screen\n"
" -s Activate the screen saver\n"
" -u Unlock the screen\n"
" -z Suspend the device\n"), stderr);
" -z Suspend the device\n"), PROGNAME);
#else
fputs(_("Usage: lockerctl [-D|-E|-S|-c|-l|-s|-u|-z]\n"
fprintf(stderr, _("Usage: %s [-D|-E|-S|-c|-l|-s|-u|-z]\n"
" -D Temporarily disable the screensaver\n"
" -E Enable the screensaver again\n"
" -S Display or change settings\n"
" -c Cycle the screen saver\n"
" -l Lock the screen\n"
" -s Activate the screen saver\n"
" -u Unlock the screen\n"
" -z Suspend the computer\n"), stderr);
" -z Suspend the computer\n"), PROGNAME);
#endif
return 1;
}
Expand Down

0 comments on commit c3f1c38

Please sign in to comment.