public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* gfs2-utils: master - Remove unused code from various places
@ 2009-03-23 14:27 Steven Whitehouse
  0 siblings, 0 replies; only message in thread
From: Steven Whitehouse @ 2009-03-23 14:27 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=8514279411a96f7b8f690c08eccad4c9f306737d
Commit:        8514279411a96f7b8f690c08eccad4c9f306737d
Parent:        3854b581d2eadae184be8fce3948523d2f5160b9
Author:        Steven Whitehouse <steve@dolmen.chygwyn.com>
AuthorDate:    Mon Mar 23 14:21:22 2009 +0000
Committer:     Steven Whitehouse <steve@dolmen.chygwyn.com>
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 <swhiteho@redhat.com>
---
 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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-23 14:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-23 14:27 gfs2-utils: master - Remove unused code from various places Steven Whitehouse

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).