[PATCH] Move declarations of globals back to the files with "main",

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



so we can compile with -fno-common.

* mount/sundries.c (mount_quiet, verbose, progname): Remove declaration.
* mount/fstab.c [MAIN_TEST_MTABLOCK]: Declare globals here instead.
* mount/lomount.c [MAIN]: Likewise.
* mount/mount.c: Likewise.
* mount/umount.c: Likewise.
* mount/swapon.c (mount_quiet): Declare.

Signed-off-by: Jim Meyering <meyering@xxxxxxxxxx>
---
 mount/fstab.c    |    4 ++++
 mount/lomount.c  |    4 ++++
 mount/mount.c    |    4 ++++
 mount/sundries.c |    4 ----
 mount/swapon.c   |    1 +
 mount/umount.c   |    4 ++++
 6 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/mount/fstab.c b/mount/fstab.c
index 03ddf4e..fa7eacd 100644
--- a/mount/fstab.c
+++ b/mount/fstab.c
@@ -797,6 +797,10 @@ update_mtab (const char *dir, struct my_mntent *instead) {

 #ifdef MAIN_TEST_MTABLOCK

+int mount_quiet;
+int verbose;
+char *progname;
+
 /*
  * This is mtab locking code test for:
  *
diff --git a/mount/lomount.c b/mount/lomount.c
index 56d7234..8c5e6de 100644
--- a/mount/lomount.c
+++ b/mount/lomount.c
@@ -63,6 +63,10 @@ loop_info64_to_old(const struct loop_info64 *info64, struct loop_info *info)

 #ifdef MAIN

+int mount_quiet;
+int verbose;
+char *progname;
+
 static int
 show_loop(char *device) {
 	struct loop_info loopinfo;
diff --git a/mount/mount.c b/mount/mount.c
index 917f62a..f165cf3 100644
--- a/mount/mount.c
+++ b/mount/mount.c
@@ -49,6 +49,10 @@
 #include "setproctitle.h"
 #endif

+int mount_quiet;
+int verbose;
+char *progname;
+
 /* True for fake mount (-f).  */
 static int fake = 0;

diff --git a/mount/sundries.c b/mount/sundries.c
index ba99e35..1fd084e 100644
--- a/mount/sundries.c
+++ b/mount/sundries.c
@@ -18,10 +18,6 @@
 #include "xmalloc.h"
 #include "nls.h"

-int mount_quiet;
-int verbose;
-char *progname;
-
 char *
 xstrndup (const char *s, int n) {
      char *t;
diff --git a/mount/swapon.c b/mount/swapon.c
index 34a183f..c380205 100644
--- a/mount/swapon.c
+++ b/mount/swapon.c
@@ -35,6 +35,7 @@

 int all = 0;
 int priority = -1;	/* non-prioritized swap by default */
+int mount_quiet;
 int verbose;
 char *progname;

diff --git a/mount/umount.c b/mount/umount.c
index 9690f2a..acb1467 100644
--- a/mount/umount.c
+++ b/mount/umount.c
@@ -21,6 +21,10 @@
 #include "nls.h"
 #include "realpath.h"

+int mount_quiet;
+int verbose;
+char *progname;
+
 #if defined(MNT_FORCE)
 /* Interesting ... it seems libc knows about MNT_FORCE and presumably
    about umount2 as well -- need not do anything */
--
1.5.4.rc0.53.gdfcd
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux