[PATCH] Remove duplicate definitions in xfsprogs

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

 



This is userspace.  I have no idea what I'm doing.

Building on current Debian testing gives:

/usr/bin/ld: ../libxlog/.libs/libxlog.a(util.o):xfsprogs/libxlog/util.c:25: multiple definition of `x'; init.o:xfsprogs/db/init.c:42: first defined here

and

/usr/bin/ld: ../libxfs/.libs/libxfs.a(init.o):xfsprogs/libxfs/init.c:39: multiple definition of `progname'; xfs_mdrestore.o:xfsprogs/mdrestore/xfs_mdrestore.c:22: first defined here

It seems to me that xfsprogs was relying on the linker to merge
duplicate definitions, and now the linker is declining to do so?

Feel free to split this up into individual patches, or whatever
seems best ...

diff --git a/db/init.c b/db/init.c
index b108a06cfe..42757e44c6 100644
--- a/db/init.c
+++ b/db/init.c
@@ -39,7 +39,6 @@ int			force;
 struct xfs_mount	xmount;
 struct xfs_mount	*mp;
 struct xlog		xlog;
-libxfs_init_t		x;
 xfs_agnumber_t		cur_agno = NULLAGNUMBER;
 
 static void
diff --git a/logprint/logprint.c b/logprint/logprint.c
index 37b8cb9116..a14ba185a5 100644
--- a/logprint/logprint.c
+++ b/logprint/logprint.c
@@ -36,7 +36,6 @@ int	print_buffer;
 int	print_overwrite;
 int     print_no_data;
 int     print_no_print;
-int     print_exit = 1; /* -e is now default. specify -c to override */
 int	print_operation = OP_PRINT;
 
 void
@@ -146,6 +145,7 @@ main(int argc, char **argv)
 	memset(&mount, 0, sizeof(mount));
 
 	progname = basename(argv[0]);
+	print_exit = 1; /* -e is now default. specify -c to override */
 	while ((c = getopt(argc, argv, "bC:cdefl:iqnors:tDVv")) != EOF) {
 		switch (c) {
 			case 'D':
diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
index c9d4b0c149..90383f6744 100644
--- a/mdrestore/xfs_mdrestore.c
+++ b/mdrestore/xfs_mdrestore.c
@@ -19,7 +19,6 @@
 #include "libxfs.h"
 #include "xfs_metadump.h"
 
-char 		*progname;
 int		show_progress = 0;
 int		show_info = 0;
 int		progress_since_warning = 0;




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux