Skip to contentSkip to conversation

cluster/group/dlm_controld action.c

Cluster-devel [email protected] 1 participant 1 message Jul 14, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rpeterso at sourceware.org 2006-07-14 13:59:01

Modified files:
group/dlm_controld: action.c

Log message:
A printf to stdout was getting redirected to the daemon's socket causing the daemon to log strange errors and mount hangs.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/dlm_controld/action.c.diff?cvsroot=cluster&r1=1.3&r2=1.4

group/dlm_controld/action.c +3 -3
@@ -55,16 +55,16 @@
 
 	fd = open(fname, O_WRONLY);
 	if (fd < 0) {
-		printf("open \"%s\" error %d %d\n", fname, fd, errno);
+		log_error("open \"%s\" error %d %d\n", fname, fd, errno);
 		return -1;
 	}
 
-	printf("write \"%s\" to \"%s\"\n", val, fname);
+	log_debug("write \"%s\" to \"%s\"\n", val, fname);
 
 	len = strlen(val) + 1;
 	rv = write(fd, val, len);
 	if (rv != len) {
-		printf("write %d error %d %d\n", len, rv, errno);
+		log_error("write %d error %d %d\n", len, rv, errno);
 		rv = -1;
 	} else
 		rv = 0;