1100206Sdd/*- 2100206Sdd * Copyright (c) 2002 Dima Dorfman. 3100206Sdd * All rights reserved. 4100206Sdd * 5100206Sdd * Redistribution and use in source and binary forms, with or without 6100206Sdd * modification, are permitted provided that the following conditions 7100206Sdd * are met: 8100206Sdd * 1. Redistributions of source code must retain the above copyright 9100206Sdd * notice, this list of conditions and the following disclaimer. 10100206Sdd * 2. Redistributions in binary form must reproduce the above copyright 11100206Sdd * notice, this list of conditions and the following disclaimer in the 12100206Sdd * documentation and/or other materials provided with the distribution. 13100206Sdd * 14100206Sdd * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15100206Sdd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16100206Sdd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17100206Sdd * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18100206Sdd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19100206Sdd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20100206Sdd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21100206Sdd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22100206Sdd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23100206Sdd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24100206Sdd * SUCH DAMAGE. 25100206Sdd * 26100206Sdd * $FreeBSD: releng/11.0/sbin/devfs/extern.h 130021 2004-06-02 23:02:31Z stefanf $ 27100206Sdd */ 28100206Sdd 29100206Sdd#ifndef __DEVFS_H__ 30100206Sdd#define __DEVFS_H__ 31100206Sdd 32100206Sdd#include <fs/devfs/devfs.h> 33100206Sdd 34100206Sddstruct intstr { 35100206Sdd const char *s; 36100206Sdd int i; 37100206Sdd}; 38100206Sdd 39100206Sddtypedef int (command_t)(int, char **); 40100206Sddstruct cmd { 41100206Sdd const char *name; 42100206Sdd command_t *handler; 43100206Sdd}; 44130021Sstefanftypedef struct cmd ctbl_t[]; 45100206Sdd 46100206Sddcommand_t rule_main, ruleset_main; 47100206Sdd 48100206Sddint atonum(const char *, uint16_t *); 49100206Sddint eatoi(const char *); 50100206Sdduint16_t eatonum(const char *); 51100799Sddsize_t efgetln(FILE *, char **); 52100799Sddvoid tokenize(const char *, int *, char ***); 53100206Sddvoid usage(void) __dead2; 54100206Sdd 55100206Sddextern int mpfd; /* Mount-point file descriptor. */ 56100206Sdd 57100206Sdd#endif /* !__DEVFS_H__ */ 58