xref: /netbsd/usr.bin/revoke/revoke.c (revision 3028e483)
1*3028e483Smartin /* $NetBSD: revoke.c,v 1.4 2008/04/29 06:53:03 martin Exp $ */
2d730e7f0Selad /*-
3d730e7f0Selad  * Copyright (c) 2006 The NetBSD Foundation, Inc.
4d730e7f0Selad  * All rights reserved.
5d730e7f0Selad  *
6d730e7f0Selad  * This code is derived from software contributed to The NetBSD Foundation
7d730e7f0Selad  * by Elad Efrat.
8d730e7f0Selad  *
9d730e7f0Selad  * Redistribution and use in source and binary forms, with or without
10d730e7f0Selad  * modification, are permitted provided that the following conditions
11d730e7f0Selad  * are met:
12d730e7f0Selad  * 1. Redistributions of source code must retain the above copyright
13d730e7f0Selad  *    notice, this list of conditions and the following disclaimer.
14d730e7f0Selad  * 2. Redistributions in binary form must reproduce the above copyright
15d730e7f0Selad  *    notice, this list of conditions and the following disclaimer in the
16d730e7f0Selad  *    documentation and/or other materials provided with the distribution.
17d730e7f0Selad  *
18d730e7f0Selad  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19d730e7f0Selad  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20d730e7f0Selad  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21d730e7f0Selad  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22d730e7f0Selad  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23d730e7f0Selad  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24d730e7f0Selad  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25d730e7f0Selad  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26d730e7f0Selad  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27d730e7f0Selad  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28d730e7f0Selad  * POSSIBILITY OF SUCH DAMAGE.
29d730e7f0Selad  */
30fd79a155Selad 
31fd79a155Selad #include <sys/types.h>
32fd79a155Selad #include <stdio.h>
33fd79a155Selad #include <stdlib.h>
34fd79a155Selad #include <unistd.h>
35fd79a155Selad #include <err.h>
36fd79a155Selad 
37fd79a155Selad int
main(int argc,char * argv[])38fd79a155Selad main(int argc, char *argv[])
39fd79a155Selad {
40fd79a155Selad        if (argc != 2)
41fd79a155Selad 		errx(EXIT_FAILURE, "usage: %s <file>", getprogname());
42fd79a155Selad 
43fd79a155Selad        if (revoke(argv[1]) != 0)
44fd79a155Selad                err(EXIT_FAILURE, "revoke(%s)", argv[1]);
45fd79a155Selad 
46fd79a155Selad        return EXIT_SUCCESS;
47fd79a155Selad }
48