diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-09-07 19:01:41 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-09-08 18:10:26 +0200 |
commit | d161680e7afb7ae01593ffc5deb6c02bbc08ed19 (patch) | |
tree | 44085f1277d8de936648d3099a875b907c86182d /src/volatile-root | |
parent | btrfs: if BTRFS_IOC_DEV_INFO returns /dev/root generate a friendly error message (diff) | |
download | systemd-d161680e7afb7ae01593ffc5deb6c02bbc08ed19.tar.xz systemd-d161680e7afb7ae01593ffc5deb6c02bbc08ed19.zip |
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.
Diffstat (limited to 'src/volatile-root')
-rw-r--r-- | src/volatile-root/volatile-root.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/volatile-root/volatile-root.c b/src/volatile-root/volatile-root.c index e55864d6cc..6a08464245 100644 --- a/src/volatile-root/volatile-root.c +++ b/src/volatile-root/volatile-root.c @@ -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); |