mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-11 20:58:50 +03:00
lvcreate: fix LVM_VG_NAME detection
Commit d3af0e7528dbba30824379fc98cb4db437559ad5 was not quite right in testing if the env var was set.
This commit is contained in:
parent
4a30f5f9b0
commit
2556498ee1
@ -1280,7 +1280,6 @@ check_val:
|
|||||||
static int _command_required_pos_matches(struct cmd_context *cmd, int ci, int rp, char **argv)
|
static int _command_required_pos_matches(struct cmd_context *cmd, int ci, int rp, char **argv)
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
char *gotenv = NULL;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* rp is the index in required_pos_args[] of the required positional arg.
|
* rp is the index in required_pos_args[] of the required positional arg.
|
||||||
@ -1315,9 +1314,9 @@ static int _command_required_pos_matches(struct cmd_context *cmd, int ci, int rp
|
|||||||
(arg_is_set(cmd, name_ARG) ||
|
(arg_is_set(cmd, name_ARG) ||
|
||||||
arg_is_set(cmd, thinpool_ARG) ||
|
arg_is_set(cmd, thinpool_ARG) ||
|
||||||
arg_is_set(cmd, cachepool_ARG) ||
|
arg_is_set(cmd, cachepool_ARG) ||
|
||||||
(gotenv = getenv("LVM_VG_NAME")))) {
|
getenv("LVM_VG_NAME"))) {
|
||||||
|
|
||||||
if (gotenv)
|
if (getenv("LVM_VG_NAME"))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if ((name = arg_str_value(cmd, name_ARG, NULL))) {
|
if ((name = arg_str_value(cmd, name_ARG, NULL))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user