From 33f57ea588ed6c094d754fa6d0b579c54d112b6c Mon Sep 17 00:00:00 2001 From: Maxim Sobolev Date: Tue, 26 Oct 2004 14:06:06 +0000 Subject: Improve compatibility with 4.x, particularly: o Don't use devinfo(8) in startup script, since it doesn't exist on 4.x. Use pciinfo(8) instead. o In zaptel driver don't require a specific major on the 5.x system that support auto major numbering; o Assign specific majors to wcfxs and wcfxo drivers on systems that don't support auto major numbering; o Ensure that nodes are created properly on non-devfs systems. --- misc/zaptel/files/patch-zaptel::zaptel.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 misc/zaptel/files/patch-zaptel::zaptel.c (limited to 'misc/zaptel/files/patch-zaptel::zaptel.c') diff --git a/misc/zaptel/files/patch-zaptel::zaptel.c b/misc/zaptel/files/patch-zaptel::zaptel.c new file mode 100644 index 000000000000..a5fc0b4cf7d9 --- /dev/null +++ b/misc/zaptel/files/patch-zaptel::zaptel.c @@ -0,0 +1,26 @@ + +$FreeBSD$ + +--- zaptel/zaptel.c ++++ zaptel/zaptel.c +@@ -156,12 +156,17 @@ + #endif + + static struct cdevsw zt_devsw = { +-#if __FreeBSD_version >= 502103 ++#if __FreeBSD_version < 502103 ++#ifdef MAJOR_AUTO ++ .d_maj = MAJOR_AUTO, ++#else ++ .d_maj = ZT_MAJOR, ++#endif ++#else + .d_version = D_VERSION, + #endif + .d_open = ztopen, +- .d_name = "zaptel", +- .d_maj = ZT_MAJOR ++ .d_name = "zaptel" + }; + + -- cgit v1.2.3