X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=blobdiff_plain;f=src%2Fbasic%2Fmountpoint-util.c;h=48494320fdb55123e5e9ffa1ba308d728ec82828;hp=1e946a0bb67587e4562f7a7d396ff53da987249a;hb=fdeea3f4f1c0f78f1014582135d047265098fb82;hpb=03abeb0baf7fe97c98a98d745b75c7d33e2f632e diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c index 1e946a0bb67..48494320fdb 100644 --- a/src/basic/mountpoint-util.c +++ b/src/basic/mountpoint-util.c @@ -378,11 +378,9 @@ int dev_is_devtmpfs(void) { if (r < 0) return r; - proc_self_mountinfo = fopen("/proc/self/mountinfo", "re"); - if (!proc_self_mountinfo) - return -errno; - - (void) __fsetlocking(proc_self_mountinfo, FSETLOCKING_BYCALLER); + r = fopen_unlocked("/proc/self/mountinfo", "re", &proc_self_mountinfo); + if (r < 0) + return r; for (;;) { _cleanup_free_ char *line = NULL;