tree-wide: if get_block_device() returns zero devno, check for it in all cases

And add a comment for the existing cases where things aren't clear
already.
This commit is contained in:
Lennart Poettering
2020-09-08 18:10:26 +02:00
parent 67f0ac8c79
commit d161680e7a
5 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ int quotactl_path(int cmd, const char *path, int id, void *addr) {
r = get_block_device(path, &devno);
if (r < 0)
return r;
if (devno == 0)
if (devno == 0) /* Doesn't have a block device */
return -ENODEV;
return quotactl_devno(cmd, devno, id, addr);