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: Pádraig Brady
Subject: Re: [bug] dd: misleading "invalid argument" for a filename
Date: Sat, 05 Dec 2009 15:06:57 +0000
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

Maciej Pilichowski wrote:
> Hello,
> 
>   I am trying to copy data using dd as in this example:
> 
> dd if=myfile of=/dev/null bs=16M iflag=direct
> 
>   The file exists, the filename is correct, the access is granted, in 
> short -- everything is OK. 
> 
>   Yet, dd shows an error:
> dd: opening `myfile': Invalid argument
> 
>   It is misleading, the quoted argument is fine. When I remove iflag, 
> it works. IOW -- argument is valid, only the given flags cannot be 
> applied.
> 
> 
> PLEASE keep me in CC while replying because I am not subscriber to 
> this ML. Thank you.

I see the ambiguity but changing that is problematic as the
"Invalid argument" bit is just the generic text corresponding to
EINVAL which is being returned by the system. If the system had returned
ENOTSUP instead ("Operation not supported") then it would
have been clearer.  For portability and maintainability reasons
we can't really be reinterpreting the errors from the system
given the combinations of inputs and the differences
between systems.

cheers,
Pádraig.




reply via email to

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