diff options
author | Martin Pitt <martinpitt@users.noreply.github.com> | 2017-02-25 12:25:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-25 12:25:27 +0100 |
commit | 40595847183faa0ca66d493d71153163c836cf1d (patch) | |
tree | 7152dd2ef896cb3c6eb809ee933896f4bbdbf5b6 /src/udev/udev-builtin-blkid.c | |
parent | 5a36dddca383ad80fb6eddf7c9cf3347a547ffe0 (diff) | |
parent | dd7e1d62981af11e216fd12817af277a94464803 (diff) |
Merge pull request #5449 from keszybz/blkd-error-handling
blkid error handling
Diffstat (limited to 'src/udev/udev-builtin-blkid.c')
-rw-r--r-- | src/udev/udev-builtin-blkid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/udev-builtin-blkid.c b/src/udev/udev-builtin-blkid.c index 3c58445836..9037aa1304 100644 --- a/src/udev/udev-builtin-blkid.c +++ b/src/udev/udev-builtin-blkid.c @@ -122,7 +122,7 @@ static int find_gpt_root(struct udev_device *dev, blkid_probe pr, bool test) { errno = 0; pl = blkid_probe_get_partitions(pr); if (!pl) - return errno > 0 ? -errno : -ENOMEM; + return -errno ?: -ENOMEM; nvals = blkid_partlist_numof_partitions(pl); for (i = 0; i < nvals; i++) { @@ -193,7 +193,7 @@ static int probe_superblocks(blkid_probe pr) { int rc; if (fstat(blkid_probe_get_fd(pr), &st)) - return -1; + return -errno; blkid_probe_enable_partitions(pr, 1); |