diff --git a/sbin/fdisk_pc98/fdisk.c b/sbin/fdisk_pc98/fdisk.c index 8b8ce19f6782..1a87f4f9543e 100644 --- a/sbin/fdisk_pc98/fdisk.c +++ b/sbin/fdisk_pc98/fdisk.c @@ -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)