Don't prepend "/dev" if an argument given is an absolute pathname.
Reviewed by: jhb
This commit is contained in:
parent
54df531327
commit
26cd344960
@ -302,7 +302,7 @@ main(int argc, char *argv[])
|
||||
if (stat(argv[0], &sb) == 0) {
|
||||
/* OK, full pathname given */
|
||||
disk = argv[0];
|
||||
} else if (errno == ENOENT) {
|
||||
} else if (errno == ENOENT && argv[0][0] != '/') {
|
||||
/* Try prepending "/dev" */
|
||||
asprintf(&disk, "%s%s", _PATH_DEV, argv[0]);
|
||||
if (disk == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user