From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24893 invoked by alias); 23 Mar 2009 14:27:47 -0000 Received: (qmail 24852 invoked by alias); 23 Mar 2009 14:27:47 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43,SPF_HELO_PASS X-Spam-Status: No, hits=-1.5 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 bastion.fedora.phx.redhat.com Subject: gfs2-utils: master - Remove unused code from various places To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: gfs2-utils.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 3854b581d2eadae184be8fce3948523d2f5160b9 X-Git-Newrev: 8514279411a96f7b8f690c08eccad4c9f306737d From: Steven Whitehouse Message-Id: <20090323142725.39ACE12015A@lists.fedorahosted.org> Date: Mon, 23 Mar 2009 14:27: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-q1/txt/msg00869.txt.bz2 Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=8514279411a96f7b8f690c08eccad4c9f306737d Commit: 8514279411a96f7b8f690c08eccad4c9f306737d Parent: 3854b581d2eadae184be8fce3948523d2f5160b9 Author: Steven Whitehouse AuthorDate: Mon Mar 23 14:21:22 2009 +0000 Committer: Steven Whitehouse CommitterDate: Mon Mar 23 14:21:22 2009 +0000 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 1bf18d0..2ff9d06 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 9223971..31a75c8 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(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);