dvd+rw-format -force problem
Melvyn Sopacua
freebsd-stable at webteckies.org
Thu Jul 31 12:30:26 PDT 2003
Hi,
I haven't felt the need to fully blank a DVD+RW for a while untill today. In
between the last time and now, I both did a cvsup of STABLE and the port of
sysutils/dvd+rw-tools was upgraded. Hence - I'm not sure which could be
contributed to the cause.
The problem is the following:
When issuing:
dvd+rw-format -force /dev/cd0c
it fails, with 'unable to unmount' error.
A little tracing in the source, shows that the following patch, will work -
but is a not-so-pretty work-around:
--- transport.hxx.orig Fri Jul 11 12:57:00 2003
+++ transport.hxx Thu Jul 31 21:05:07 2003
@@ -483,8 +483,15 @@
struct statfs *mntbuf;
int ret=0,mntsize,i;
- if (f==-1) f=fd;
-
+ if (f==-1)
+ {
+ f=fd;
+ if (f==-1)
+ {
+ f = open(filename, O_RDONLY|O_NONBLOCK);
+ fd = f;
+ }
+ }
if (fstat (f,&fsb) < 0) return -1;
if ((mntsize=getmntinfo(&mntbuf,MNT_NOWAIT))==0)return -1;
The real problem here, is that the author expects, that whenever cmd.umount()
is called without argument, fd is available.
Looking at the associate method, it only opens fd if a struct stat is given,
which the code in dvd+rw-format.cpp:main does not do. As far as I can tell,
the other methods called before the call to umount, also do not open fd.
Can anybody tell wether the author's expectation is wrong, or whether there's
some other bug, since I'm not too farmiliar with both hardware programming as
c++?
--
Melvyn
=======================================================
FreeBSD ghost.lan.webteckies.org 4.8-STABLE FreeBSD 4.8-STABLE #1: Tue Jul 22
23:53:48 CEST 2003
root at ghost.lan.webteckies.org:/usr/obj/usr/src/sys/GHOST i386
=======================================================
More information about the freebsd-stable
mailing list