From owner-freebsd-current Thu Nov 14 6:14:40 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBDAF37B404; Thu, 14 Nov 2002 06:14:37 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id B607B43E42; Thu, 14 Nov 2002 06:14:35 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id BAA18429; Fri, 15 Nov 2002 01:14:25 +1100 Date: Fri, 15 Nov 2002 01:26:59 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Conrad Sabatier Cc: freebsd-current@FreeBSD.ORG, Subject: Re: /dev/acd*t* no longer available in -current? In-Reply-To: Message-ID: <20021115011200.E10490-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 13 Nov 2002, Conrad Sabatier wrote: > Please disregard. I discovered it was just that I was using single-digit > track numbers (e.g., acd0t1), whereas leading-zero numbers were expected > (e.g., acd0t01). > > Sorry 'bout that. :\ > > On 13-Nov-2002 Conrad Sabatier wrote: > > I've been using a homemade CD ripping script under -stable that uses dd > > with the acd0t* devices. Unfortunately, these seem no longer to exist in > > -current, or am I mistaken? > > > > I'm still a bit perplexed by devfs, to be honest. Is there any way to > > create these devices (if they are still supported, that is)? Single-digit track numbers are correct and are still generated by MAKEDEV. The devfs numbers were broken in: % RCS file: /home/ncvs/src/sys/dev/ata/atapi-cd.c,v % Working file: atapi-cd.c % head: 1.126 % ... % ---------------------------- % revision 1.119 % date: 2002/05/28 17:39:17; author: sos; state: Exp; lines: +1 -1 % Use %02d in track numbers, so that 1 is 01, much easier for scripts % ---------------------------- Contrary to the log message, %02d is harder for scripts. It gives many more cases to handle: - %d format under RELENG_4 - %d format under -current in the non-devfs case - %d format under -current even in the devfs case for track numbers >= 100 - %02d under -current in the devfs case for track numbers < 100. The following patch backs out rev.1.119 of atapi-cd.c and fixes the following older devfs bugs in acd: - insecure permissions. Among other holes, these allowed the world to erase cd-rw's. - hard-coded ownerships leading to broken groups for the track devices. %%% Index: atapi-cd.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/atapi-cd.c,v retrieving revision 1.126 diff -u -2 -r1.126 atapi-cd.c --- atapi-cd.c 18 Oct 2002 22:03:34 -0000 1.126 +++ atapi-cd.c 14 Nov 2002 13:10:52 -0000 @@ -282,5 +282,5 @@ dev = make_dev(&acd_cdevsw, dkmakeminor(cdp->lun, 0, 0), - UID_ROOT, GID_OPERATOR, 0644, "acd%d", cdp->lun); + UID_ROOT, GID_OPERATOR, 0640, "acd%d", cdp->lun); make_dev_alias(dev, "acd%da", cdp->lun); make_dev_alias(dev, "acd%dc", cdp->lun); @@ -1330,8 +1330,8 @@ char name[16]; - sprintf(name, "acd%dt%02d", cdp->lun, track); + sprintf(name, "acd%dt%d", cdp->lun, track); entry = malloc(sizeof(struct acd_devlist), M_ACD, M_NOWAIT | M_ZERO); entry->dev = make_dev(&acd_cdevsw, (cdp->lun << 3) | (track << 16), - 0, 0, 0644, name, NULL); + UID_ROOT, GID_OPERATOR, 0640, name, NULL); entry->dev->si_drv1 = cdp->dev->si_drv1; TAILQ_INSERT_TAIL(&cdp->dev_list, entry, chain); %%% Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message