gfs2-utils: RHEL7 - libgfs2: Remove UI fields from struct gfs2_sbd

Andrew Price andyp at fedoraproject.org
Mon Sep 8 17:33:44 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=26b7af3357ba6d81fad5096a0e594302502bcd5d
Commit:        26b7af3357ba6d81fad5096a0e594302502bcd5d
Parent:        3d1e4a29ff4776ffeecea3b55c79467bc6884e6a
Author:        Andrew Price <anprice at redhat.com>
AuthorDate:    Wed May 7 13:02:55 2014 +0100
Committer:     Andrew Price <anprice at redhat.com>
CommitterDate: Thu Jul 24 17:15:39 2014 +0100

libgfs2: Remove UI fields from struct gfs2_sbd

The 'override' field wasn't being used at all and the 'quiet' field was
only being used by gfs2_jadd. Remove them in favour of keeping user
interface options in the apps themselves.

Signed-off-by: Andrew Price <anprice at redhat.com>
---
 gfs2/libgfs2/libgfs2.h |    2 --
 gfs2/mkfs/main_jadd.c  |   13 +++++++------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index b98d314..5fdf9af 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -277,8 +277,6 @@ struct gfs2_sbd {
 	unsigned int qcsize;     /* Size of quota change files (in MB) */
 
 	int debug;
-	int quiet;
-	int override;
 
 	char device_name[PATH_MAX];
 	char *path_name;
diff --git a/gfs2/mkfs/main_jadd.c b/gfs2/mkfs/main_jadd.c
index 47af055..d01e3b3 100644
--- a/gfs2/mkfs/main_jadd.c
+++ b/gfs2/mkfs/main_jadd.c
@@ -27,6 +27,8 @@
 #define BUF_SIZE 4096
 #define RANDOM(values) ((values) * (random() / (RAND_MAX + 1.0)))
 
+static int quiet = 0;
+
 static void
 make_jdata(int fd, const char *value)
 {
@@ -139,7 +141,7 @@ static void decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp)
 			sdp->md.journals = atoi(optarg);
 			break;
 		case 'q':
-			sdp->quiet = TRUE;
+			quiet = 1;
 			break;
 		case 'V':
 			printf("gfs2_jadd %s (built %s %s)\n", VERSION,
@@ -166,7 +168,7 @@ static void decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp)
 		optind++;
 	} else
 		die( _("no path specified (try -h for help)\n"));
-	
+
 	if (optind < argc)
 		die( _("Unrecognized argument: %s\n"), argv[optind]);
 
@@ -175,13 +177,12 @@ static void decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp)
 		printf("  qcsize = %u\n", sdp->qcsize);
 		printf("  jsize = %u\n", sdp->jsize);
 		printf("  journals = %u\n", sdp->md.journals);
-		printf("  quiet = %d\n", sdp->quiet);
+		printf("  quiet = %d\n", quiet);
 		printf("  path = %s\n", sdp->path_name);
 	}
 }
 
-static void 
-verify_arguments(struct gfs2_sbd *sdp)
+static void verify_arguments(struct gfs2_sbd *sdp)
 {
 	if (!sdp->md.journals)
 		die( _("no journals specified\n"));
@@ -201,7 +202,7 @@ static void print_results(struct gfs2_sbd *sdp)
 {
 	if (sdp->debug)
 		printf("\n");
-	else if (sdp->quiet)
+	else if (quiet)
 		return;
 
 	printf( _("Filesystem: %s\n"), sdp->path_name);


More information about the cluster-commits mailing list