`fdisk -l /dev/foobar' gives no error.
Bug #210883 reported by
Ralph Corderoy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
util-linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: util-linux
Ubuntu 7.10. Package util-linux 2.13-8ubuntu1.
`fdisk -l /dev/foobar' doesn't complain if foobar doesn't exist, nor does it set the exit status to non-zero.
$ ls -l /dev/foobar
ls: /dev/foobar: No such file or directory
$ fdisk -l /dev/foobar
$ echo $?
0
$ sudo fdisk -l /dev/foobar
[sudo] password for ralph:
$ echo $?
0
$
I'm aware of bug #73811, and believe that to be a valid bug, however this is a different case. It doesn't involve being root or not. It seems fdisk's -l command line processing is flawed in several ways and needs an overhaul.
To post a comment you must log in.
Setting to Confirmed because I've given an easy means to re-create it.