-/* $OpenBSD: conf.c,v 1.23 2024/06/11 09:21:32 jsg Exp $ */
+/* $OpenBSD: conf.c,v 1.24 2024/06/12 02:50:25 jsg Exp $ */
/*
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
};
int nchrdev = nitems(cdevsw);
+int mem_no = 2; /* major device number of memory special file */
+
/*
* Swapdev is a fake device implemented
* in sw.c used only internally to get to swstrategy.
* confuse, e.g. the hashing routines. Instead, /dev/drum is
* provided as a character (raw) device.
*/
-dev_t swapdev = makedev(BMAJ_SW, 0);
+dev_t swapdev = makedev(1, 0);
/*
* Returns true if dev is /dev/mem or /dev/kmem.
int
iskmemdev(dev_t dev)
{
-
- return (major(dev) == CMAJ_MM && minor(dev) < 2);
+ return (major(dev) == mem_no && minor(dev) < 2);
}
/*
int
iszerodev(dev_t dev)
{
-
- return (major(dev) == CMAJ_MM && minor(dev) == 12);
+ return (major(dev) == mem_no && minor(dev) == 12);
}
dev_t
getnulldev(void)
{
- return makedev(CMAJ_MM, 2);
+ return makedev(mem_no, 2);
}
const int chrtoblktbl[] = {
switch (majdev) {
/* add here any device you want to be checksummed on boot */
- case BMAJ_WD:
- case BMAJ_SD:
+ case 0: /* wd */
+ case 4: /* sd */
return (MAKEDISKDEV(majdev, dv->dv_unit, RAW_PART));
break;
default:
-/* $OpenBSD: conf.h,v 1.4 2022/06/28 14:43:50 visa Exp $ */
+/* $OpenBSD: conf.h,v 1.5 2024/06/12 02:50:25 jsg Exp $ */
/* $NetBSD: conf.h,v 1.2 1996/05/05 19:28:34 christos Exp $ */
/*
cdev_decl(apm);
cdev_decl(acpiapm);
-/*
- * These numbers have to be in sync with bdevsw/cdevsw.
- */
-
-#define BMAJ_WD 0
-#define BMAJ_SW 1
-#define BMAJ_SD 4
-#define BMAJ_ST 5
-
-#define CMAJ_MM 2
-#define CMAJ_PTS 5
-#define CMAJ_PTC 6
-#define CMAJ_COM 8
-#define CMAJ_WSDISPLAY 12
-#define CMAJ_ST 14
-#define CMAJ_LPT 16
-#define CMAJ_CH 17
-#define CMAJ_UK 20
-#define CMAJ_BPF 23
-#define CMAJ_TUN 40
-#define CMAJ_AUDIO 42
-#define CMAJ_VIDEO 44
-#define CMAJ_BKTR 49
-#define CMAJ_MIDI 52
-#define CMAJ_USB 61
-#define CMAJ_UHID 62
-#define CMAJ_UGEN 63
-#define CMAJ_ULPT 64
-#define CMAJ_UCOM 66
-#define CMAJ_WSKBD 67
-#define CMAJ_WSMOUSE 68
-#ifdef USER_PCICONF
-#define CMAJ_PCI 72
-#endif
-#define CMAJ_RADIO 76
-#define CMAJ_DRM 87
-#define CMAJ_GPIO 88
-#define CMAJ_VSCSI 89
-
#endif /* _MACHINE_CONF_H_ */