diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2016-01-01 20:43:23 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2016-01-01 20:43:23 +0100 |
commit | f58973cb6e8c82d8970602c70dd99d0e1c19335a (patch) | |
tree | 289daeb2d792e5dde602a259f4c854d133fe7cbc /src/satq.c | |
parent | satq does not interface with satd + fix regression bugs (diff) | |
download | sat-f58973cb6e8c82d8970602c70dd99d0e1c19335a.tar.gz sat-f58973cb6e8c82d8970602c70dd99d0e1c19335a.tar.bz2 sat-f58973cb6e8c82d8970602c70dd99d0e1c19335a.tar.xz |
remove satd-rm and satd-r and let satrm and satr do everything (not done yet)
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r-- | src/satq.c | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -247,25 +247,16 @@ main(int argc, char *argv[]) { struct job **jobs = NULL; struct job **job; - int state = -1; + PROLOGUE(argc < 2, O_RDONLY, NULL); - if (argc > 0) argv0 = argv[0]; - if (argc > 1) usage(); - - GET_FD(state, STATE_FILENO, open_state(O_RDONLY, NULL)); t (!(jobs = get_jobs())); for (job = jobs; *job; job++) t (print_job(*job)); - errno = 0; -fail: - if (errno) - perror(argv[0]); + CLEANUP_START; for (job = jobs; jobs && *job; job++) free(*job); free(jobs); - if (state >= 0) - close(state); - return !!errno; + CLEANUP_END; } |