Package: moreutils
Version: 0.17
Severity: normal

Supposing the fallible user gets a name wrong, this error might 
worsen their confusion:

    % ifdata -ph localhost ; echo $?
    ioctl on localhost: No such device

    0

    % ifdata -ph /dev/modem ; echo $?
    ioctl on /dev/modem: No such device

    0

...'device' being vague, users might wonder if 'localhost'
or '/dev/modem' existed.

The error's true meaning is obvious with a nonsensical device name:

    % ifdata -ph foobar ; echo $?
    ioctl on foobar: No such device
    
    0

Notes:

    1) the error code shouldn't be '0'.

    2) 'ioctl' makes it look like a kernel error.
       If it was kernel error, it would be better to
       catch the error before calling the kernel,
       or if that's unfeasible, to parse the kernel's
       error after the fact.

Suggested revised output:

    % ifdata -ph foobar ; echo $?
    ifdata: error, no such network interface as 'foobar'.
    3

Hope this helps...




-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.16-2-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)

Versions of packages moreutils depends on:
ii  libc6                        2.3.6.ds1-4 GNU C Library: Shared libraries
ii  perl                         5.8.8-6.1   Larry Wall's Practical Extraction 

moreutils recommends no packages.

-- debconf-show failed


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to