mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +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)
|
struct logical_volume *lv, const char *prefix)
|
||||||
{
|
{
|
||||||
memset(lvd, 0, sizeof(*lvd));
|
memset(lvd, 0, sizeof(*lvd));
|
||||||
snprintf(lvd->lv_name, sizeof(lvd->lv_name), "%s/%s",
|
snprintf(lvd->lv_name, sizeof(lvd->lv_name), "%s%s/%s",
|
||||||
prefix, lv->name);
|
prefix, vg->name, lv->name);
|
||||||
|
|
||||||
|
/* FIXME: Add 'if' test */
|
||||||
_check_vg_name(vg->name);
|
_check_vg_name(vg->name);
|
||||||
strcpy(lvd->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 volume_group *vg,
|
||||||
struct lv_disk *lvd)
|
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;
|
struct logical_volume *lv;
|
||||||
|
|
||||||
if (!ll) {
|
if (!ll) {
|
||||||
|
@ -680,7 +680,7 @@ static int init(void)
|
|||||||
struct stat info;
|
struct stat info;
|
||||||
struct pool *ios_pool;
|
struct pool *ios_pool;
|
||||||
|
|
||||||
/* FIXME: Override from config file */
|
/* FIXME: Override from config file. (Append trailing slash if reqd)*/
|
||||||
char *prefix = "/dev/";
|
char *prefix = "/dev/";
|
||||||
|
|
||||||
if (!(_cf = create_config_file())) {
|
if (!(_cf = create_config_file())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user