dvd+rw-format -force problem

From: Melvyn Sopacua (freebsd-stable_at_webteckies.org)
Date: 07/31/03

  • Next message: Paul Civati: "Re: SSH/v1 dead processes bug"
    To: stable@freebsd.org
    Date: Thu, 31 Jul 2003 21:30:00 +0200
    
    

    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@ghost.lan.webteckies.org:/usr/obj/usr/src/sys/GHOST  i386
    =======================================================
    _______________________________________________
    freebsd-stable@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-stable
    To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
    

  • Next message: Paul Civati: "Re: SSH/v1 dead processes bug"

    Relevant Pages

    • Re: onmouseover in IE6 / XP combination?
      ... Although it seems that I have not explained my real problem well enough:) ... > redirect, then opens fine. ... This is normal, due to the redirect, the error sits elsewhere ... I can hardly open my site telling visitors they have to tweak their system for visiting, ...
      (microsoft.public.windowsxp.general)
    • Office 2000/xp WITH PROJECT 2003
      ... whcih has SSL enabled and try to open a word document as attachment it opens ... up with ease.But the real problem is while closing the document.As soon as I ... close the document a client authentication window comes up and says that the ...
      (microsoft.public.office.developer.web.components)
    • Re: ciss driver
      ... The box on 8.0-CURRENT cvsup as of 17 Nov ... Please note that ciss.c does have the same error msg in to different ... The real problem in on amd64 6.2-STABLE cvsup as of Jun 5 which died ... FreeBSD - The Power to Serve! ...
      (freebsd-current)
    • DWF Viewer
      ... but the real problem is when I try to open a ... I have also tried this on aother m/c with the same result. ... If I open an old DWF file (which is larger than what I am producing ... it opens in DWFViewer with no problem. ...
      (comp.cad.autocad)
    • Re: ciss driver
      ... The box on 8.0-CURRENT cvsup as of 17 Nov ... is full of 'kernel: ciss0: SENDING NOP MESSAGE FAILED' coming out of ciss.c line 3139 ... Please note that ciss.c does have the same error msg in to different places ... The real problem in on amd64 6.2-STABLE cvsup as of Jun 5 which died ...
      (freebsd-current)