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