Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jan 2009 20:10:02 GMT
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/130857: /bin/dd if=/dev/acd0 returned error "invalid parameter"
Message-ID:  <200901222010.n0MKA2fQ077537@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/130857; it has been noted by GNATS.

From: Giorgos Keramidas <keramida@freebsd.org>
To: Tri Brotoharsono <mail@tribrotoharsono.net>
Cc: bug-followup@freebsd.org
Subject: Re: bin/130857: /bin/dd if=/dev/acd0 returned error "invalid  parameter"
Date: Thu, 22 Jan 2009 22:05:31 +0200

 On Thu, 22 Jan 2009 14:22:09 +0700, Tri Brotoharsono <mail@tribrotoharsono.net> wrote:
 > Giorgos Keramidas wrote:
 > : :
 > : : Invoking command /bin/dd with input file CDROM device file returned
 > : : invalid parameter
 > : :
 > : : Example:
 > : : # dd if=/dev/acd0 of=dd.iso
 > : : dd: /dev/acd0: Invalid argument
 > : : 0+0 records in
 > : : 0+0 records out
 > : : 0 bytes transferred in 0.000080 secs (0 bytes/sec)
 > : : #
 > : :
 > : :
 > : : --- dd.c    2009-01-22 12:27:26.000000000 +0700
 > : : +++ dd.c.orig    2009-01-22 12:27:17.000000000 +0700
 > : : @@ -121,7 +121,7 @@
 > : :          in.name = "stdin";
 > : :          in.fd = STDIN_FILENO;
 > : :      } else {
 > : : -        in.fd = open(in.name, O_RDONLY);
 > : : +        in.fd = open(in.name, O_RDONLY, 0);
 > : :          if (in.fd == -1)
 > : :              err(1, "%s", in.name);
 > : :      }
 > :
 > : Are you sure this fixes the problem?  I seem to recall audio CD-ROMs
 > : needs a different block size in dd.  Maybe this is why the original
 > : invocation failed?
 >
 > Oh, my mistake. You are right. I am not noticed my bs=2048 parameter,
 > without bs=2048 still returned error, I think the differences with man
 > open(2) which triggered this error.
 
 Hi Tri,
 
 So, if you use the patched dd version with open(in.name, O_RDONLY, 0)
 then the bs=2048 is not needed, and dd works with your CD-ROM disk?
 
 That would be a bit odd.
 
 > Note: Sorry replying with this address, but my original address denied
 > by mx1.freebsd.org due misconfiguration at my mail server.
 
 That's fine, don't worry about it.  As long as the subject is there and
 we can correlate the message with the original bug, all is well.
 
   * If you still think we should patch dd with the change, let me know.
 
   * If you think it's ok to leave it unmodified, and use bs=2048 should
     be recommended, we can document this in the manpage and close the
     problem report.
 
 How should we proceed with this?
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901222010.n0MKA2fQ077537>