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