public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: fabbione@sourceware.org
To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com
Subject: Cluster Project branch, master, updated. cluster-2.99.00-24-gd502ffd
Date: Wed, 07 May 2008 09:21:00 -0000	[thread overview]
Message-ID: <20080507092142.17639.qmail@sourceware.org> (raw)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=d502ffd9b0b02bdc8140973d757eb55bd5d8f7c5

The branch, master has been updated
       via  d502ffd9b0b02bdc8140973d757eb55bd5d8f7c5 (commit)
      from  db35b82b2d5dd4091f9c368d8f7d8b36ad965f78 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d502ffd9b0b02bdc8140973d757eb55bd5d8f7c5
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
Date:   Wed May 7 11:20:57 2008 +0200

    [MISC] Fix even more build errors with Fedora default build options
    
    ... and more to come
    
    Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>

-----------------------------------------------------------------------

Summary of changes:
 dlm/libdlm/libdlm.c               |    6 +++++-
 fence/agents/rackswitch/do_rack.c |   20 ++++++++++++++++----
 fence/fenced/main.c               |    5 ++++-
 fence/libfence/agent.c            |    9 ++++++---
 4 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/dlm/libdlm/libdlm.c b/dlm/libdlm/libdlm.c
index a23eddc..375cd51 100644
--- a/dlm/libdlm/libdlm.c
+++ b/dlm/libdlm/libdlm.c
@@ -370,6 +370,7 @@ static int create_control_device(void)
     int saved_errno = 0;
     mode_t oldmode;
     int done = 0;
+    int rv;
 
     /* Make sure the parent directory exists */
     oldmode = umask(0);
@@ -386,7 +387,10 @@ static int create_control_device(void)
 
     while (!feof(pmisc))
     {
-	fscanf(pmisc, "%d %s\n", &minor, name);
+	
+	rv = fscanf(pmisc, "%d %s\n", &minor, name);
+	if ((rv == EOF) || (rv != 2))
+		break;
 	if (strcmp(name, DLM_CONTROL_DEV) == 0)
 	{
 	    status = mknod(DLM_CTL_DEVICE_NAME, S_IFCHR | 0600, makedev(MISC_MAJOR, minor));
diff --git a/fence/agents/rackswitch/do_rack.c b/fence/agents/rackswitch/do_rack.c
index f7e0349..7c7362f 100644
--- a/fence/agents/rackswitch/do_rack.c
+++ b/fence/agents/rackswitch/do_rack.c
@@ -452,7 +452,10 @@ int main(int argc, char **argv)
   }
   writebuf[sizeof(char)+(strlen(username))+1+(strlen(password))+1] ='\n';
      
-  write(sock,writebuf,sizeof(char)+strlen(username)+strlen(password)+2);
+  if(write(sock,writebuf,sizeof(char)+strlen(username)+strlen(password)+2) < 0) {
+    fprintf(stderr,"failed to write to socket\n");
+    exit(DID_FAILURE);
+  }
    
   /********************************************
    ***
@@ -478,7 +481,10 @@ int main(int argc, char **argv)
  
  writebuf[0] = configuration_request;
  writebuf[1] = config_general;
- write(sock,writebuf,2*(sizeof(char)));
+ if(write(sock,writebuf,2*(sizeof(char))) < 0) {
+   fprintf(stderr,"failed to write to socket\n");
+   exit(DID_FAILURE);
+ }
 
  /********************************************
    ***
@@ -630,7 +636,10 @@ int main(int argc, char **argv)
  writebuf[(pnumb*5)+3] = (char)(pnumb);
  writebuf[(pnumb*5)+4] = action_offon;
 
- write(sock,writebuf,(pnumb*5)+5);
+ if(write(sock,writebuf,(pnumb*5)+5) < 0) {
+   fprintf(stderr,"failed to write to socket\n");
+   exit(DID_FAILURE);
+ }
  if(verbose_flag){
    printf("%s: sending action frame to switch:\n",name);
    for(i=0;i<(pnumb*5)+5;i++) 
@@ -647,7 +656,10 @@ int main(int argc, char **argv)
  writebuf[0] = configuration_request;
  writebuf[1] = boardnum;
  
- write(sock,writebuf,2*(sizeof(char)));
+ if(write(sock,writebuf,2*(sizeof(char))) < 0) {
+   fprintf(stderr,"failed to write to socket\n");
+   exit(DID_FAILURE);
+ }
  if(verbose_flag){
    printf("%s: sending Request Configuration Frame from switch:\n",name);
    printf("0x%.2x 0x%.2x\n",writebuf[0],writebuf[1]);
diff --git a/fence/fenced/main.c b/fence/fenced/main.c
index a94bb85..2201bcc 100644
--- a/fence/fenced/main.c
+++ b/fence/fenced/main.c
@@ -872,7 +872,10 @@ int main(int argc, char **argv)
 			perror("main: cannot fork");
 			exit(EXIT_FAILURE);
 		}
-		chdir("/");
+		if(chdir("/") < 0) {
+			perror("main: unable to chdir");
+			exit(EXIT_FAILURE);
+		}
 		umask(0);
 		openlog("fenced", LOG_PID, LOG_DAEMON);
 	}
diff --git a/fence/libfence/agent.c b/fence/libfence/agent.c
index de8ce11..cc1508a 100644
--- a/fence/libfence/agent.c
+++ b/fence/libfence/agent.c
@@ -99,11 +99,14 @@ static int run_agent(char *agent, char *args)
 		/* child */
 
 		close(1);
-		dup(cw_fd);
+		if (dup(cw_fd) < 0)
+			goto fail;
 		close(2);
-		dup(cw_fd);
+		if (dup(cw_fd) < 0)
+			goto fail;
 		close(0);
-		dup(cr_fd);
+		if (dup(cr_fd) < 0)
+			goto fail;
 		/* keep cw_fd open so parent can report all errors. */
 		close(pr_fd);
 		close(cr_fd);


hooks/post-receive
--
Cluster Project


                 reply	other threads:[~2008-05-07  9:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080507092142.17639.qmail@sourceware.org \
    --to=fabbione@sourceware.org \
    --cc=cluster-cvs@sources.redhat.com \
    --cc=cluster-devel@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).