#include <sys/param.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <lib/libsa/stand.h>
#include <lib/libsa/nfs.h>
#include <lib/libsa/ufs.h>
#include <lib/libsa/cd9660.h>
#include <hp300/stand/common/conf.h>
#include <hp300/stand/common/rawfs.h>
#include <hp300/stand/common/samachdep.h>
int debug = 0;
#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
#ifndef SUPPORT_ETHERNET
#define netstrategy xxstrategy
#define netopen xxopen
#define netclose xxclose
#endif
#define netioctl noioctl
#ifndef SUPPORT_TAPE
#define ctstrategy xxstrategy
#define ctopen xxopen
#define ctclose xxclose
#endif
#define ctioctl noioctl
#ifndef SUPPORT_DISK
#define rdstrategy xxstrategy
#define rdopen xxopen
#define rdclose xxclose
#define sdstrategy xxstrategy
#define sdopen xxopen
#define sdclose xxclose
#endif
#define rdioctl noioctl
#define sdioctl noioctl
struct devsw devsw[] = {
{ "ct", ctstrategy, ctopen, ctclose, ctioctl },
{ "??", xxstrategy, xxopen, xxclose, noioctl },
{ "rd", rdstrategy, rdopen, rdclose, rdioctl },
{ "??", xxstrategy, xxopen, xxclose, noioctl },
{ "sd", sdstrategy, sdopen, sdclose, sdioctl },
{ "??", xxstrategy, xxopen, xxclose, noioctl },
{ "le", netstrategy, netopen, netclose, netioctl },
};
int ndevs = __arraycount(devsw);
#ifdef SUPPORT_ETHERNET
struct netif_driver *netif_drivers[] = {
&le_driver,
};
int n_netif_drivers = __arraycount(netif_drivers);
#endif
static int punitzero(int, int, int *);
static int
punitzero(int ctlr, int slave, int *punit)
{
*punit = 0;
return 0;
}
#define xxpunit punitzero
#ifndef SUPPORT_TAPE
#define ctpunit xxpunit
#endif
#define rdpunit punitzero
#define sdpunit punitzero
#define lepunit punitzero
struct punitsw punitsw[] = {
{ ctpunit },
{ xxpunit },
{ rdpunit },
{ xxpunit },
{ sdpunit },
{ xxpunit },
{ lepunit },
};
int npunit = __arraycount(punitsw);
struct fs_ops file_system_rawfs[1] = { FS_OPS(rawfs) };
struct fs_ops file_system_ufs[NFSYS_FS] = {
FS_OPS(ffsv1),
#ifdef SUPPORT_UFS2
FS_OPS(ffsv2),
#endif
#ifdef SUPPORT_CD
FS_OPS(cd9660),
#endif
};
struct fs_ops file_system_nfs[1] = { FS_OPS(nfs) };
struct fs_ops file_system[NFSYS_FS];
int nfsys = 1;