From owner-freebsd-current Tue Nov 30 9:43:42 1999 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id DEA3215979; Tue, 30 Nov 1999 09:43:32 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (beefcake.zeta.org.au [203.26.10.12]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id EAA05954; Wed, 1 Dec 1999 04:51:19 +1100 Date: Wed, 1 Dec 1999 04:43:05 +1100 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: Thomas Stromberg Cc: "Andrey A. Chernov" , freebsd-current@FreeBSD.ORG Subject: Re: semi-HEADS-UP (dumpon now wants raw disk device) In-Reply-To: <3843F225.34D5E976@rtci.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 30 Nov 1999, Thomas Stromberg wrote: [ache wrote]: > " > > I see no needs of this change. I have -current dumpon/savecore work with > > old entrly like /dev/wd0... > > savecore understand both character and old block devices now. You must not have a very current -current :-). /dev/wd0 is a character device (with the same major/minor and character as /dev/rwd0) in -current: crw-r----- 1 root operator 3, 0x00010002 Dec 1 04:34 rwd0 crw-r----- 1 root operator 3, 0x00010002 Dec 1 04:34 wd0 > [root@karma] dumpon> grep \$FreeBSD dumpon.c > "$FreeBSD: src/sbin/dumpon/dumpon.c,v 1.8 1999/11/28 16:24:46 phk Exp > $"; > [root@karma] dumpon> dumpon /dev/wd0s1b > dumpon: /dev/wd0s1b: must specify a block device > [root@karma] dumpon> dumpon /dev/rwd0s1b > [root@karma] dumpon> > > Bug or Feature? Bug in dumpon. The error message no longer matches the code. I use the following "fix". I changed the code too. dumpon(8) shouldn't be checking whether the file supports the dumpon sysctl. All it needs is a valid st_rdev to pass to the dumpon sysctl. diff -c2 dumpon.c~ dumpon.c *** dumpon.c~ Mon Nov 29 20:09:29 1999 --- dumpon.c Mon Nov 29 20:16:40 1999 *************** *** 85,91 **** } ! if (!S_ISCHR(stab.st_mode)) { ! errx(EX_USAGE, "%s: must specify a block device", ! argv[0]); } } else { --- 85,90 ---- } ! if (!S_ISBLK(stab.st_mode) && !S_ISCHR(stab.st_mode)) { ! errx(EX_USAGE, "%s: must specify a device", argv[0]); } } else { Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message