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] fix ia64 compile
[elogind.git]
/
udevsend.c
diff --git
a/udevsend.c
b/udevsend.c
index 16174f5e466c5674079452e3dc72dddb50613550..dcd5a2ae934ab4620d392e52b93de39bcbfda5ce 100644
(file)
--- a/
udevsend.c
+++ b/
udevsend.c
@@
-43,8
+43,7
@@
/* global variables */
static int sock = -1;
/* global variables */
static int sock = -1;
-#ifdef LOG
-unsigned char logname[LOGNAME_SIZE];
+#ifdef USE_LOG
void log_message (int level, const char *format, ...)
{
va_list args;
void log_message (int level, const char *format, ...)
{
va_list args;
@@
-149,17
+148,18
@@
int main(int argc, char *argv[], char *envp[])
key = envp[i];
keylen = strlen(key);
key = envp[i];
keylen = strlen(key);
- if (bufpos + keylen >= HOTPLUG_BUFFER_SIZE-1) {
- dbg("environment buffer too small, probably not called by the kernel");
- continue;
- }
/* prevent loops in the scripts we execute */
/* prevent loops in the scripts we execute */
- if (strncmp(key, "
MANAGED_EVENT=", 14
) == 0) {
+ if (strncmp(key, "
UDEVD_EVENT=", 12
) == 0) {
dbg("seems that the event source is not the kernel, just exit");
goto exit;
}
dbg("seems that the event source is not the kernel, just exit");
goto exit;
}
+ if (bufpos + keylen >= HOTPLUG_BUFFER_SIZE-1) {
+ dbg("environment buffer too small, probably not called by the kernel");
+ continue;
+ }
+
/* remember the SUBSYSTEM */
if (strncmp(key, "SUBSYSTEM=", 10) == 0)
subsystem = &key[10];
/* remember the SUBSYSTEM */
if (strncmp(key, "SUBSYSTEM=", 10) == 0)
subsystem = &key[10];
@@
-195,10
+195,10
@@
int main(int argc, char *argv[], char *envp[])
dbg("try to start udevd daemon");
retval = start_daemon();
if (retval) {
dbg("try to start udevd daemon");
retval = start_daemon();
if (retval) {
-
info
("error starting daemon");
+
dbg
("error starting daemon");
goto fallback;
}
goto fallback;
}
-
info
("udevd daemon started");
+
dbg
("udevd daemon started");
started_daemon = 1;
} else {
dbg("retry to connect %d", SEND_WAIT_MAX_SECONDS * SEND_WAIT_LOOP_PER_SECOND - loop);
started_daemon = 1;
} else {
dbg("retry to connect %d", SEND_WAIT_MAX_SECONDS * SEND_WAIT_LOOP_PER_SECOND - loop);