[SSI] openssi/udev Makefile, 1.1.15.1, 1.1.15.1.2.1 udevd.c, 1.1.15.2, 1.1.15.2.2.1 udevd.h, 1.1.15.2, 1.1.15.2.2.1 udevsend.c, 1.1.15.1, 1.1.15.1.4.1
Roger Tsang <[email protected]> Mon, 12 Jul 2010 06:10:21 +0000
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/udev
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20338
Modified Files:
Tag: OPENSSI-CENTOS
Makefile udevd.c udevd.h udevsend.c
Log Message:
OpenSSI changes for udev-039-10.29.el4.src.rpm CentOS 4.
Index: Makefile
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/udev/Makefile,v
retrieving revision 1.1.15.1
retrieving revision 1.1.15.1.2.1
diff -u -d -r1.1.15.1 -r1.1.15.1.2.1
--- Makefile 12 Jul 2010 05:55:11 -0000 1.1.15.1
+++ Makefile 12 Jul 2010 06:10:18 -0000 1.1.15.1.2.1
@@ -260,7 +260,7 @@
@echo \#define UDEV_VERSION \"$(VERSION)\" > $@
@echo \#define UDEV_ROOT \"$(udevdir)/\" >> $@
@echo \#define UDEV_DB \"$(udevdir)/.udev.tdb\" >> $@
- @echo \#define UDEV_SETTLE_FILE \"$(udevdir)/.udevsettle\" >> $@
+ @echo \#define UDEV_SETTLE_FILE \"/var/run/.udevsettle\" >> $@
@echo \#define UDEV_CONFIG_DIR \"$(configdir)\" >> $@
@echo \#define UDEV_CONFIG_FILE \"$(configdir)/udev.conf\" >> $@
@echo \#define UDEV_RULES_FILE \"$(configdir)/rules.d\" >> $@
Index: udevd.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/udev/udevd.h,v
retrieving revision 1.1.15.2
retrieving revision 1.1.15.2.2.1
diff -u -d -r1.1.15.2 -r1.1.15.2.2.1
--- udevd.h 12 Jul 2010 05:40:57 -0000 1.1.15.2
+++ udevd.h 12 Jul 2010 06:10:18 -0000 1.1.15.2.2.1
@@ -27,7 +27,7 @@
#define UDEV_MAGIC "udevd_" UDEV_VERSION
#define EVENT_TIMEOUT_SEC 10
#define UDEVSEND_CONNECT_RETRY 20 /* x 100 millisec */
-#define UDEVD_SOCK_PATH "udevd"
+#define UDEVD_SOCK_PATH "/var/run/udevd_sock"
/* maximum limit of forked childs */
#define UDEVD_MAX_CHILDS 256
Index: udevd.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/udev/udevd.c,v
retrieving revision 1.1.15.2
retrieving revision 1.1.15.2.2.1
diff -u -d -r1.1.15.2 -r1.1.15.2.2.1
--- udevd.c 12 Jul 2010 05:40:57 -0000 1.1.15.2
+++ udevd.c 12 Jul 2010 06:10:18 -0000 1.1.15.2.2.1
@@ -641,8 +641,8 @@
memset(&saddr, 0x00, sizeof(saddr));
saddr.sun_family = AF_LOCAL;
/* use abstract namespace for socket path */
- strcpy(&saddr.sun_path[1], UDEVD_SOCK_PATH);
- addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(saddr.sun_path+1) + 1;
+ strcpy(&saddr.sun_path[0], UDEVD_SOCK_PATH);
+ addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(saddr.sun_path) + 1;
ssock = socket(AF_LOCAL, SOCK_DGRAM, 0);
if (ssock == -1) {
@@ -652,6 +652,10 @@
set_cloexec_flag(ssock, 1);
+ /* Clean up stale files */
+ unlink(UDEVD_SOCK_PATH);
+ unlink(UDEV_SETTLE_FILE);
+
/* the bind takes care of ensuring only one copy running */
retval = bind(ssock, (struct sockaddr *) &saddr, addrlen);
if (retval < 0) {
Index: udevsend.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/udev/udevsend.c,v
retrieving revision 1.1.15.1
retrieving revision 1.1.15.1.4.1
diff -u -d -r1.1.15.1 -r1.1.15.1.4.1
--- udevsend.c 4 Jul 2010 20:33:24 -0000 1.1.15.1
+++ udevsend.c 12 Jul 2010 06:10:18 -0000 1.1.15.1.4.1
@@ -165,8 +165,8 @@
memset(&saddr, 0x00, sizeof(struct sockaddr_un));
saddr.sun_family = AF_LOCAL;
/* use abstract namespace for socket path */
- strcpy(&saddr.sun_path[1], UDEVD_SOCK_PATH);
- addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(saddr.sun_path+1) + 1;
+ strcpy(&saddr.sun_path[0], UDEVD_SOCK_PATH);
+ addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(saddr.sun_path) + 1;
memset(&msg, 0x00, sizeof(struct hotplug_msg));
strcpy(msg.magic, UDEV_MAGIC);
@@ -185,7 +185,7 @@
goto exit;
}
- if (errno != ECONNREFUSED) {
+ if (errno != ECONNREFUSED && errno != ENOENT) {
dbg("error sending message");
goto fallback;
}
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first