Re: [PATCH 2/6] Btrfs-progs: add btrfsck functionality to btrfs

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

 



On Fri, Feb 08, 2013 at 01:36:58AM +0100, Ian Kumlien wrote:
> -btrfsck: $(objects) btrfsck.o
> -	@echo "    [LD]     $@"
> -	$(Q)$(CC) $(CFLAGS) -o btrfsck btrfsck.o $(objects) $(LDFLAGS) $(LIBS)
> -

Do we want to get rid of the btrfsck binary completely? Using the term
'btrsfck' is common and anybody compiling sources from git needs to cp
or ln btrfs -> btrfsck. Let's make it automatic, I'll add a makefile
rule:

--- a/Makefile
+++ b/Makefile
@@ -42,7 +42,7 @@ endif

 MAKEOPTS = --no-print-directory Q=$(Q)

-progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol \
+progs = btrfsctl mkfs.btrfs btrfs-debug-tree btrfs-show btrfs-vol btrfsck \
        btrfs btrfs-map-logical btrfs-image btrfs-zero-log btrfs-convert \
        btrfs-find-root btrfstune btrfs-show-super

@@ -125,6 +125,11 @@ btrfs-show: $(objects) $(libs) btrfs-show.o
        @echo "    [LD]     $@"
        $(Q)$(CC) $(CFLAGS) -o btrfs-show btrfs-show.o $(objects) $(LDFLAGS) $(LIBS)

+# For backward compatibility, 'btrfs' changes behaviour to fsck if it's named 'btrfsck'
+btrfsck: btrfs
+       @echo "    [CP]     $@"
+       $(Q)cp btrfs btrfsck
+
 mkfs.btrfs: $(objects) $(libs) mkfs.o
        @echo "    [LD]     $@"
        $(Q)$(CC) $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o $(LDFLAGS) $(LIBS) -lblkid
@@ -186,7 +191,7 @@ install-man:
 clean :
        @echo "Cleaning"
        $(Q)rm -f $(progs) cscope.out *.o .*.d btrfs-convert btrfs-image btrfs-select-super \
-             btrfs-zero-log btrfstune dir-test ioctl-test quick-test btrfs.static \
+             btrfs-zero-log btrfstune dir-test ioctl-test quick-test btrfs.static btrfsck \
              version.h \
              $(libs) libbtrfs.so libbtrfs.so.0 libbtrfs.so.0.1
        $(Q)$(MAKE) $(MAKEOPTS) -C man $@
---

david
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux