From c7969cdbcb1f6d39177f6cc2e28597fabe186594 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Wed, 2 Apr 2008 04:43:25 +0200 Subject: also accept real socket files for RUN+="socket:" --- udevmonitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'udevmonitor.c') diff --git a/udevmonitor.c b/udevmonitor.c index 75e39481a0..2430dd39a5 100644 --- a/udevmonitor.c +++ b/udevmonitor.c @@ -49,7 +49,7 @@ static int init_udev_monitor_socket(void) saddr.sun_family = AF_LOCAL; /* use abstract namespace for socket path */ strcpy(&saddr.sun_path[1], "/org/kernel/udev/monitor"); - addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(saddr.sun_path+1) + 1; + addrlen = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&saddr.sun_path[1]); udev_monitor_sock = socket(AF_LOCAL, SOCK_DGRAM, 0); if (udev_monitor_sock == -1) { -- cgit v1.2.3-54-g00ecf