[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-ddrescue] Suggestions to rename "logfile"
From: |
Florian Sedivy |
Subject: |
Re: [Bug-ddrescue] Suggestions to rename "logfile" |
Date: |
Thu, 23 Jul 2015 03:18:46 +0200 |
Hello Antonio!
Antonio Diaz Diaz wrote:
>> My proposition is "mapfile" to replace "logfile"
>
> Ok, you have convinced me. I'll prepare rc3 with "mapfile" ASAP.
I feel honored. Time to mention that it was Robert Trevellyan who first
proposed "mapfile".
>> But I am with Adrien and Felix for making it mandatory. This is the
>> one most common error, and it is easy to prevent. I propose to allow
>> a single "-" as 3rd parameter to operate without a logfile. That way
>> the experienced user has only minimal inconvenience when making
>> logless runs.
>
> "minimal inconvenience" is subjective. I, for example, use ddrescue as a
> replacement for dd and find the '--force' option enough of an inconvenience
> that I am sometimes tempted to remove it.
>
> The main reason why I keep '--force' is because it may prevent a catastrophic
> error (overwriting data in the destination drive). But the lack of a logfile
> just can make the rescue longer, and perhaps reduce the amount of data
> rescued, for those who think they are cleverer than the fine manual.
That's why I tried to find something shorter than --no-mapfile to override a
mandatory mapfile. More like a fast trick for the expert, and yes, I also use
ddrescue instead of dd in most cases.
>
> Finally, I think that using a single "-" to mean anything other that reading
> from stdin or writing to stdout is confusing to say the least.
You are completely right, that was a bad idea. So I want to find another
convenient way for the experienced user to run without the mandatory mapfile.
Single character replacements for the mapfile parameter are difficult, because
in POSIX every character except "/" and NUL could theoretically be a filename.
So it must be something, nobody in their right minds would ever want to use as
a filename. Anyway, ddrescue should always show a warning when running without
a mapfile.
"." although possible, this is a valid directory, so it would be a little
bit of a dirty hack
"+" possible, except for a plus-sign being counter-intuitive when actually
leaving something away
"=" why not?
"_" why not?
Double character replacements:
-z or similar bad - anything that looks like an option would be confusing
when used to replace a positional parameter
-- why not? double hyphen is sometimes used to separate options
from positional parameters
"" or '' Passing an empty string to bypass the requirement would be
quite elegant. Only risk is, when you pass an unintentionally empty variable as
mapfile parameter, you might not notice the mistake.
Use an option to make the mapfile optional. Personally I'd prefer a replacement
to an option.
-f, --force bad - should not have any additional meaning
than it has now
-z or similar I don't think this really justifies introducing a new
option
-L, --loose-domain Could nicely serve this second purpose. Users working
with loose domain mapfiles are probably experienced enough not to need the
safeguard of a mandatory mapfile.
Something there you like?
Regards, Florian
- Re: [Bug-ddrescue] Suggestions to rename "logfile", Florian Sedivy, 2015/07/17
- Re: [Bug-ddrescue] Suggestions to rename "logfile", Martin Bittermann, 2015/07/17
- Re: [Bug-ddrescue] Suggestions to rename "logfile", Florian Sedivy, 2015/07/17
- Re: [Bug-ddrescue] Suggestions to rename "logfile", Antonio Diaz Diaz, 2015/07/20
- Re: [Bug-ddrescue] Suggestions to rename "logfile",
Florian Sedivy <=
- Re: [Bug-ddrescue] Suggestions to rename "logfile", Antonio Diaz Diaz, 2015/07/24
- Re: [Bug-ddrescue] Suggestions to rename "logfile", Florian Sedivy, 2015/07/24
- Re: [Bug-ddrescue] Suggestions to rename "logfile", Antonio Diaz Diaz, 2015/07/25
- Re: [Bug-ddrescue] Suggestions to rename "logfile", Scott Dwyer, 2015/07/25
- Re: [Bug-ddrescue] Suggestions to rename "logfile", Antonio Diaz Diaz, 2015/07/25
- Re: [Bug-ddrescue] Suggestions to rename "logfile", Paul L Daniels, 2015/07/24