summaryrefslogtreecommitdiff
path: root/udevcontrol.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-04-02 04:43:25 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-04-02 04:43:25 +0200
commitc7969cdbcb1f6d39177f6cc2e28597fabe186594 (patch)
tree911ae0237a456f87829aeb689f7e0be8a7b57fb4 /udevcontrol.c
parentc3b145a381090f18c4c5f4149e19183343880ec2 (diff)
also accept real socket files for RUN+="socket:<path>"
Diffstat (limited to 'udevcontrol.c')
-rw-r--r--udevcontrol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/udevcontrol.c b/udevcontrol.c
index 2442a3e0a9..f6b5dd9053 100644
--- a/udevcontrol.c
+++ b/udevcontrol.c
@@ -144,7 +144,7 @@ int udevcontrol(int argc, char *argv[], char *envp[])
saddr.sun_family = AF_LOCAL;
/* use abstract namespace for socket path */
strcpy(&saddr.sun_path[1], UDEVD_CTRL_SOCK_PATH);
- 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]);
retval = sendto(sock, &ctrl_msg, sizeof(ctrl_msg), 0, (struct sockaddr *)&saddr, addrlen);
if (retval == -1) {