[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFE: hash-type in sum utils

From: Ondrej Oprala
Subject: Re: RFE: hash-type in sum utils
Date: Mon, 30 Jul 2012 08:42:43 -0400 (EDT)

Alright, I've redone it so now the hashes create and expect GNU escaping
 in both the BSD and GNU output format.
I left the --tag format indication of text files to be a space before the algo. 
so far, but I can change that if needed.

----- Original Message -----
From: "Pádraig Brady" <address@hidden>
To: "Ondrej Oprala" <address@hidden>
Cc: address@hidden, "D Yu Bolkhovityanov" <address@hidden>
Sent: Thursday, July 26, 2012 5:50:48 PM
Subject: Re: RFE: hash-type in sum utils

On 07/26/2012 03:06 PM, Ondrej Oprala wrote:
> Sorry but I cant seem to create a filename that would cause md5sum --tag  to
> output escaping different from the BSD's md5. Could you be more specific on 
> the BSD escaping problem, please?
> Also thanks for the formatting patch.

Oops, I assumed BSD's utils would at least escape '\n'
but looking at their code they just output it directly.

So therefore BSD and old GNU don't support checksum files
in BSD format when any file names contain a '\n'. Fair enough.

So then , I suppose we should use the existing GNU escape mechanism
in this case too. I.E. if there is a '\n' character in the name,
then add a '\' at the start of the line and replace any
'\' with "\\" and '\n' with "\" + "n".

BTW, I'm wondering why we enable escaping on output when
there are '\' characters in the name, but no '\n' chars?
Avoiding that would increase compatibility with the BSDs.


Attachment: hash-tag.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]