chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-rtnl: message - allow checking for attributes without reading out their contents
[elogind.git]
/
src
/
udev
/
collect
/
collect.c
diff --git
a/src/udev/collect/collect.c
b/src/udev/collect/collect.c
index 4ecb6b0d19158cefae5366febcb86e4d9edc8008..90df360eb2b5ec110f1fc5e420250eb389072ca2 100644
(file)
--- a/
src/udev/collect/collect.c
+++ b/
src/udev/collect/collect.c
@@
-86,12
+86,12
@@
static void usage(void)
*/
static int prepare(char *dir, char *filename)
{
*/
static int prepare(char *dir, char *filename)
{
- struct stat statbuf;
char buf[512];
char buf[512];
- int fd;
+ int
r,
fd;
- if (stat(dir, &statbuf) < 0)
- mkdir(dir, 0700);
+ r = mkdir(dir, 0700);
+ if (r < 0 && errno != EEXIST)
+ return -errno;
snprintf(buf, sizeof(buf), "%s/%s", dir, filename);
snprintf(buf, sizeof(buf), "%s/%s", dir, filename);
@@
-254,7
+254,7
@@
static void reject(char *us)
* kickout
*
* Remove all IDs in the internal list which are not part
* kickout
*
* Remove all IDs in the internal list which are not part
- * of the list passed via the commandline.
+ * of the list passed via the command
line.
*/
static void kickout(void)
{
*/
static void kickout(void)
{