From owner-cvs-all Sat Nov 24 7:11: 0 2001
Delivered-To: cvs-all@freebsd.org
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
by hub.freebsd.org (Postfix) with ESMTP
id ED7B337B417; Sat, 24 Nov 2001 07:10:53 -0800 (PST)
Received: (from dd@localhost)
by freefall.freebsd.org (8.11.4/8.11.4) id fAOFArU27308;
Sat, 24 Nov 2001 07:10:53 -0800 (PST)
(envelope-from dd)
Message-Id: <200111241510.fAOFArU27308@freefall.freebsd.org>
From: Dima Dorfman
Date: Sat, 24 Nov 2001 07:10:53 -0800 (PST)
To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject: cvs commit: src/sys/dev/snp snp.c
X-FreeBSD-CVS-Branch: HEAD
Sender: owner-cvs-all@FreeBSD.ORG
Precedence: bulk
List-ID:
List-Archive: (Web Archive)
List-Help: (List Instructions)
List-Subscribe:
List-Unsubscribe:
X-Loop: FreeBSD.ORG
dd 2001/11/24 07:10:53 PST
Modified files:
sys/dev/snp snp.c
Log:
Create a snpbasedev variable which holds a reference to the first snp
device cloned, and assign all further devices to depend on it. This
allows us to call dev_depends() on it at module unload time to get rid
of /dev/snp* (in the devfs case, anyway). For this to work, we must
not destroy the device at close time. [Idea stolen from if_tun.]
The above has the following sideaffects: (a) The snp device used by
watch(8) will remain after watch(8) exits. This is probably how it
should have been all along, and how it was before devfs came along.
(b) Module unload doesn't panic if there are any /dev/snp* devices
which haven't been used (and thus previously destroyed). Thus, we can
reenable the unload functionality disabled in rev. 1.65.
PR: 32012
Revision Changes Path
1.67 +9 -3 src/sys/dev/snp/snp.c
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message