projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1949655
)
stat-util: fix fd_is_network_ns()
author
Lennart Poettering
<lennart@poettering.net>
Fri, 23 Mar 2018 08:47:04 +0000
(09:47 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 23 Mar 2018 14:29:35 +0000
(15:29 +0100)
This was broken in
77f9fa3b8ea46c27e5a5e9270f71bf1b4000c3e0
. My fault.
Fixes: #8543
src/basic/stat-util.c
patch
|
blob
|
history
diff --git
a/src/basic/stat-util.c
b/src/basic/stat-util.c
index
3689f6e
..
6770594
100644
(file)
--- a/
src/basic/stat-util.c
+++ b/
src/basic/stat-util.c
@@
-254,7
+254,8
@@
int fd_is_network_ns(int fd) {
if (r <= 0)
return r;
- if (ioctl(fd, NS_GET_NSTYPE) < 0)
+ r = ioctl(fd, NS_GET_NSTYPE);
+ if (r < 0)
return -errno;
return r == CLONE_NEWNET;