mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
suppress status err mesg when LVM- uuid prefix is missing
This commit is contained in:
parent
19f792df43
commit
633f889c34
@ -267,7 +267,7 @@ static int _info(const char *name, const char *dlid, int mknodes,
|
|||||||
uuid_out) &&
|
uuid_out) &&
|
||||||
info->exists)
|
info->exists)
|
||||||
return 1;
|
return 1;
|
||||||
else if (_info_run(NULL, dlid + sizeof(UUID_PREFIX), info,
|
else if (_info_run(NULL, dlid + sizeof(UUID_PREFIX) - 1, info,
|
||||||
0, with_open_count, mem, uuid_out) &&
|
0, with_open_count, mem, uuid_out) &&
|
||||||
info->exists)
|
info->exists)
|
||||||
return 1;
|
return 1;
|
||||||
@ -302,6 +302,7 @@ static int _status_run(const char *name, const char *uuid,
|
|||||||
{
|
{
|
||||||
int r = 0;
|
int r = 0;
|
||||||
struct dm_task *dmt;
|
struct dm_task *dmt;
|
||||||
|
struct dm_info info;
|
||||||
void *next = NULL;
|
void *next = NULL;
|
||||||
uint64_t start, length;
|
uint64_t start, length;
|
||||||
char *type = NULL;
|
char *type = NULL;
|
||||||
@ -320,6 +321,11 @@ static int _status_run(const char *name, const char *uuid,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!dm_task_get_info(dmt, &info) || !info.exists) {
|
||||||
|
stack;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
next = dm_get_next_target(dmt, next, &start, &length,
|
next = dm_get_next_target(dmt, next, &start, &length,
|
||||||
&type, ¶ms);
|
&type, ¶ms);
|
||||||
@ -359,7 +365,7 @@ static int _status(const char *name, const char *uuid,
|
|||||||
type_size, params, param_size) &&
|
type_size, params, param_size) &&
|
||||||
*params)
|
*params)
|
||||||
return 1;
|
return 1;
|
||||||
else if (_status_run(NULL, uuid + sizeof(UUID_PREFIX), start,
|
else if (_status_run(NULL, uuid + sizeof(UUID_PREFIX) - 1, start,
|
||||||
length, type, type_size, params,
|
length, type, type_size, params,
|
||||||
param_size) &&
|
param_size) &&
|
||||||
*params)
|
*params)
|
||||||
@ -474,7 +480,7 @@ static int _percent(struct dev_manager *dm, const char *name, const char *dlid,
|
|||||||
if (_percent_run(dm, NULL, dlid, target_type, wait, lv, percent,
|
if (_percent_run(dm, NULL, dlid, target_type, wait, lv, percent,
|
||||||
event_nr))
|
event_nr))
|
||||||
return 1;
|
return 1;
|
||||||
else if (_percent_run(dm, NULL, dlid + sizeof(UUID_PREFIX),
|
else if (_percent_run(dm, NULL, dlid + sizeof(UUID_PREFIX) - 1,
|
||||||
target_type, wait, lv, percent,
|
target_type, wait, lv, percent,
|
||||||
event_nr))
|
event_nr))
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user