]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mount-util: fix error propagation in fd_fdinfo_mnt_id()
authorLennart Poettering <lennart@poettering.net>
Thu, 23 Nov 2017 11:44:17 +0000 (12:44 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 23 Nov 2017 12:28:06 +0000 (13:28 +0100)
src/basic/mount-util.c

index fc7b0b599e5689b107d6e9e4a8d0c081e227c43f..ac072fa0a5ce00f49532e5eced13ee6e4b500103 100644 (file)
@@ -132,7 +132,7 @@ static int fd_fdinfo_mnt_id(int fd, const char *filename, int flags, int *mnt_id
         if (r == -ENOENT) /* The fdinfo directory is a relatively new addition */
                 return -EOPNOTSUPP;
         if (r < 0)
-                return -errno;
+                return r;
 
         p = startswith(fdinfo, "mnt_id:");
         if (!p) {