From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: dsterba@suse.cz
Subject: [PATCH 3/3] btrfs-progs: Move check/main.c to cmds-check.c to maintain the subcommand hierarchy
Date: Mon, 12 Mar 2018 15:15:30 +0800 [thread overview]
Message-ID: <20180312071530.8723-4-wqu@suse.com> (raw)
In-Reply-To: <20180312071530.8723-1-wqu@suse.com>
cmds-check.c is back now, with include files cleaned up.
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
Makefile | 8 ++++----
check/main.c => cmds-check.c | 17 -----------------
2 files changed, 4 insertions(+), 21 deletions(-)
rename check/main.c => cmds-check.c (97%)
diff --git a/Makefile b/Makefile
index 27f5c9d97f9a..5f6d5b351700 100644
--- a/Makefile
+++ b/Makefile
@@ -110,6 +110,7 @@ CHECKER_FLAGS := -include $(check_defs) -D__CHECKER__ \
-D__CHECK_ENDIAN__ -Wbitwise -Wuninitialized -Wshadow -Wundef \
-U_FORTIFY_SOURCE -Wdeclaration-after-statement -Wdefault-bitfield-sign
+check_objects = check/mode-lowmem.o check/mode-original.o check/mode-common.o
objects = ctree.o disk-io.o kernel-lib/radix-tree.o extent-tree.o print-tree.o \
root-tree.o dir-item.o file-item.o inode-item.o inode-map.o \
extent-cache.o extent_io.o volumes.o utils.o repair.o \
@@ -119,12 +120,11 @@ objects = ctree.o disk-io.o kernel-lib/radix-tree.o extent-tree.o print-tree.o \
fsfeatures.o kernel-lib/tables.o kernel-lib/raid56.o transaction.o
cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
cmds-inspect.o cmds-balance.o cmds-send.o cmds-receive.o \
- cmds-quota.o cmds-qgroup.o cmds-replace.o check/main.o \
+ cmds-quota.o cmds-qgroup.o cmds-replace.o cmds-check.o \
cmds-restore.o cmds-rescue.o chunk-recover.o super-recover.o \
cmds-property.o cmds-fi-usage.o cmds-inspect-dump-tree.o \
cmds-inspect-dump-super.o cmds-inspect-tree-stats.o cmds-fi-du.o \
- mkfs/common.o check/mode-common.o check/mode-lowmem.o \
- check/mode-original.o
+ mkfs/common.o
libbtrfs_objects = send-stream.o send-utils.o kernel-lib/rbtree.o btrfs-list.o \
kernel-lib/crc32c.o messages.o \
uuid-tree.o utils-lib.o rbtree-utils.o
@@ -450,7 +450,7 @@ btrfs-%: btrfs-%.o $(objects) $(standalone_deps) $(libs_static)
$(libs_static) \
$(LDFLAGS) $(LIBS) $($(subst -,_,$@-libs))
-btrfs: btrfs.o $(objects) $(cmds_objects) $(libs_static)
+btrfs: btrfs.o $(objects) $(cmds_objects) $(libs_static) $(check_objects)
@echo " [LD] $@"
$(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_COMP)
diff --git a/check/main.c b/cmds-check.c
similarity index 97%
rename from check/main.c
rename to cmds-check.c
index 6944de9e4635..decbbe662336 100644
--- a/check/main.c
+++ b/cmds-check.c
@@ -16,32 +16,15 @@
* Boston, MA 021110-1307, USA.
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
#include <getopt.h>
#include <uuid/uuid.h>
-#include "ctree.h"
#include "volumes.h"
#include "repair.h"
#include "disk-io.h"
-#include "print-tree.h"
#include "task-utils.h"
#include "transaction.h"
#include "utils.h"
-#include "commands.h"
-#include "free-space-cache.h"
-#include "free-space-tree.h"
-#include "btrfsck.h"
#include "qgroup-verify.h"
-#include "rbtree-utils.h"
-#include "backref.h"
-#include "kernel-shared/ulist.h"
-#include "hash.h"
#include "help.h"
#include "check/mode-common.h"
#include "check/mode-original.h"
--
2.16.2
next prev parent reply other threads:[~2018-03-12 7:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-12 7:15 [PATCH 0/3] btrfs-progs: Split mode-original code Qu Wenruo
2018-03-12 7:15 ` Qu Wenruo [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-02-06 7:02 [PATCH 0/3] btrfs-progs: Split original mode check to its own Qu Wenruo
2018-02-06 7:02 ` [PATCH 3/3] btrfs-progs: Move check/main.c to cmds-check.c to maintain the subcommand hierarchy Qu Wenruo
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=20180312071530.8723-4-wqu@suse.com \
--to=wqu@suse.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@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;
as well as URLs for NNTP newsgroup(s).