1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

libdm: Move _skip_fields within file.

This commit is contained in:
Alasdair G Kergon 2016-03-22 19:27:34 +00:00
parent 65d2d66d02
commit cf39346697

View File

@ -54,6 +54,18 @@ int dm_get_status_snapshot(struct dm_pool *mem, const char *params,
return 1; return 1;
} }
/*
* 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: * Various RAID status versions include:
* Versions < 1.5.0 (4 fields): * Versions < 1.5.0 (4 fields):
@ -132,17 +144,6 @@ bad:
return 0; return 0;
} }
/*
* 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> * <metadata block size> <#used metadata blocks>/<#total metadata blocks>
* <cache block size> <#used cache blocks>/<#total cache blocks> * <cache block size> <#used cache blocks>/<#total cache blocks>