Cluster Project branch, master, updated. cluster-2.99.00-23-gdb35b82
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".
The branch, master has been updated
via db35b82b2d5dd4091f9c368d8f7d8b36ad965f78 (commit)
from 1edb73bd098500d459c16797da2377a59f1ef180 (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 db35b82b2d5dd4091f9c368d8f7d8b36ad965f78
Author: Fabio M. Di Nitto <[email protected]> Date: Wed May 7 11:03:45 2008 +0200
[MISC] Fix more build errors with Fedora default build options
NOTE: some bits are absolutely not required but we still add them to shut up the warnings.
-----------------------------------------------------------------------
Summary of changes:
ccs/daemon/ccsd.c | 3 ++- cman/cman_tool/join.c | 7 ++++--- cman/cman_tool/main.c | 9 ++++++--- cman/daemon/ais.c | 6 ++++-- cman/daemon/cman-preconfig.c | 8 -------- cman/daemon/cman.h | 2 +- dlm/tool/main.c | 5 ++++- group/daemon/cman.c | 4 ++-- group/daemon/cpg.c | 2 +- group/daemon/main.c | 15 ++++++++++++--- group/dlm_controld/deadlock.c | 10 ++++++++-- group/dlm_controld/main.c | 5 ++++- group/dlm_controld/plock.c | 4 +++- group/gfs_controld/main.c | 5 ++++- group/tool/main.c | 8 ++++++-- 15 files changed, 61 insertions(+), 32 deletions(-)
ccs/daemon/ccsd.c +2 -1
@@ -755,7 +755,8 @@ static void daemonize(void){ } ppid =getppid ();setsid (); -chdir ("/" ); +if (chdir ("/" ) <0 ) + goto fail;umask (0 );close (0 );close (1 );close (2 );
cman/cman_tool/join.c +4 -3
@@ -52,7 +52,7 @@ static void be_daemon(int close_stderr)int join (commandline_t *comline) { -int i; +int i, err;int envptr =0 ;int argvptr =0 ;char scratch[1024 ];
@@ -119,7 +119,8 @@ int join(commandline_t *comline) }/* Create a pipe to monitor cman startup progress */ -pipe (p); +if (pipe (p) <0 ) +die ("unable to create pipe: %s" ,strerror (errno));fcntl (p[1 ],F_SETFD ,0 );/* Don't close on exec */ snprintf (scratch,sizeof (scratch),"CMAN_PIPE=%d" , p[1 ]); envp[envptr++] =strdup (scratch);
@@ -155,7 +156,7 @@ int join(commandline_t *comline)/* exec failed - tell the parent process */ sprintf (scratch,"execve of " AISEXECBIN " failed: %s" ,strerror (errno)); -write (p[1 ], scratch,strlen (scratch)); + err =write (p[1 ], scratch,strlen (scratch));exit (1 );break ;
cman/cman_tool/main.c +6 -3
@@ -526,9 +526,9 @@ static void show_nodes(commandline_t *comline)cman_finish (h); } -static void show_services (void ) +static int show_services (void ) { -system ("group_tool ls" ); +return system ("group_tool ls" ); }
@@ -1052,7 +1052,10 @@ int main(int argc, char *argv[])break ;case OP_SERVICES : -show_services (); +if (show_services () <0 ) { +fprintf (stderr,"Unable to invoke group_tool\n" ); +exit (EXIT_FAILURE ); + }break ;case OP_DEBUG :
cman/daemon/ais.c +4 -2
@@ -336,8 +336,10 @@ static void cman_confchg_fn(enum totem_configuration_type configuration_type,/* Write an error message down the CMAN startup pipe so that cman_tool can display it */ -void write_cman_pipe (char *message) +int write_cman_pipe (char *message) {if (startup_pipe) -write (startup_pipe, message,strlen (message)+1 ); +return write (startup_pipe, message,strlen (message)+1 ); + +return 0 ; }
cman/daemon/cman-preconfig.c +0 -8
@@ -940,11 +940,3 @@ static int cmanpre_readconfig(struct objdb_iface_ver0 *objdb, char **error_strinreturn ret; } - -/* Write an error message down the CMAN startup pipe so -that cman_tool can display it */ -void write_cman_pipe (char *message) -{ -if (startup_pipe) -write (startup_pipe, message,strlen (message)+1 ); -}
cman/daemon/cman.h +1 -1
@@ -11,5 +11,5 @@******************************************************************************/ /* General cman bits */ -extern void write_cman_pipe (char *message); +extern int write_cman_pipe (char *message);extern void close_cman_pipe (void );
dlm/tool/main.c +4 -1
@@ -366,7 +366,10 @@ void do_lockdump(char *name) }/* skip the header on the first line */ -fgets (line,LOCK_LINE_MAX , file); +if (!fgets (line,LOCK_LINE_MAX , file)) { +fprintf (stderr,"can't read %s: %s\n" , path,strerror (errno)); +return ; + }while (fgets (line,LOCK_LINE_MAX , file)) { rv = sscanf(line, "%x %d %x %u %llu %x %x %hhd %hhd %hhd %u %d %d",
group/daemon/cman.c +2 -2
@@ -138,13 +138,13 @@ int setup_cman(void) ch =cman_init (NULL );if (!ch) { -log_print ("cman_init error %d %d" , (int ) ch, errno); +log_print ("cman_init error %p %d" , ch, errno);return -ENOTCONN ; } ch_admin =cman_admin_init (NULL );if (!ch_admin) { -log_print ("cman_admin_init error %d %d" , (int ) ch_admin, errno); +log_print ("cman_admin_init error %p %d" , ch_admin, errno); rv = -ENOTCONN ; goto fail1; }
group/daemon/cpg.c +1 -1
@@ -478,7 +478,7 @@ cpg_callbacks_t callbacks = {void process_cpg (int ci) { -group_t *g; +group_t *g =NULL ;cpg_error_t error;cpg_handle_t handle;int found =0 ;
group/daemon/main.c +12 -3
@@ -837,7 +837,10 @@ void daemonize(void)if (pid)exit (EXIT_SUCCESS );setsid (); -chdir ("/" ); +if (chdir ("/" ) <0 ) { +perror ("main: unable to chdir" ); +exit (EXIT_FAILURE ); + }umask (0 );close (0 );close (1 );
@@ -951,8 +954,14 @@ void bail_with_log(int sig)memset (now_ascii,0 ,sizeof (now_ascii));time (&now);sprintf (now_ascii,"%ld" , now); -write (fd, now_ascii,strlen (now_ascii)); -write (fd," groupd segfault log follows:\n" ,30 ); +if (write (fd, now_ascii,strlen (now_ascii)) <0 ) { +perror ("Unable to write" ); +exit (1 ); + } +if (write (fd," groupd segfault log follows:\n" ,30 ) <0 ) { +perror ("Unable to write" ); +exit (1 ); + }close (fd); }else perror (LOG_FILE );
group/dlm_controld/deadlock.c +8 -2
@@ -367,7 +367,10 @@ static int read_debugfs_master(struct lockspace *ls)return -1 ;/* skip the header on the first line */ -fgets (line,LOCK_LINE_MAX , file); +if (!fgets (line,LOCK_LINE_MAX , file)) { +log_error ("Unable to read %s: %d" , path, errno); + goto out; + }while (fgets (line,LOCK_LINE_MAX , file)) {memset (&lock,0 ,sizeof (struct pack_lock ));
@@ -435,7 +438,10 @@ static int read_debugfs_locks(struct lockspace *ls)return -1 ;/* skip the header on the first line */ -fgets (line,LOCK_LINE_MAX , file); +if (!fgets (line,LOCK_LINE_MAX , file)) { +log_error ("Unable to read %s: %d" , path, errno); + goto out; + }while (fgets (line,LOCK_LINE_MAX , file)) {memset (&lock,0 ,sizeof (struct pack_lock ));
group/dlm_controld/main.c +4 -1
@@ -995,7 +995,10 @@ static void daemonize(void)if (pid)exit (EXIT_SUCCESS );setsid (); -chdir ("/" ); +if (chdir ("/" ) <0 ) { +perror ("main: unable to chdir" ); +exit (EXIT_FAILURE ); + }umask (0 );close (0 );close (1 );
group/dlm_controld/plock.c +3 -1
@@ -1569,6 +1569,8 @@ void process_plocks(int ci)return ; } +gettimeofday (&now,NULL ); +memset (&info,0 ,sizeof (info)); rv =do_read (control_fd, &info,sizeof (info));
@@ -1645,7 +1647,7 @@ void process_plocks(int ci) fail: info.rv = rv; -write (control_fd, &info,sizeof (info)); + rv =write (control_fd, &info,sizeof (info)); }void process_saved_plocks (struct lockspace *ls)
group/gfs_controld/main.c +4 -1
@@ -791,7 +791,10 @@ void daemonize(void)if (pid)exit (EXIT_SUCCESS );setsid (); -chdir ("/" ); +if (chdir ("/" ) <0 ) { +perror ("main: unable to chdir" ); +exit (EXIT_FAILURE ); + }umask (0 );close (0 );close (1 );
group/tool/main.c +6 -2
@@ -427,7 +427,7 @@ int do_plock_dump(int argc, char **argv, int fd) rv =do_write (fd, outbuf,sizeof (outbuf));if (rv <0 ) { -printf ("dump write error %d errno %d\n" , rv, errno);; +printf ("dump write error %d errno %d\n" , rv, errno);return -1 ; }
@@ -436,7 +436,11 @@ int do_plock_dump(int argc, char **argv, int fd) rv =read (fd, inbuf,sizeof (inbuf));if (rv <=0 )break ; -write (STDOUT_FILENO , inbuf, rv); + rv =write (STDOUT_FILENO , inbuf, rv); +if (rv <0 ) { +printf ("dump write error %d errno %d\n" , rv, errno); +return -1 ; + } }close (fd);
hooks/post-receive
--
Cluster Project