]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: libxcmd: move fs_device_number() up in the file
authorAlex Elder <aelder@sgi.com>
Wed, 28 Sep 2011 10:57:11 +0000 (10:57 +0000)
committerAlex Elder <aelder@sgi.com>
Thu, 29 Sep 2011 14:30:48 +0000 (09:30 -0500)
No content change, just code movement in preparation for the next
patch.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxcmd/paths.c

index f1cd6c7e0250c4c895637cd8cbbfe7c48d575be9..aa0aeb6bbfb49df4c3d019d5c7c71fc97094c74a 100644 (file)
@@ -37,6 +37,20 @@ struct fs_path *fs_path;
 char *mtab_file;
 #define PROC_MOUNTS    "/proc/self/mounts"
 
+static char *
+fs_device_number(
+       char            *name,
+       dev_t           *devnum)
+{
+       struct stat64   sbuf;
+
+       if (stat64(name, &sbuf) < 0)
+               return NULL;
+       *devnum = sbuf.st_dev;
+
+       return name;
+}
+
 /*
  * Find the FS table entry for the given path.  The "flags" argument
  * is a mask containing FS_MOUNT_POINT or FS_PROJECT_PATH (or both)
@@ -73,20 +87,6 @@ fs_table_lookup(
        return NULL;
 }
 
-static char *
-fs_device_number(
-       char            *name,
-       dev_t           *devnum)
-{
-       struct stat64   sbuf;
-
-       if (stat64(name, &sbuf) < 0)
-               return NULL;
-       *devnum = sbuf.st_dev;
-
-       return name;
-}
-
 static int
 fs_table_insert(
        char            *dir,