mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-23 21:35:29 +03:00
Add 'is_reserved_lvname()' helper function.
Very similar to apply_lvname_restrictions but without the error messages.
This commit is contained in:
parent
368a0d4d2d
commit
788e544e1d
@ -1,5 +1,6 @@
|
||||
Version 2.02.34 -
|
||||
===================================
|
||||
Add 'is_reserved_lvname()' helper function.
|
||||
Correct command name in lvmdiskscan man page.
|
||||
clvmd no longer crashes if it sees nodeids over 50.
|
||||
Fix potential deadlock in clvmd thread handling.
|
||||
|
@ -1234,6 +1234,19 @@ int apply_lvname_restrictions(const char *name)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int is_reserved_lvname(const char *name)
|
||||
{
|
||||
int rc, old_suppress;
|
||||
|
||||
old_suppress = log_suppress(2);
|
||||
rc = !apply_lvname_restrictions(name);
|
||||
log_suppress(old_suppress);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Set members of struct vgcreate_params from cmdline.
|
||||
* Do preliminary validation with arg_*() interface.
|
||||
|
@ -95,6 +95,7 @@ struct list *create_pv_list(struct dm_pool *mem, struct volume_group *vg, int ar
|
||||
struct list *clone_pv_list(struct dm_pool *mem, struct list *pvs);
|
||||
|
||||
int apply_lvname_restrictions(const char *name);
|
||||
int is_reserved_lvname(const char *name);
|
||||
|
||||
int fill_vg_create_params(struct cmd_context *cmd,
|
||||
char *vg_name, struct vgcreate_params *vp_new,
|
||||
|
Loading…
Reference in New Issue
Block a user