mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Revert to data_start
This commit is contained in:
parent
fb78c7a14d
commit
5ac5a99961
@ -476,7 +476,7 @@ void *dm_get_next_target(struct dm_task *dmt, void *next,
|
|||||||
/* Unmarshall the target info returned from a status call */
|
/* Unmarshall the target info returned from a status call */
|
||||||
static int _unmarshal_status(struct dm_task *dmt, struct dm_ioctl *dmi)
|
static int _unmarshal_status(struct dm_task *dmt, struct dm_ioctl *dmi)
|
||||||
{
|
{
|
||||||
char *outbuf = (char *) dmi + dmi->data_offset;
|
char *outbuf = (char *) dmi + dmi->data_start;
|
||||||
char *outptr = outbuf;
|
char *outptr = outbuf;
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
struct dm_target_spec *spec;
|
struct dm_target_spec *spec;
|
||||||
@ -533,7 +533,7 @@ struct dm_deps *dm_task_get_deps(struct dm_task *dmt)
|
|||||||
return _dm_task_get_deps_v1(dmt);
|
return _dm_task_get_deps_v1(dmt);
|
||||||
|
|
||||||
return (struct dm_deps *) (((void *) dmt->dmi.v3) +
|
return (struct dm_deps *) (((void *) dmt->dmi.v3) +
|
||||||
dmt->dmi.v3->data_offset);
|
dmt->dmi.v3->data_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
int dm_task_set_ro(struct dm_task *dmt)
|
int dm_task_set_ro(struct dm_task *dmt)
|
||||||
@ -668,7 +668,7 @@ static struct dm_ioctl *_flatten(struct dm_task *dmt)
|
|||||||
dmi->version[2] = (*version)[2];
|
dmi->version[2] = (*version)[2];
|
||||||
|
|
||||||
dmi->data_size = len;
|
dmi->data_size = len;
|
||||||
dmi->data_offset = sizeof(struct dm_ioctl);
|
dmi->data_start = sizeof(struct dm_ioctl);
|
||||||
|
|
||||||
if (dmt->dev_name)
|
if (dmt->dev_name)
|
||||||
strncpy(dmi->name, dmt->dev_name, sizeof(dmi->name));
|
strncpy(dmi->name, dmt->dev_name, sizeof(dmi->name));
|
||||||
@ -778,6 +778,7 @@ int dm_task_run(struct dm_task *dmt)
|
|||||||
|
|
||||||
case DM_DEVICE_STATUS:
|
case DM_DEVICE_STATUS:
|
||||||
case DM_DEVICE_TABLE:
|
case DM_DEVICE_TABLE:
|
||||||
|
case DM_DEVICE_WAITEVENT:
|
||||||
if (!_unmarshal_status(dmt, dmi))
|
if (!_unmarshal_status(dmt, dmi))
|
||||||
goto bad;
|
goto bad;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user