mirror of
https://github.com/systemd/systemd.git
synced 2026-07-26 11:20:26 +00:00
sd-device: use fd_reopen() at one more place
It provides recognizable error if /proc is not mounted.
This commit is contained in:
committed by
Daan De Meyer
parent
3fab44b2ff
commit
83b94cf10e
@@ -2442,9 +2442,9 @@ _public_ int sd_device_open(sd_device *device, int flags) {
|
||||
}
|
||||
}
|
||||
|
||||
fd2 = open(FORMAT_PROC_FD_PATH(fd), flags);
|
||||
fd2 = fd_reopen(fd, flags);
|
||||
if (fd2 < 0)
|
||||
return -errno;
|
||||
return fd2;
|
||||
|
||||
if (diskseq == 0)
|
||||
return TAKE_FD(fd2);
|
||||
|
||||
Reference in New Issue
Block a user