bug-coreutils
[Top][All Lists]
Advanced

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

Re: [bug] dd: misleading "invalid argument" for a filename


From: Alan Curry
Subject: Re: [bug] dd: misleading "invalid argument" for a filename
Date: Sat, 5 Dec 2009 19:55:13 -0500 (GMT+5)

=?ISO-8859-2?Q?P=E1draig_Brady?= writes:
> 
> Maciej Pilichowski wrote:
> > Hello,
> > 
> >> Pádraig Brady:
> >>
> >> For portability and maintainability reasons
> >> we can't really be reinterpreting the errors 
> > 
> > No, I didn't mean that -- I mean the first part. Instead of indicating 
> > the invalid argument was filename, point out that the flag was the 
> > cause. Something like this:
> > 
> > dd: iflag=direct: Invalid argument
> > 
> > Of course if it is possible
> 
> The error is being issued from open("name", flags);
> So it's not really possible to reinterpret EINVAL
> to the above output for the reasons mentioned previously.

Theoretically, you could print the entire open() call, strace-style, to make
it clear that there is more than one argument that might be invalid, and the
user is required to guess which one it was. That would make the user
interface just like the kernel interface: not misleading, just frustratingly
non-specific.





reply via email to

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