mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
prefix & vgname in lvname
This commit is contained in:
parent
cfd658dab0
commit
a352490f88
@ -274,9 +274,10 @@ void export_lv(struct lv_disk *lvd, struct volume_group *vg,
|
||||
struct logical_volume *lv, const char *prefix)
|
||||
{
|
||||
memset(lvd, 0, sizeof(*lvd));
|
||||
snprintf(lvd->lv_name, sizeof(lvd->lv_name), "%s/%s",
|
||||
prefix, lv->name);
|
||||
snprintf(lvd->lv_name, sizeof(lvd->lv_name), "%s%s/%s",
|
||||
prefix, vg->name, lv->name);
|
||||
|
||||
/* FIXME: Add 'if' test */
|
||||
_check_vg_name(vg->name);
|
||||
strcpy(lvd->vg_name, vg->name);
|
||||
|
||||
@ -406,7 +407,7 @@ static struct logical_volume *_add_lv(struct pool *mem,
|
||||
struct volume_group *vg,
|
||||
struct lv_disk *lvd)
|
||||
{
|
||||
struct lv_list *ll = pool_alloc(mem, sizeof(*ll));
|
||||
struct lv_list *ll = pool_zalloc(mem, sizeof(*ll));
|
||||
struct logical_volume *lv;
|
||||
|
||||
if (!ll) {
|
||||
|
@ -680,7 +680,7 @@ static int init(void)
|
||||
struct stat info;
|
||||
struct pool *ios_pool;
|
||||
|
||||
/* FIXME: Override from config file */
|
||||
/* FIXME: Override from config file. (Append trailing slash if reqd)*/
|
||||
char *prefix = "/dev/";
|
||||
|
||||
if (!(_cf = create_config_file())) {
|
||||
|
Loading…
Reference in New Issue
Block a user