Date: Sat, 5 Oct 2002 16:25:30 -0700 From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: freebsd-current@FreeBSD.ORG Subject: Re: devfs oddity? Message-ID: <20021005232530.GA18034@troutmask.apl.washington.edu> In-Reply-To: <20021005223947.GA17512@troutmask.apl.washington.edu> References: <20021005221611.GA17396@troutmask.apl.washington.edu> <49588.1033856386@critter.freebsd.dk> <20021005223947.GA17512@troutmask.apl.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Oct 05, 2002 at 03:39:47PM -0700, Steve Kargl wrote:
> On Sun, Oct 06, 2002 at 12:19:46AM +0200, Poul-Henning Kamp wrote:
> > In message <20021005221611.GA17396@troutmask.apl.washington.edu>, Steve Kargl w
> > rites:
> > >root[208] cdcontrol play
> > >cdcontrol: no CD device name specified, defaulting to /dev/cd0c
> > >cdcontrol: /dev/cd0cc: No such file or directory
> > >
> > >Why is an extra "c" appended to cd0c?
> >
> > That's not devfs, that's cdcontrol.
> >
> > It should be fixed to use /dev/cd0 and not try to append 'c',
> > there are not, and have probably never been BSD disklabels
> > on enough disks to warrant this hack.
> >
>
> Okay. This just started with a kernel built from
> sources of Friday vintage (without GEOM). My previous
> kernel from Sun Sep 8 08:53:47 PDT 2002 does not have
> this problem. Building and running a kernel in the
> the time between and Sep 8 and new has been an adventure.
>
This appears to fix the problem.
--
Steve
--- cdcontrol.c.orig Sat Oct 5 16:05:23 2002
+++ cdcontrol.c Sat Oct 5 16:07:36 2002
@@ -51,11 +51,7 @@
#define ASTS_VOID 0x15 /* No current audio status to return */
#ifndef DEFAULT_CD_DRIVE
-# define DEFAULT_CD_DRIVE "/dev/cd0c"
-#endif
-
-#ifndef DEFAULT_CD_PARTITION
-# define DEFAULT_CD_PARTITION "c"
+# define DEFAULT_CD_DRIVE "/dev/cd0"
#endif
#define CMD_DEBUG 1
@@ -1249,11 +1245,6 @@
}
fd = open (devbuf, O_RDONLY);
-
- if (fd < 0 && errno == ENOENT) {
- strcat (devbuf, DEFAULT_CD_PARTITION);
- fd = open (devbuf, O_RDONLY);
- }
if (fd < 0) {
if (errno == ENXIO) {
--- cdcontrol.1.orig Sat Oct 5 16:07:57 2002
+++ cdcontrol.1 Sat Oct 5 16:08:53 2002
@@ -37,15 +37,13 @@
Print as much information as possible.
.It Fl f Ar device
Specify a device, such as
-.Pa /dev/cd0c
+.Pa /dev/cd0
or
.Pa mcd0 .
Both absolute path and relative to
.Pa /dev
filename are possible.
Suffix
-.Pa c
-is added to the device name if needed.
.El
.Pp
The available commands are listed below.
@@ -183,10 +181,10 @@
.Ev CDROM .
.El
.Sh FILES
-.Bl -tag -width ".Pa /dev/mcd0c" -compact
-.It Pa /dev/cd0c
-.It Pa /dev/mcd0c
-.It Pa /dev/acd0c
+.Bl -tag -width ".Pa /dev/mcd0" -compact
+.It Pa /dev/cd0
+.It Pa /dev/mcd0
+.It Pa /dev/acd0
.El
.Sh AUTHORS
.An Jean-Marc Zucconi
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?20021005232530.GA18034>
