From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22247 invoked by alias); 27 May 2009 10:20:00 -0000 Received: (qmail 22233 invoked by alias); 27 May 2009 10:19:57 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43,SPF_HELO_PASS X-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43,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 - Remove unused code from various places 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: 207d205a81be6e60cd1891ad0dd20824bf6813ee X-Git-Newrev: f6ef6e42bc9512a5a7d46c1a1be42848cc25ebaa From: Steven Whitehouse Message-Id: <20090527101927.612AA120356@lists.fedorahosted.org> Date: Wed, 27 May 2009 10:20: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/msg00409.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=f6ef6e42bc9512a5a7d46c1a1be42848cc25ebaa Commit: f6ef6e42bc9512a5a7d46c1a1be42848cc25ebaa Parent: 207d205a81be6e60cd1891ad0dd20824bf6813ee Author: Steven Whitehouse AuthorDate: Mon Mar 23 14:21:22 2009 +0000 Committer: Steven Whitehouse CommitterDate: Wed May 27 09:47:14 2009 +0100 Remove unused code from various places The last few #if 0 blocks of code are now gone. Signed-off-by: Steven Whitehouse --- gfs2/mkfs/main.c | 4 ---- gfs2/mount/mount.gfs2.c | 24 ------------------------ gfs2/quota/check.c | 31 ------------------------------- 3 files changed, 0 insertions(+), 59 deletions(-) diff --git a/gfs2/mkfs/main.c b/gfs2/mkfs/main.c index 2707262..9471c6f 100644 --- a/gfs2/mkfs/main.c +++ b/gfs2/mkfs/main.c @@ -42,10 +42,6 @@ main(int argc, char *argv[]) main_mkfs(argc, argv); else if (!strcmp(whoami, "gfs2_grow")) main_grow(argc, argv); -#if 0 - else if (!strcmp(whoami, "gfs2_shrink")) - main_shrink(argc, argv); -#endif else die("I don't know who I am!\n"); diff --git a/gfs2/mount/mount.gfs2.c b/gfs2/mount/mount.gfs2.c index 4ae8bbe..f84dfde 100644 --- a/gfs2/mount/mount.gfs2.c +++ b/gfs2/mount/mount.gfs2.c @@ -155,30 +155,6 @@ static void umount_lockproto(char *proto, struct mount_options *mo, lock_dlm_leave(mo, sb, mnterr); } -#if 0 -static void check_sys_fs(char *fsname) -{ - DIR *d; - struct dirent *de; - - d = opendir("/sys/fs/"); - if (!d) - die("no /sys/fs/ directory found: %d\n", errno); - - while ((de = readdir(d))) { - if (strnlen(fsname, 5) != strnlen(de->d_name, 5)) - continue; - if (!strncmp(fsname, de->d_name, strnlen(fsname, 5))) { - closedir(d); - return; - } - } - closedir(d); - die("fs type \"%s\" not found in /sys/fs/, is the module loaded?\n", - fsname); -} -#endif - int main(int argc, char **argv) { struct mount_options mo; diff --git a/gfs2/quota/check.c b/gfs2/quota/check.c index 118758b..7d1ec5b 100644 --- a/gfs2/quota/check.c +++ b/gfs2/quota/check.c @@ -267,27 +267,6 @@ out: } /** - * print_list - print the contents of an ID list - * @str: a string describing the list - * @list: the list - * - */ - -static void -print_list(const char *str, osi_list_t *list) -{ -#if 0 - osi_list_t *tmp; - values_t *v; - - for (tmp = list->next; tmp != list; tmp = tmp->next) { - v = osi_list_entry(tmp, values_t, v_list); - printf("%s %10u: %"PRId64"\n", str, v->v_id, v->v_blocks); - } -#endif -} - -/** * do_compare - compare to ID lists and see if they match * @type: the type of list (UID or GID) * @fs_list: the list derived from scaning the FS @@ -426,11 +405,6 @@ do_check(struct gfs2_sbd *sdp, commandline_t *comline) scan_fs(device, comline->filesystem, &fs_uid, &fs_gid, &hl); read_quota_file(sdp, comline, &qf_uid, &qf_gid); - print_list("fs user ", &fs_uid); - print_list("fs group", &fs_gid); - print_list("qf user ", &qf_uid); - print_list("qf group", &qf_gid); - mismatch = do_compare("user", &fs_uid, &qf_uid); mismatch |= do_compare("group", &fs_gid, &qf_gid); @@ -565,11 +539,6 @@ do_quota_init(struct gfs2_sbd *sdp, commandline_t *comline) v->v_blocks = 0; osi_list_add(&v->v_list, &qf_gid); - print_list("fs user ", &fs_uid); - print_list("fs group", &fs_gid); - print_list("qf user ", &qf_uid); - print_list("qf group", &qf_gid); - set_list(sdp, comline, TRUE, &qf_uid, 0); set_list(sdp, comline, FALSE, &qf_gid, 0); set_list(sdp, comline, TRUE, &fs_uid, 1);