| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 4/5] xfsprogs: libxcmd: move fs_device_number() up in the file |
| From: | Alex Elder <aelder@xxxxxxx> |
| Date: | Wed, 28 Sep 2011 05:57:11 -0500 |
| Cc: | Alex Elder <aelder@xxxxxxx> |
| In-reply-to: | <1317207432-8464-1-git-send-email-aelder@xxxxxxx> |
| In-reply-to: | <08dbe8c3d0f49bac0c18570a68e7aa983cb4c731.1317207144.git.aelder@xxxxxxx> |
| References: | <1317207432-8464-1-git-send-email-aelder@xxxxxxx> |
| References: | <08dbe8c3d0f49bac0c18570a68e7aa983cb4c731.1317207144.git.aelder@xxxxxxx> |
No content change, just code movement in preparation for the next
patch.
Signed-off-by: Alex Elder <aelder@xxxxxxx>
---
libxcmd/paths.c | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/libxcmd/paths.c b/libxcmd/paths.c
index f1cd6c7..aa0aeb6 100644
--- a/libxcmd/paths.c
+++ b/libxcmd/paths.c
@@ -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,
--
1.7.6.2
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 2/5] xfsprogs: libxcmd: simplify fs_table_lookup(), Alex Elder |
|---|---|
| Next by Date: | [PATCH 1/5] xfsprogs: libxcmd: don't clobber fs_table on realloc(), Alex Elder |
| Previous by Thread: | Re: [PATCH 2/5] xfsprogs: libxcmd: simplify fs_table_lookup(), Christoph Hellwig |
| Next by Thread: | Re: [PATCH 4/5] xfsprogs: libxcmd: move fs_device_number() up in the file, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |