File: cartready.c

package info (click to toggle)
afbackup 3.1beta1-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,500 kB
  • ctags: 1,685
  • sloc: ansic: 22,406; csh: 3,597; tcl: 964; sh: 403; makefile: 200
file content (28 lines) | stat: -rw-r--r-- 434 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include "backup.h"

static void
usage(char * pnam)
{
  fprintf(stderr, "usage: %s\n", pnam);

  exit(1);
}

main(int argc, char ** argv)
{
  if(argc > 1)
    usage(argv[0]);

  if(unlink(CARTREADY_FILE)){
    fprintf(stderr, "Error: Cannot remove file \"%s\": %s\n",
				CARTREADY_FILE, strerror(errno));
    exit(1);
  }

  exit(0);
}