devd.h revision 147874
197785Spdeuskar/*- 2170141Sjfv * DEVD (Device action daemon) 3170141Sjfv * 497785Spdeuskar * Copyright (c) 2002 M. Warner Losh <imp@freebsd.org>. 5170141Sjfv * All rights reserved. 697785Spdeuskar * 797785Spdeuskar * Redistribution and use in source and binary forms, with or without 897785Spdeuskar * modification, are permitted provided that the following conditions 997785Spdeuskar * are met: 1097785Spdeuskar * 1. Redistributions of source code must retain the above copyright 11112472Spdeuskar * notice, this list of conditions and the following disclaimer. 12146663Stackerman * 2. Redistributions in binary form must reproduce the above copyright 1397785Spdeuskar * notice, this list of conditions and the following disclaimer in the 1497785Spdeuskar * documentation and/or other materials provided with the distribution. 1597785Spdeuskar * 1697785Spdeuskar * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1797785Spdeuskar * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1897785Spdeuskar * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1997785Spdeuskar * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2097785Spdeuskar * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21112472Spdeuskar * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22112472Spdeuskar * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2397785Spdeuskar * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24170141Sjfv * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25170141Sjfv * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2697785Spdeuskar * SUCH DAMAGE. 27146663Stackerman * 28169240Sjfv * $FreeBSD: head/sbin/devd/devd.h 147874 2005-07-10 03:37:15Z imp $ 2997785Spdeuskar */ 3097785Spdeuskar 3197785Spdeuskar#ifndef DEVD_H 32146663Stackerman#define DEVD_H 33146663Stackerman 3497785Spdeuskar/** @warning This file needs to be purely 'C' compatible. 35146663Stackerman */ 36146663Stackermanstruct event_proc; 3797785Spdeuskarstruct eps; 38157566Sglebius__BEGIN_DECLS 3997785Spdeuskarvoid add_attach(int, struct event_proc *); 4097785Spdeuskarvoid add_detach(int, struct event_proc *); 41146663Stackermanvoid add_directory(const char *); 4297785Spdeuskarvoid add_nomatch(int, struct event_proc *); 43157566Sglebiusvoid add_notify(int, struct event_proc *); 4497785Spdeuskarstruct event_proc *add_to_event_proc(struct event_proc *, struct eps *); 4597785Spdeuskarstruct eps *new_match(const char *, const char *); 46146663Stackermanstruct eps *new_media(const char *, const char *); 47160949Sglebiusstruct eps *new_action(const char *); 48160949Sglebiusvoid set_pidfile(const char *); 4997785Spdeuskarvoid set_variable(const char *, const char *); 5097785Spdeuskarvoid yyerror(const char *s); 5197785Spdeuskarint yylex(void); 5297785Spdeuskarint yyparse(void); 53146663Stackerman__END_DECLS 54146663Stackerman 55112472Spdeuskar#define PATH_DEVCTL "/dev/devctl" 5697785Spdeuskar#define DEVCTL_MAXBUF 1025 57146663Stackerman 58112472Spdeuskar#endif /* DEVD_H */ 5997785Spdeuskar