From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OSEmX-0002SP-8h for mharc-grub-devel@gnu.org; Fri, 25 Jun 2010 15:41:45 -0400 Received: from [140.186.70.92] (port=45152 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSEmT-0002Q9-IB for grub-devel@gnu.org; Fri, 25 Jun 2010 15:41:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OSEmS-0005tn-Am for grub-devel@gnu.org; Fri, 25 Jun 2010 15:41:41 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:37382) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OSEmS-0005sc-6D for grub-devel@gnu.org; Fri, 25 Jun 2010 15:41:40 -0400 Received: by mail-bw0-f41.google.com with SMTP id 4so3515640bwz.0 for ; Fri, 25 Jun 2010 12:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type; bh=vclU8UMsqiMD3H7K3Ehv6iGXIUQ3y8qNSoMv+d0f8ik=; b=vX5w1pH5FIOa0OUqGXlMjrNf72W6PgZm8Lm/rILBtwR6RHnTrhkCUH+Rvmn/ZG6Ycx RMHC2eLMvNtexUlQV0xr1GFIyb63hqhMDW46h5aOwBLV18oM0gW3JuXBAFYIIae30ae6 djYDeVkrO3bosn0lGLkKNT4r8+YbA9qBMUiuk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=gUJE3IHfb/cHRLhBJ6clo3/gVVG0jwcCnf/gJRRk2/aRzw9d43ZSRne4qNtZJU8dEp nxReuz7oSZRfqWXdIuzN05uylNGr5dE6R71B6sjqpPvjIE5uCYy7zDAh+9TizcdZ7PKt tatbXHDyZCHxk2eA9eZyOyds3IxPxL1fwR6M4= Received: by 10.204.81.230 with SMTP id y38mr841931bkk.119.1277494893393; Fri, 25 Jun 2010 12:41:33 -0700 (PDT) Received: from debian.bg45.phnet ([81.62.156.217]) by mx.google.com with ESMTPS id u9sm3712443bkf.5.2010.06.25.12.41.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 25 Jun 2010 12:41:32 -0700 (PDT) Message-ID: <4C24FAA0.5060303@gmail.com> Date: Fri, 25 Jun 2010 20:51:12 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100515 Icedove/3.0.4 MIME-Version: 1.0 To: grub-devel@gnu.org References: <20100618183408.12015.77315.reportbug@feather> <20100620221937.GS12396@riva.ucam.org> In-Reply-To: <20100620221937.GS12396@riva.ucam.org> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig5FB2B8F541FC4B33D97ED5BE" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Bug#586358: grub-pc: Please handle DOS line endings in "cat" X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jun 2010 19:41:42 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5FB2B8F541FC4B33D97ED5BE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > > On Fri, Jun 18, 2010 at 11:34:08AM -0700, Josh Triplett wrote: > =20 >> The "cat" command, if given a file with DOS line endings, will show th= e >> \r at the end of every line as a control character. For convenience, >> please consider adding support for this in "cat", ideally automaticall= y. >> =20 > Makes sense to me. grub-devel, how about this patch? > > =20 Unconditionaly stripping \r is a bad idea because sometimes cat in grub is used to determine why the system fails to boot. And if by a stupid action fstab becomes DOS-formated 'cat /etc/fstab' will fail to show this important point. But it's ok to add an option for cat'ing DOS files. In this case we probably need to mark unix newlines somehow to detect a reverse problem > 2010-06-20 Colin Watson > > * commands/cat.c (grub_cmd_cat): Print DOS "\r\n" line endings as > simple newlines. > > =3D=3D=3D modified file 'commands/cat.c' > --- commands/cat.c 2010-03-01 19:24:34 +0000 > +++ commands/cat.c 2010-06-20 22:11:37 +0000 > @@ -54,6 +54,11 @@ grub_cmd_cat (grub_command_t cmd __attri > =20 > if ((grub_isprint (c) || grub_isspace (c)) && c !=3D '\r') > grub_putchar (c); > + else if (c =3D=3D '\r' && buf[i + 1] =3D=3D '\n') > + { > + grub_putchar ('\n'); > + i++; > + } > else > { > grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT); > > Thanks, > > =20 --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig5FB2B8F541FC4B33D97ED5BE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAkwk+qAACgkQNak7dOguQgmrEgD+J4K2o51JvkgsAT1FwhedCVcx NWSnmWWmttz58CESMW0BAJqhPjNy7mT6RT/33M/xCIcxY1Hn71GNMJHK99mwB7ue =poin -----END PGP SIGNATURE----- --------------enig5FB2B8F541FC4B33D97ED5BE--