From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cn.fujitsu.com ([222.73.24.84]:29722 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751081AbaBJH1k (ORCPT ); Mon, 10 Feb 2014 02:27:40 -0500 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s1A7RXEd020166 for ; Mon, 10 Feb 2014 15:27:33 +0800 From: Qu Wenruo To: linux-btrfs@vger.kernel.org Subject: [PATCH 0/3] make 'btrfs fi show /mnt/point/' works with ending '/' character Date: Mon, 10 Feb 2014 15:28:27 +0800 Message-Id: <1392017310-19951-1-git-send-email-quwenruo@cn.fujitsu.com> Sender: linux-btrfs-owner@vger.kernel.org List-ID: Before this patchset, 'btrfs fi show' can work with '/mnt/point' but not '/mnt/point/', which is very annoying since tab completion will add '/' to a directory. This patchset just reuse the find_mount_root function with some small modification to ignore the last '/' only when needed. Qu Wenruo (3): btrfs-progs: move find_mount_root to utils.[ch] btrfs-progs: Add path_is_mp option for find_mount_root. btrfs-progs: reuse find_mount_root to determine arg type and so on. cmds-filesystem.c | 7 +++++ cmds-receive.c | 2 +- cmds-send.c | 53 ++------------------------------- cmds-subvolume.c | 2 +- commands.h | 1 - utils.c | 88 +++++++++++++++++++++++++++++++++++++++++++++---------- utils.h | 1 + 7 files changed, 86 insertions(+), 68 deletions(-) -- 1.8.5.4