aboutsummaryrefslogtreecommitdiffstats
path: root/src/satrm.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2016-01-01 20:43:23 +0100
committerMattias Andrée <maandree@member.fsf.org>2016-01-01 20:43:23 +0100
commitf58973cb6e8c82d8970602c70dd99d0e1c19335a (patch)
tree289daeb2d792e5dde602a259f4c854d133fe7cbc /src/satrm.c
parentsatq does not interface with satd + fix regression bugs (diff)
downloadsat-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/satrm.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/satrm.c b/src/satrm.c
index fda6288..115373c 100644
--- a/src/satrm.c
+++ b/src/satrm.c
@@ -19,7 +19,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
-#include "client.h"
+#include "daemon.h"
@@ -42,15 +42,14 @@ USAGE("JOB-ID...")
int
main(int argc, char *argv[])
{
- size_t n;
- char *msg = NULL;
+ PROLOGUE(argc >= 2, O_RDWR, NULL);
+ NO_OPTIONS;
- if (argc > 0) argv0 = argv[0];
- if (argc < 2) usage();
+ for (argv++; *argv; argv++)
+ t (remove_job(*argv, 0) && errno);
+ t (poke_daemon());
- NO_OPTIONS;
- CONSTRUCT_MESSAGE;
- SEND(SAT_REMOVE, n, msg);
- END(msg);
+ CLEANUP_START;
+ CLEANUP_END;
}