1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +03:00

prefix & vgname in lvname

This commit is contained in:
Alasdair Kergon 2001-10-29 15:28:00 +00:00
parent cfd658dab0
commit a352490f88
2 changed files with 5 additions and 4 deletions

View File

@ -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) {

View File

@ -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())) {