mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
cleanup: dmeventd reorder _fill_device_data
Just simplify the function.
This commit is contained in:
parent
6b701c3a48
commit
4fb588c34e
@ -404,6 +404,7 @@ static int _fill_device_data(struct thread_status *ts)
|
|||||||
{
|
{
|
||||||
struct dm_task *dmt;
|
struct dm_task *dmt;
|
||||||
struct dm_info dmi;
|
struct dm_info dmi;
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
if (!ts->device.uuid)
|
if (!ts->device.uuid)
|
||||||
return 0;
|
return 0;
|
||||||
@ -426,16 +427,11 @@ static int _fill_device_data(struct thread_status *ts)
|
|||||||
|
|
||||||
ts->device.major = dmi.major;
|
ts->device.major = dmi.major;
|
||||||
ts->device.minor = dmi.minor;
|
ts->device.minor = dmi.minor;
|
||||||
|
ret = 1;
|
||||||
|
fail:
|
||||||
dm_task_destroy(dmt);
|
dm_task_destroy(dmt);
|
||||||
return 1;
|
|
||||||
|
|
||||||
fail:
|
return ret;
|
||||||
dm_task_destroy(dmt);
|
|
||||||
dm_free(ts->device.name);
|
|
||||||
ts->device.name = NULL;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user