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:
parent
65d2d66d02
commit
cf39346697
@ -54,6 +54,18 @@ int dm_get_status_snapshot(struct dm_pool *mem, const char *params,
|
||||
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:
|
||||
* Versions < 1.5.0 (4 fields):
|
||||
@ -132,17 +144,6 @@ bad:
|
||||
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>
|
||||
* <cache block size> <#used cache blocks>/<#total cache blocks>
|
||||
|
Loading…
Reference in New Issue
Block a user