* [PATCH] Btrfs-progs: listing subvols and getting default subvol don't need a subv path
@ 2013-07-14 14:32 Wang Shilong
0 siblings, 0 replies; only message in thread
From: Wang Shilong @ 2013-07-14 14:32 UTC (permalink / raw)
To: linux-btrfs; +Cc: wangsl.fnst
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-14 14:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-14 14:32 [PATCH] Btrfs-progs: listing subvols and getting default subvol don't need a subv path Wang Shilong
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).