Date: Fri, 15 Nov 2002 01:26:59 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Conrad Sabatier <conrads@cox.net> Cc: freebsd-current@FreeBSD.ORG, <freebsd-multimedia@FreeBSD.ORG> Subject: Re: /dev/acd*t* no longer available in -current? Message-ID: <20021115011200.E10490-100000@gamplex.bde.org> In-Reply-To: <XFMail.20021113113304.conrads@cox.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021115011200.E10490-100000>
