mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-25 16:13:17 +00:00
Merged from src/sbin/fdisk/fdisk.c revision 1.75.
(Don't prepend "/dev" if an argument given is an absolute pathname.)
This commit is contained in:
parent
1b0ee80834
commit
a7d53c9cae
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136887
@ -289,7 +289,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