Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <427F5D0D.5030206@byu.net> Date: Mon, 09 May 2005 06:52:29 -0600 From: Eric Blake User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: cygwin AT cygwin DOT com CC: bug-coreutils AT gnu DOT org Subject: Re: DD converts LF -> CR / LF References: <427B1A65 DOT 5060106 AT tu-bs DOT de> <427B258F DOT 90516ACA AT dessent DOT net> <427B70CB DOT 7040101 AT byu DOT net> <87oebo1bfa DOT fsf AT penguin DOT cs DOT ucla DOT edu> <427CDB49 DOT 8030804 AT byu DOT net> <87y8ap92wp DOT fsf AT penguin DOT cs DOT ucla DOT edu> <20050508230338 DOT GB3896 AT trixie DOT casa DOT cgf DOT cx> In-Reply-To: <20050508230338.GB3896@trixie.casa.cgf.cx> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Christopher Faylor on 5/8/2005 5:03 PM: >>Hmm, overriding the explicit advice of the system administrator? How >>common is it for file systems to be mounted in text mode? Why would >>anyone do such a thing? If it's sufficiently rare, then dd shouldn't >>need to worry about it. > > It is not rare but, regardless, this email was the result of someone who > was surprised by the fact that dd converted LF -> CRLF. Whether it is > common or not, I don't think it makes sense to surprise people who use > dd when it is trivial to make it work in a more UNIX-like fashion (i.e., > do not convert LF -> CRLF). The cygwin installer is being changed to more explicitly warn users that text-mode mounts are usually a bad idea. The problem is that the cygwin system administrator is often the primary user, and is often naive about the issues between text vs binary mounts (especially at the point in time when they ran the installer). However, Paul's arguments are starting to convince me (if only because then I have fewer downstream patches to maintain) - respecting the underlying mount point unless told otherwise can also be considered a sensible behavior, and is adopted by several other utilities in coreutils. So long as there is command-line configurability to get both text and binary behaviors (whether that be default binary, iflag=binary is a no-op, and iflag=text always changes behavior; or default from underlying mount, and both iflag=binary and iflag=text potentially change behavior), then a cygwin FAQ can be written that tells the user how to make dd(1) meet expectations (if it really is frequently asked). I guess it comes down to how often is dd used in scripts vs. interactively? Note that this alias would give binary-only behavior in interactive mode even when respecting the underlying mount points: $ alias dd='dd iflag=binary oflag=binary' iflag= is already a coreutils extension beyond POSIX, so this alias relies on parsing multiple iflag= operands in the same way that POSIX requires support for multiple conv= operands. But since iflag= is a POSIX extension, portable scripts that use dd cannot assume its existance, and they will get whichever default behavior we choose (all binary, or underlying mount). - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCf10N84KuGfSFAYARAi9FAKCvTTD43+pDp5euzEfL9ZwWoMRd9wCeK1uM hz2iNl2z2OJYh+me30G3qpQ= =53KA -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/