chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] udevd race conditions and performance, assorted cleanups - take 2
[elogind.git]
/
udevstart.c
diff --git
a/udevstart.c
b/udevstart.c
index 5c977b5ce65ab0ee92574391d188066814d1329a..eda6355b534e68e6b8cbc4502579255afbe9ab53 100644
(file)
--- a/
udevstart.c
+++ b/
udevstart.c
@@
-29,12
+29,14
@@
#include <ctype.h>
#include <dirent.h>
#include <sys/wait.h>
#include <ctype.h>
#include <dirent.h>
#include <sys/wait.h>
+#include <sys/types.h>
+#include <unistd.h>
#include "logging.h"
#ifdef LOG
#include "logging.h"
#ifdef LOG
-unsigned char logname[
42
];
+unsigned char logname[
LOGNAME_SIZE
];
void log_message(int level, const char *format, ...)
{
va_list args;
void log_message(int level, const char *format, ...)
{
va_list args;
@@
-78,12
+80,11
@@
static void udev_exec(const char *path, const char* subsystem)
}
}
}
}
-static
int
udev_scan(void)
+static
void
udev_scan(void)
{
char *devpath;
DIR *dir;
struct dirent *dent;
{
char *devpath;
DIR *dir;
struct dirent *dent;
- int retval = -EINVAL;
devpath = "block";
dir = opendir(SYSBLOCK);
devpath = "block";
dir = opendir(SYSBLOCK);
@@
-179,17
+180,14
@@
static int udev_scan(void)
}
}
}
}
}
}
-
- if (retval > 0)
- retval = 0;
-
- return -retval;
}
}
-int main(int argc, char *
*argv, char **envp
)
+int main(int argc, char *
argv[], char *envp[]
)
{
init_logging("udevstart");
{
init_logging("udevstart");
- return udev_scan();
+ udev_scan();
+
+ return 0;
}
}