From: Matthew Wilcox <willy@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH] Remove duplicate definitions in xfsprogs
Date: Thu, 14 Mar 2024 21:56:40 +0000 [thread overview]
Message-ID: <ZfNymFxNLL9gtybv@casper.infradead.org> (raw)
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;
next reply other threads:[~2024-03-14 21:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-14 21:56 Matthew Wilcox [this message]
2024-03-17 21:09 ` [PATCH] Remove duplicate definitions in xfsprogs Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZfNymFxNLL9gtybv@casper.infradead.org \
--to=willy@infradead.org \
--cc=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox