From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25534 invoked by alias); 11 May 2009 15:13:55 -0000 Received: (qmail 25442 invoked by alias); 11 May 2009 15:13:54 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion2.fedora.phx.redhat.com Subject: cluster: STABLE3 - gfs_controld: fix const warnings To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/STABLE3 X-Git-Reftype: branch X-Git-Oldrev: f1c2841963d575d066112934340de2e3915369f4 X-Git-Newrev: 13fefa51c93282e983de3fd66fb7784b46d699e1 From: David Teigland Message-Id: <20090511151310.BE0C7120214@lists.fedorahosted.org> Date: Mon, 11 May 2009 15:13:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q2/txt/msg00261.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=13fefa51c93282e983de3fd66fb7784b46d699e1 Commit: 13fefa51c93282e983de3fd66fb7784b46d699e1 Parent: f1c2841963d575d066112934340de2e3915369f4 Author: Fabio M. Di Nitto AuthorDate: Wed May 6 09:24:13 2009 +0200 Committer: David Teigland CommitterDate: Mon May 11 10:05:06 2009 -0500 gfs_controld: fix const warnings Signed-off-by: Fabio M. Di Nitto --- group/gfs_controld/config.c | 6 +++--- group/gfs_controld/cpg-new.c | 2 +- group/gfs_controld/cpg-old.c | 4 ++-- group/gfs_controld/gfs_daemon.h | 10 +++++----- group/gfs_controld/main.c | 2 +- group/gfs_controld/plock.c | 6 +++--- group/gfs_controld/util.c | 8 ++++---- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/group/gfs_controld/config.c b/group/gfs_controld/config.c index b6e2ebe..0be26e5 100644 --- a/group/gfs_controld/config.c +++ b/group/gfs_controld/config.c @@ -53,7 +53,7 @@ int cfgd_drop_resources_time = DEFAULT_DROP_RESOURCES_TIME; int cfgd_drop_resources_count = DEFAULT_DROP_RESOURCES_COUNT; int cfgd_drop_resources_age = DEFAULT_DROP_RESOURCES_AGE; -void read_ccs_name(char *path, char *name) +void read_ccs_name(const char *path, char *name) { char *str; int error; @@ -67,7 +67,7 @@ void read_ccs_name(char *path, char *name) free(str); } -void read_ccs_yesno(char *path, int *yes, int *no) +void read_ccs_yesno(const char *path, int *yes, int *no) { char *str; int error; @@ -88,7 +88,7 @@ void read_ccs_yesno(char *path, int *yes, int *no) free(str); } -int read_ccs_int(char *path, int *config_val) +int read_ccs_int(const char *path, int *config_val) { char *str; int val; diff --git a/group/gfs_controld/cpg-new.c b/group/gfs_controld/cpg-new.c index 5fafd61..7d721e8 100644 --- a/group/gfs_controld/cpg-new.c +++ b/group/gfs_controld/cpg-new.c @@ -261,7 +261,7 @@ static void apply_changes_recovery(struct mountgroup *mg); static void send_withdraw_acks(struct mountgroup *mg); static void leave_mountgroup(struct mountgroup *mg, int mnterr); -static char *msg_name(int type) +static const char *msg_name(int type) { switch (type) { case GFS_MSG_PROTOCOL: diff --git a/group/gfs_controld/cpg-old.c b/group/gfs_controld/cpg-old.c index 666b399..ae553ce 100644 --- a/group/gfs_controld/cpg-old.c +++ b/group/gfs_controld/cpg-old.c @@ -45,7 +45,7 @@ static unsigned int protocol_active[3]; static void send_journals(struct mountgroup *mg, int nodeid); -static char *msg_name(int type) +static const char *msg_name(int type) { switch (type) { case MSG_JOURNAL: @@ -1611,7 +1611,7 @@ int process_recovery_uevent_old(char *name, int jid_done, int status, int first) { struct mountgroup *mg; struct mg_member *memb; - char *ss; + const char *ss; int rv, found = 0; mg = find_mg(name); diff --git a/group/gfs_controld/gfs_daemon.h b/group/gfs_controld/gfs_daemon.h index 4983d79..a76c7f4 100644 --- a/group/gfs_controld/gfs_daemon.h +++ b/group/gfs_controld/gfs_daemon.h @@ -214,9 +214,9 @@ struct mountgroup { /* config.c */ int setup_ccs(void); void close_ccs(void); -void read_ccs_name(char *path, char *name); -void read_ccs_yesno(char *path, int *yes, int *no); -int read_ccs_int(char *path, int *config_val); +void read_ccs_name(const char *path, char *name); +void read_ccs_yesno(const char *path, int *yes, int *no); +int read_ccs_int(const char *path, int *config_val); void read_ccs_nodir(struct mountgroup *mg, char *buf); /* cpg-new.c */ @@ -317,8 +317,8 @@ int setup_misc_devices(void); /* util.c */ int we_are_in_fence_domain(void); -int set_sysfs(struct mountgroup *mg, char *field, int val); -int read_sysfs_int(struct mountgroup *mg, char *field, int *val_out); +int set_sysfs(struct mountgroup *mg, const char *field, int val); +int read_sysfs_int(struct mountgroup *mg, const char *field, int *val_out); int run_dmsetup_suspend(struct mountgroup *mg, char *dev); void update_dmsetup_wait(void); void update_flow_control_status(void); diff --git a/group/gfs_controld/main.c b/group/gfs_controld/main.c index 7198b20..cef2fcd 100644 --- a/group/gfs_controld/main.c +++ b/group/gfs_controld/main.c @@ -984,7 +984,7 @@ static void process_listener(int ci) log_debug("client connection %d fd %d", i, fd); } -static int setup_listener(char *sock_path) +static int setup_listener(const char *sock_path) { struct sockaddr_un addr; socklen_t addrlen; diff --git a/group/gfs_controld/plock.c b/group/gfs_controld/plock.c index 1cff9c4..453aeca 100644 --- a/group/gfs_controld/plock.c +++ b/group/gfs_controld/plock.c @@ -107,7 +107,7 @@ static void info_bswap_in(struct dlm_plock_info *i) i->owner = le64_to_cpu(i->owner); } -static char *op_str(int optype) +static const char *op_str(int optype) { switch (optype) { case DLM_PLOCK_OP_LOCK: @@ -121,7 +121,7 @@ static char *op_str(int optype) } } -static char *ex_str(int optype, int ex) +static const char *ex_str(int optype, int ex) { if (optype == DLM_PLOCK_OP_UNLOCK || optype == DLM_PLOCK_OP_GET) return "-"; @@ -2326,7 +2326,7 @@ static void find_minors(void) log_error("Is lock_dlm or dlm missing from kernel? No misc devices found."); } -static int find_udev_device(char *path, uint32_t minor) +static int find_udev_device(const char *path, uint32_t minor) { struct stat st; int i; diff --git a/group/gfs_controld/util.c b/group/gfs_controld/util.c index a0650fe..400fe81 100644 --- a/group/gfs_controld/util.c +++ b/group/gfs_controld/util.c @@ -47,7 +47,7 @@ int we_are_in_fence_domain(void) #define SYSFS_DIR "/sys/fs" #define SYSFS_BUFLEN 64 -int set_sysfs(struct mountgroup *mg, char *field, int val) +int set_sysfs(struct mountgroup *mg, const char *field, int val) { char fname[PATH_MAX]; char out[SYSFS_BUFLEN]; @@ -78,7 +78,7 @@ int set_sysfs(struct mountgroup *mg, char *field, int val) return rv; } -static int get_sysfs(struct mountgroup *mg, char *field, char *buf, int len) +static int get_sysfs(struct mountgroup *mg, const char *field, char *buf, int len) { char fname[PATH_MAX], *p; int fd, rv; @@ -108,7 +108,7 @@ static int get_sysfs(struct mountgroup *mg, char *field, char *buf, int len) return rv; } -int read_sysfs_int(struct mountgroup *mg, char *field, int *val_out) +int read_sysfs_int(struct mountgroup *mg, const char *field, int *val_out) { char buf[SYSFS_BUFLEN]; int rv; @@ -213,7 +213,7 @@ void update_dmsetup_wait(void) } } -static int ignore_nolock(char *sysfs_dir, char *table) +static int ignore_nolock(const char *sysfs_dir, char *table) { char path[PATH_MAX]; int fd;