mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-09 01:18:39 +03:00
Make mempool optional in dm_split_lvm_name()
This commit is contained in:
parent
99e45f71c2
commit
90cc3a0f05
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.33 -
|
Version 1.02.33 -
|
||||||
===============================
|
===============================
|
||||||
|
Make mempool optional in dm_split_lvm_name().
|
||||||
|
|
||||||
Version 1.02.32 - 21st May 2009
|
Version 1.02.32 - 21st May 2009
|
||||||
===============================
|
===============================
|
||||||
|
@ -819,6 +819,8 @@ int dm_set_selinux_context(const char *path, mode_t mode);
|
|||||||
/*
|
/*
|
||||||
* Break up the name of a mapped device into its constituent
|
* Break up the name of a mapped device into its constituent
|
||||||
* Volume Group, Logical Volume and Layer (if present).
|
* Volume Group, Logical Volume and Layer (if present).
|
||||||
|
* If mem is supplied, the result is allocated from the mempool.
|
||||||
|
* Otherwise the strings are changed in situ.
|
||||||
*/
|
*/
|
||||||
int dm_split_lvm_name(struct dm_pool *mem, const char *dmname,
|
int dm_split_lvm_name(struct dm_pool *mem, const char *dmname,
|
||||||
char **vgname, char **lvname, char **layer);
|
char **vgname, char **lvname, char **layer);
|
||||||
|
@ -93,7 +93,7 @@ static char *_unquote(char *component)
|
|||||||
int dm_split_lvm_name(struct dm_pool *mem, const char *dmname,
|
int dm_split_lvm_name(struct dm_pool *mem, const char *dmname,
|
||||||
char **vgname, char **lvname, char **layer)
|
char **vgname, char **lvname, char **layer)
|
||||||
{
|
{
|
||||||
if (!(*vgname = dm_pool_strdup(mem, dmname)))
|
if (mem && !(*vgname = dm_pool_strdup(mem, dmname)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
_unquote(*layer = _unquote(*lvname = _unquote(*vgname)));
|
_unquote(*layer = _unquote(*lvname = _unquote(*vgname)));
|
||||||
|
Loading…
Reference in New Issue
Block a user