All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Shilong <wangshilong1991@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: wangsl.fnst@cn.fujitsu.com
Subject: [PATCH] Btrfs-progs: listing subvols and getting default subvol don't need a subv path
Date: Sun, 14 Jul 2013 22:32:23 +0800	[thread overview]
Message-ID: <1373812343-5068-1-git-send-email-wangshilong1991@gmail.com> (raw)

From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>

Listing subvolumes and getting default subvol in the filesystem don't need a
subv path,Any valid path related to Btrfs filesystem is ok to finish the work.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
---
 cmds-subvolume.c | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index ccb4762..52c6485 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -420,18 +420,6 @@ static int cmd_subvol_list(int argc, char **argv)
 	}
 
 	subvol = argv[optind];
-
-	ret = test_issubvolume(subvol);
-	if (ret < 0) {
-		fprintf(stderr, "ERROR: error accessing '%s'\n", subvol);
-		goto out;
-	}
-	if (!ret) {
-		fprintf(stderr, "ERROR: '%s' is not a subvolume\n", subvol);
-		ret = -1;
-		goto out;
-	}
-
 	fd = open_file_or_dir(subvol);
 	if (fd < 0) {
 		ret = -1;
@@ -652,17 +640,6 @@ static int cmd_subvol_get_default(int argc, char **argv)
 		usage(cmd_subvol_get_default_usage);
 
 	subvol = argv[1];
-
-	ret = test_issubvolume(subvol);
-	if (ret < 0) {
-		fprintf(stderr, "ERROR: error accessing '%s'\n", subvol);
-		return 1;
-	}
-	if (!ret) {
-		fprintf(stderr, "ERROR: '%s' is not a subvolume\n", subvol);
-		return 1;
-	}
-
 	fd = open_file_or_dir(subvol);
 	if (fd < 0) {
 		fprintf(stderr, "ERROR: can't access '%s'\n", subvol);
-- 
1.7.11.7


                 reply	other threads:[~2013-07-14 14:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1373812343-5068-1-git-send-email-wangshilong1991@gmail.com \
    --to=wangshilong1991@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wangsl.fnst@cn.fujitsu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.