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:
@@ -175,7 +175,7 @@ static int run(int argc, char *argv[]) {
|
||||
r = get_block_device_harder(path, &devt);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to determine device major/minor of %s: %m", path);
|
||||
else if (r > 0) {
|
||||
else if (r > 0) { /* backed by block device */
|
||||
_cleanup_free_ char *dn = NULL;
|
||||
|
||||
r = device_path_make_major_minor(S_IFBLK, devt, &dn);
|
||||
|
||||
Reference in New Issue
Block a user