Home | History | Annotate | Line # | Download | only in revoke
revoke.c revision 1.4
      1  1.4  martin /* $NetBSD: revoke.c,v 1.4 2008/04/29 06:53:03 martin 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  *
     18  1.2    elad  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     19  1.2    elad  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     20  1.2    elad  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     21  1.2    elad  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     22  1.2    elad  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23  1.2    elad  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24  1.2    elad  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25  1.2    elad  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26  1.2    elad  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27  1.2    elad  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28  1.2    elad  * POSSIBILITY OF SUCH DAMAGE.
     29  1.2    elad  */
     30  1.1    elad 
     31  1.1    elad #include <sys/types.h>
     32  1.1    elad #include <stdio.h>
     33  1.1    elad #include <stdlib.h>
     34  1.1    elad #include <unistd.h>
     35  1.1    elad #include <err.h>
     36  1.1    elad 
     37  1.1    elad int
     38  1.1    elad main(int argc, char *argv[])
     39  1.1    elad {
     40  1.1    elad        if (argc != 2)
     41  1.1    elad 		errx(EXIT_FAILURE, "usage: %s <file>", getprogname());
     42  1.1    elad 
     43  1.1    elad        if (revoke(argv[1]) != 0)
     44  1.1    elad                err(EXIT_FAILURE, "revoke(%s)", argv[1]);
     45  1.1    elad 
     46  1.1    elad        return EXIT_SUCCESS;
     47  1.1    elad }
     48