diff mbox

[1/6] btrfs-progs: spatial rearrange subvolume functions together

Message ID 1458544865-16467-2-git-send-email-anand.jain@oracle.com (mailing list archive)
State Accepted
Headers show

Commit Message

Anand Jain March 21, 2016, 7:21 a.m. UTC
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 utils.c | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)
diff mbox

Patch

diff --git a/utils.c b/utils.c
index c0c564e2f69b..fb549ee923c7 100644
--- a/utils.c
+++ b/utils.c
@@ -2784,17 +2784,6 @@  int test_minimum_size(const char *file, u32 nodesize)
 	return 0;
 }
 
-/*
- * test if name is a correct subvolume name
- * this function return
- * 0-> name is not a correct subvolume name
- * 1-> name is a correct subvolume name
- */
-int test_issubvolname(const char *name)
-{
-	return name[0] != '\0' && !strchr(name, '/') &&
-		strcmp(name, ".") && strcmp(name, "..");
-}
 
 /*
  * Test if path is a directory
@@ -3146,3 +3135,16 @@  void clean_args_no_options(int argc, char *argv[], const char * const *usagestr)
 		}
 	}
 }
+
+/* Subvolume helper functions */
+/*
+ * test if name is a correct subvolume name
+ * this function return
+ * 0-> name is not a correct subvolume name
+ * 1-> name is a correct subvolume name
+ */
+int test_issubvolname(const char *name)
+{
+	return name[0] != '\0' && !strchr(name, '/') &&
+		strcmp(name, ".") && strcmp(name, "..");
+}