1*eab26c47Spgoyette /* $NetBSD: powerd_hostops.c,v 1.1 2010/12/19 22:52:08 pgoyette Exp $ */ 2*eab26c47Spgoyette 3*eab26c47Spgoyette /* 4*eab26c47Spgoyette * Copyright (c) 2010 The NetBSD Foundation, Inc. 5*eab26c47Spgoyette * All rights reserved. 6*eab26c47Spgoyette * 7*eab26c47Spgoyette * Redistribution and use in source and binary forms, with or without 8*eab26c47Spgoyette * modification, are permitted provided that the following conditions 9*eab26c47Spgoyette * are met: 10*eab26c47Spgoyette * 1. Redistributions of source code must retain the above copyright 11*eab26c47Spgoyette * notice, this list of conditions and the following disclaimer. 12*eab26c47Spgoyette * 2. Redistributions in binary form must reproduce the above copyright 13*eab26c47Spgoyette * notice, this list of conditions and the following disclaimer in the 14*eab26c47Spgoyette * documentation and/or other materials provided with the distribution. 15*eab26c47Spgoyette * 16*eab26c47Spgoyette * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 17*eab26c47Spgoyette * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18*eab26c47Spgoyette * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19*eab26c47Spgoyette * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 20*eab26c47Spgoyette * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21*eab26c47Spgoyette * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22*eab26c47Spgoyette * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23*eab26c47Spgoyette * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24*eab26c47Spgoyette * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25*eab26c47Spgoyette * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26*eab26c47Spgoyette * POSSIBILITY OF SUCH DAMAGE. 27*eab26c47Spgoyette */ 28*eab26c47Spgoyette 29*eab26c47Spgoyette #include <sys/cdefs.h> 30*eab26c47Spgoyette #ifndef lint 31*eab26c47Spgoyette __RCSID("$NetBSD: powerd_hostops.c,v 1.1 2010/12/19 22:52:08 pgoyette Exp $"); 32*eab26c47Spgoyette #endif /* !lint */ 33*eab26c47Spgoyette 34*eab26c47Spgoyette #include <sys/types.h> 35*eab26c47Spgoyette #include <sys/event.h> 36*eab26c47Spgoyette #include <sys/ioctl.h> 37*eab26c47Spgoyette 38*eab26c47Spgoyette #include <fcntl.h> 39*eab26c47Spgoyette #include <unistd.h> 40*eab26c47Spgoyette 41*eab26c47Spgoyette #include "prog_ops.h" 42*eab26c47Spgoyette 43*eab26c47Spgoyette const struct prog_ops prog_ops = { 44*eab26c47Spgoyette .op_open = open, 45*eab26c47Spgoyette .op_close = close, 46*eab26c47Spgoyette .op_read = read, 47*eab26c47Spgoyette .op_fcntl = fcntl, 48*eab26c47Spgoyette .op_ioctl = ioctl, 49*eab26c47Spgoyette .op_kevent = kevent, 50*eab26c47Spgoyette .op_kqueue = kqueue, 51*eab26c47Spgoyette }; 52