All of lore.kernel.org
 help / color / mirror / Atom feed
From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/group/daemon main.c
Date: 1 Dec 2006 15:24:49 -0000	[thread overview]
Message-ID: <20061201152449.1388.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland at sourceware.org	2006-12-01 15:24:49

Modified files:
	group/daemon   : main.c 

Log message:
	group_tool dump doesn't handle partial reads/writes,
	now we always dump entire fixed size debug buffer
	bz 214540

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/daemon/main.c.diff?cvsroot=cluster&r1=1.54&r2=1.55

--- cluster/group/daemon/main.c	2006/11/17 16:26:34	1.54
+++ cluster/group/daemon/main.c	2006/12/01 15:24:48	1.55
@@ -551,25 +551,24 @@
 
 static int do_dump(int fd)
 {
-	int rv, len;
+	int rv, len = DUMP_SIZE;
 
 	if (dump_wrap) {
 		len = DUMP_SIZE - dump_point;
-		rv = write(fd, dump_buf + dump_point, len);
-		if (rv != len)
-			log_print("write error %d errno %d", rv, errno);
-	}
-	len = dump_point;
-
-	rv = write(fd, dump_buf, len);
-	if (rv != len)
-		log_print("write error %d errno %d", rv, errno);
+		rv = do_write(fd, dump_buf + dump_point, len);
+		if (rv < 0)
+			log_print("dump write error %d errno %d", rv, errno);
+		len = dump_point;
+	}
+
+	rv = do_write(fd, dump_buf, len);
+	if (rv < 0)
+		log_print("dump write error %d errno %d", rv, errno);
 	return 0;
 }
 
 static int do_log(int fd, const char *comment)
 {
-
 	log_print("%s", comment);
 	return 0;
 }
@@ -673,7 +672,7 @@
 		break;
 
 	default:
-		log_print("unknown action %d client %d bytes %d", act, ci, rv);
+		log_print("unknown action %d client %d", act, ci);
 		log_print("invalid message: \"%s\"", buf);
 	}
 }



             reply	other threads:[~2006-12-01 15:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-01 15:24 teigland [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-01-11 17:59 [Cluster-devel] cluster/group/daemon main.c teigland
2007-01-11 17:59 teigland
2006-12-13 19:05 teigland
2006-12-13 19:05 teigland
2006-12-13 19:04 teigland
2006-12-01 15:25 teigland
2006-12-01 15:25 teigland
2006-11-20 22:44 rpeterso
2006-11-17 16:28 teigland
2006-11-17 16:26 teigland
2006-11-15 14:35 teigland
2006-10-24 17:08 teigland
2006-10-20 15:42 rpeterso
2006-09-14 20:49 teigland
2006-07-13 18:21 teigland
2006-06-22 19:06 teigland
2006-06-20 20:27 teigland
2006-06-14 21:38 teigland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061201152449.1388.qmail@sourceware.org \
    --to=teigland@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.