summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2016-03-22 19:27:34 +0000
committerAlasdair G Kergon <agk@redhat.com>2016-03-22 19:35:14 +0000
commitcf393466976a226faba924c6d14fa04bd7b37c89 (patch)
tree98d7bcb7c8ac1eba48e3f8acbe32fdca1820ff76
parent65d2d66d02133fc6df1baba74a7fe0883ed2a6e0 (diff)
downloadlvm2-cf393466976a226faba924c6d14fa04bd7b37c89.tar.gz
libdm: Move _skip_fields within file.
-rw-r--r--libdm/libdm-targets.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/libdm/libdm-targets.c b/libdm/libdm-targets.c
index fd74336aa..8a8a328d1 100644
--- a/libdm/libdm-targets.c
+++ b/libdm/libdm-targets.c
@@ -55,6 +55,18 @@ int dm_get_status_snapshot(struct dm_pool *mem, const char *params,
}
/*
+ * Skip nr fields each delimited by a single space.
+ * FIXME Don't assume single space.
+ */
+static const char *_skip_fields(const char *p, unsigned nr)
+{
+ while (p && nr-- && (p = strchr(p, ' ')))
+ p++;
+
+ return p;
+}
+
+/*
* Various RAID status versions include:
* Versions < 1.5.0 (4 fields):
* <raid_type> <#devs> <health_str> <sync_ratio>
@@ -133,17 +145,6 @@ bad:
}
/*
- * Skip nr fields delimited by a single space.
- */
-static const char *_skip_fields(const char *p, unsigned nr)
-{
- while (p && nr-- && (p = strchr(p, ' ')))
- p++;
-
- return p;
-}
-
-/*
* <metadata block size> <#used metadata blocks>/<#total metadata blocks>
* <cache block size> <#used cache blocks>/<#total cache blocks>
* <#read hits> <#read misses> <#write hits> <#write misses>