chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
udevinfo: add DRIVER==
[elogind.git]
/
udevmonitor.c
diff --git
a/udevmonitor.c
b/udevmonitor.c
index 805790233f4a9f5c6b24d52606ee6ecfaa19383f..d3d9050dca8ae42682f829dcbd038a876b432e3c 100644
(file)
--- a/
udevmonitor.c
+++ b/
udevmonitor.c
@@
-21,6
+21,7
@@
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
+#include <stddef.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
@@
-29,12
+30,11
@@
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/select.h>
+#include <linux/types.h>
#include <linux/netlink.h>
#include "udev.h"
#include "udevd.h"
#include <linux/netlink.h>
#include "udev.h"
#include "udevd.h"
-#include "udev_utils.h"
-#include "udev_libc_wrapper.h"
static int uevent_netlink_sock;
static int udev_monitor_sock;
static int uevent_netlink_sock;
static int udev_monitor_sock;
@@
-82,7
+82,7
@@
static int init_uevent_netlink_sock(void)
memset(&snl, 0x00, sizeof(struct sockaddr_nl));
snl.nl_family = AF_NETLINK;
snl.nl_pid = getpid();
memset(&snl, 0x00, sizeof(struct sockaddr_nl));
snl.nl_family = AF_NETLINK;
snl.nl_pid = getpid();
- snl.nl_groups =
0xffffffff
;
+ snl.nl_groups =
1
;
uevent_netlink_sock = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT);
if (uevent_netlink_sock == -1) {
uevent_netlink_sock = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT);
if (uevent_netlink_sock == -1) {
@@
-156,7
+156,7
@@
int main(int argc, char *argv[])
"and the event which udev sends out after rule processing [UDEV]\n\n");
while (!udev_exit) {
"and the event which udev sends out after rule processing [UDEV]\n\n");
while (!udev_exit) {
-
static
char buf[UEVENT_BUFFER_SIZE*2];
+ char buf[UEVENT_BUFFER_SIZE*2];
ssize_t buflen;
int fdcount;
struct timeval tv;
ssize_t buflen;
int fdcount;
struct timeval tv;