From owner-freebsd-bugs@FreeBSD.ORG Thu Jan 22 20:10:02 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89348106568B for ; Thu, 22 Jan 2009 20:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5CDA48FC21 for ; Thu, 22 Jan 2009 20:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n0MKA2l9077538 for ; Thu, 22 Jan 2009 20:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n0MKA2fQ077537; Thu, 22 Jan 2009 20:10:02 GMT (envelope-from gnats) Date: Thu, 22 Jan 2009 20:10:02 GMT Message-Id: <200901222010.n0MKA2fQ077537@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Giorgos Keramidas Cc: Subject: Re: bin/130857: /bin/dd if=/dev/acd0 returned error "invalid parameter" X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Giorgos Keramidas List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2009 20:10:03 -0000 The following reply was made to PR bin/130857; it has been noted by GNATS. From: Giorgos Keramidas To: Tri Brotoharsono 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 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?