From e5f161de4f2c35f433657a73445488a22a44fa55 Mon Sep 17 00:00:00 2001 From: silby Date: Sat, 13 Mar 2004 21:20:03 +0000 Subject: Update the rtc device to use dynamic numbering on -current. In order to accomdate this change, stop using device nodes in /usr/compat/linux/dev and instead rely on the linuxalator passing through requests to the real /dev. (This second change also applies to 4.x). --- emulators/rtc/Makefile | 5 ++--- emulators/rtc/files/rtc.c | 3 ++- emulators/rtc/pkg-plist | 5 +---- 3 files changed, 5 insertions(+), 8 deletions(-) (limited to 'emulators') diff --git a/emulators/rtc/Makefile b/emulators/rtc/Makefile index 2eb2ba6..fddb23c 100644 --- a/emulators/rtc/Makefile +++ b/emulators/rtc/Makefile @@ -7,7 +7,7 @@ PORTNAME= rtc PORTVERSION= 2004.02.24.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= emulators linux MASTER_SITES= # none DISTFILES= # none @@ -51,11 +51,10 @@ do-extract: pre-install: ${MKDIR} ${KMODDIR} - ${MKDIR} ${DEVDIR} post-install: ${RM} -f ${DEVDIR}/rtc - mknod ${DEVDIR}/rtc c ${CDEV_MAJOR} 0 + -mknod /dev/rtc c ${CDEV_MAJOR} 0 ${INSTALL_DATA} ${WRKSRC}/rtc.h ${PREFIX}/include/ ${MKDIR} ${PREFIX}/share/examples/rtc ${INSTALL_DATA} ${WRKSRC}/test.c ${PREFIX}/share/examples/rtc/ diff --git a/emulators/rtc/files/rtc.c b/emulators/rtc/files/rtc.c index 8f0407f..3311cd7 100644 --- a/emulators/rtc/files/rtc.c +++ b/emulators/rtc/files/rtc.c @@ -96,6 +96,8 @@ static struct cdevsw rtc_cdevsw = { #if __FreeBSD_version >= 502103 .d_version = D_VERSION, .d_flags = D_NEEDGIANT, +#else + .d_maj = CDEV_MAJOR, #endif .d_open = rtc_open, .d_close = rtc_close, @@ -103,7 +105,6 @@ static struct cdevsw rtc_cdevsw = { .d_poll = rtc_poll, .d_read = rtc_read, .d_name = DEVICE_NAME, - .d_maj = CDEV_MAJOR, #else /* open */ rtc_open, /* close */ rtc_close, diff --git a/emulators/rtc/pkg-plist b/emulators/rtc/pkg-plist index 1e7a517f..b142ef1 100644 --- a/emulators/rtc/pkg-plist +++ b/emulators/rtc/pkg-plist @@ -4,7 +4,4 @@ modules/rtc.ko share/examples/rtc/test.c @dirrm share/examples/rtc @unexec rmdir %D/modules 2>/dev/null || true -@exec rm -f %%DEVDIR%%/rtc -@exec mkdir -p %%DEVDIR%% -@exec mknod %%DEVDIR%%/rtc c %%CDEV_MAJOR%% 0 -@unexec rm -f %%DEVDIR%%/rtc +@unexec rm -f /dev/rtc -- cgit v1.1