diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-23 22:32:43 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-23 22:32:43 +0100 |
commit | af8ccba94d959a4c5b27278a1ff4d9a81fc056af (patch) | |
tree | 75dc65117ce815bff832e02d74d3591acfbf25a5 /src/satr.c | |
parent | all of the commands (diff) | |
download | sat-af8ccba94d959a4c5b27278a1ff4d9a81fc056af.tar.gz sat-af8ccba94d959a4c5b27278a1ff4d9a81fc056af.tar.bz2 sat-af8ccba94d959a4c5b27278a1ff4d9a81fc056af.tar.xz |
satq and satr does not take any arguments
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/satr.c')
-rw-r--r-- | src/satr.c | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -22,9 +22,34 @@ +/** + * The name of the process. + */ +char *argv0 = "satr"; + + + +/** + * Print usage information. + */ +static void +usage(void) +{ + fprintf(stderr, "usage: %s\n", + strrchr(argv0) ? (strrchr(argv0) + 1) : argv0); + exit(2); +} + + int main(int argc, char *argv[]) { + if (argc > 1) { + usage(); + } else if (argc == 1) { + argv0 = argv[0]; + } + /* TODO tell the daemon to start running jobs even if it is not time yet. */ } |