btrfs-util: tweak error code a bit

This commit is contained in:
Lennart Poettering 2020-05-19 12:11:04 +02:00
parent f8838c6c2f
commit 3468e5ac51

View file

@ -319,7 +319,7 @@ int btrfs_get_block_device_fd(int fd, dev_t *dev) {
return -errno;
if (!S_ISBLK(st.st_mode))
return -ENODEV;
return -ENOTBLK;
if (major(st.st_rdev) == 0)
return -ENODEV;