chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f3e219a
)
sd-daemon: Fix path check in sd_is_fifo()
author
Martin Mikkelsen
<mamikk@mamikk.no>
Tue, 6 Jul 2010 21:27:56 +0000
(23:27 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 6 Jul 2010 23:41:59 +0000
(
01:41
+0200)
sd_is_fifo() did fstat on the file descriptor twice instead of stating
the supplied path.
src/sd-daemon.c
patch
|
blob
|
history
diff --git
a/src/sd-daemon.c
b/src/sd-daemon.c
index cb568b5e65194a08ea088d8bf03e60f7c1095220..5df70e38d524d2f5866c31f54eb84e854761d941 100644
(file)
--- a/
src/sd-daemon.c
+++ b/
src/sd-daemon.c
@@
-141,7
+141,7
@@
int sd_is_fifo(int fd, const char *path) {
struct stat st_path;
memset(&st_path, 0, sizeof(st_path));
- if (
fstat(fd
, &st_path) < 0) {
+ if (
stat(path
, &st_path) < 0) {
if (errno == ENOENT || errno == ENOTDIR)
return 0;