Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/hp300/stand/common/conf.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/hp300/stand/common/conf.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.5.24.5 retrieving revision 1.6 diff -u -p -r1.5.24.5 -r1.6 --- src/sys/arch/hp300/stand/common/conf.c 2005/11/10 13:56:09 1.5.24.5 +++ src/sys/arch/hp300/stand/common/conf.c 2003/08/07 16:27:40 1.6 @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.5.24.5 2005/11/10 13:56:09 skrll Exp $ */ +/* $NetBSD: conf.c,v 1.6 2003/08/07 16:27:40 agc Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -42,44 +42,66 @@ #include #include -#include #include #include int debug = 0; /* XXX */ #define xxstrategy \ - (int (*)(void *, int, daddr_t, size_t, void *, size_t *))nullsys -#define xxopen (int (*)(struct open_file *, ...))nodev -#define xxclose (int (*)(struct open_file *))nullsys + (int (*) __P((void *, int, daddr_t, size_t, void *, size_t *)))nullsys +#define xxopen (int (*) __P((struct open_file *, ...)))nodev +#define xxclose (int (*) __P((struct open_file *)))nullsys /* * Device configuration */ -#ifndef SUPPORT_ETHERNET +#ifdef SUPPORT_ETHERNET +int netstrategy __P((void *, int, daddr_t, size_t, void *, size_t *)); +int netopen __P((struct open_file *, ...)); +int netclose __P((struct open_file *)); +#define netioctl noioctl +#else #define netstrategy xxstrategy #define netopen xxopen #define netclose xxclose -#endif #define netioctl noioctl +#endif -#ifndef SUPPORT_TAPE +#ifdef SUPPORT_TAPE +int ctstrategy __P((void *, int, daddr_t, size_t, void *, size_t *)); +int ctopen __P((struct open_file *, ...)); +int ctclose __P((struct open_file *)); +#define ctioctl noioctl +#else #define ctstrategy xxstrategy #define ctopen xxopen #define ctclose xxclose -#endif #define ctioctl noioctl +#endif -#ifndef SUPPORT_DISK +#ifdef SUPPORT_DISK +int rdstrategy __P((void *, int, daddr_t, size_t, void *, size_t *)); +int rdopen __P((struct open_file *, ...)); +int rdclose __P((struct open_file *)); +#define rdioctl noioctl +#else #define rdstrategy xxstrategy #define rdopen xxopen #define rdclose xxclose +#define rdioctl noioctl +#endif + +#ifdef SUPPORT_DISK +int sdstrategy __P((void *, int, daddr_t, size_t, void *, size_t *)); +int sdopen __P((struct open_file *, ...)); +int sdclose __P((struct open_file *)); +#define sdioctl noioctl +#else #define sdstrategy xxstrategy #define sdopen xxopen #define sdclose xxclose -#endif -#define rdioctl noioctl #define sdioctl noioctl +#endif /* * Note: "le" isn't a major offset. @@ -96,6 +118,8 @@ struct devsw devsw[] = { int ndevs = (sizeof(devsw) / sizeof(devsw[0])); #ifdef SUPPORT_ETHERNET +extern struct netif_driver le_driver; + struct netif_driver *netif_drivers[] = { &le_driver, }; @@ -105,18 +129,21 @@ int n_netif_drivers = (sizeof(netif_driv /* * Physical unit/lun detection. */ -static int punitzero(int, int, int *); +int punitzero __P((int, int, int *)); -static int -punitzero(int ctlr, int slave, int *punit) +int +punitzero(ctlr, slave, punit) + int ctlr, slave, *punit; { *punit = 0; - return 0; + return (0); } #define xxpunit punitzero -#ifndef SUPPORT_TAPE +#ifdef SUPPORT_TAPE +int ctpunit __P((int, int, int *)); +#else #define ctpunit xxpunit #endif #define rdpunit punitzero @@ -137,20 +164,29 @@ int npunit = (sizeof(punitsw) / sizeof(p /* * Filesystem configuration */ -struct fs_ops file_system_rawfs[] = { FS_OPS(rawfs) }; -struct fs_ops file_system_ufs[] = { FS_OPS(ufs) }; -struct fs_ops file_system_nfs[] = { FS_OPS(nfs) }; +struct fs_ops file_system_rawfs[] = { + { rawfs_open, rawfs_close, rawfs_read, rawfs_write, rawfs_seek, + rawfs_stat }, +}; + +struct fs_ops file_system_ufs[] = { + { ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek, ufs_stat }, +}; + +struct fs_ops file_system_nfs[] = { + { nfs_open, nfs_close, nfs_read, nfs_write, nfs_seek, nfs_stat }, +}; struct fs_ops file_system[1]; int nfsys = 1; /* we always know which one we want */ -#if 0 + /* * Inititalize controllers - * + * * XXX this should be a table */ -void ctlrinit(void) +void ctlrinit() { #ifdef SUPPORT_ETHERNET leinit(); @@ -160,4 +196,3 @@ void ctlrinit(void) scsiinit(); #endif } -#endif