chiark / gitweb /
move udevmonitor to /usr/sbin
[elogind.git] / udevinitsend.c
index 26ae5c84185b5a18c74793909427d5229961a624..5abf3d4bd33fcd361a1c58f680ae99a31ff8bb72 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * udevinitsend.c
  *
- * Userspace devfs
- *
- * Copyright (C) 2004, 2005 Hannes Reinecke <hare@suse.de>
+ * Copyright (C) 2004, 2005 SuSE Linux Products GmbH
+ * Author:
+ *     Hannes Reinecke <hare@suse.de>
  *
  *     This program is free software; you can redistribute it and/or modify it
  *     under the terms of the GNU General Public License as published by the
@@ -132,11 +132,11 @@ static int udevsend(char *filename, int sock, int disable_loop_detection)
                        strncpy(&usend_msg.envbuf[bufpos],ls,(ch - ls) + 1);
                        bufpos += (ch - ls) + 1;
                        if (ch[1] == '\'' && le[-1] == '\'') {
-                               strncpy(&usend_msg.envbuf[bufpos],ch + 2, (le - ch) -3);
+                               strncpy(&usend_msg.envbuf[bufpos],ch + 2, (le - ch) - 3);
                                bufpos += (le - ch) - 3;
                        } else {
-                               strncpy(&usend_msg.envbuf[bufpos],ch, (le - ch));
-                               bufpos += (le - ch);
+                               strncpy(&usend_msg.envbuf[bufpos],ch + 1, (le - ch) - 1);
+                               bufpos += (le - ch) - 1;
                        }
                        bufpos++;
                }