mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
device_id: remove unused dev pointer from dev_id struct
This commit is contained in:
parent
631b8edefb
commit
e71b663bf5
@ -95,7 +95,6 @@ struct dev_wwid {
|
|||||||
|
|
||||||
struct dev_id {
|
struct dev_id {
|
||||||
struct dm_list list; /* dev->ids */
|
struct dm_list list; /* dev->ids */
|
||||||
struct device *dev;
|
|
||||||
uint16_t idtype; /* DEV_ID_TYPE_ */
|
uint16_t idtype; /* DEV_ID_TYPE_ */
|
||||||
char *idname; /* id string determined by idtype */
|
char *idname; /* id string determined by idtype */
|
||||||
};
|
};
|
||||||
|
@ -1748,7 +1748,6 @@ id_done:
|
|||||||
}
|
}
|
||||||
id->idtype = idtype;
|
id->idtype = idtype;
|
||||||
id->idname = (char *)idname;
|
id->idname = (char *)idname;
|
||||||
id->dev = dev;
|
|
||||||
dm_list_add(&dev->ids, &id->list);
|
dm_list_add(&dev->ids, &id->list);
|
||||||
} else
|
} else
|
||||||
free((char*)idname);
|
free((char*)idname);
|
||||||
@ -2142,7 +2141,6 @@ static int _match_du_to_dev(struct cmd_context *cmd, struct dev_use *du, struct
|
|||||||
return_0;
|
return_0;
|
||||||
id->idtype = DEV_ID_TYPE_DEVNAME;
|
id->idtype = DEV_ID_TYPE_DEVNAME;
|
||||||
id->idname = strdup(du->idname);
|
id->idname = strdup(du->idname);
|
||||||
id->dev = dev;
|
|
||||||
dm_list_add(&dev->ids, &id->list);
|
dm_list_add(&dev->ids, &id->list);
|
||||||
du->dev = dev;
|
du->dev = dev;
|
||||||
dev->id = id;
|
dev->id = id;
|
||||||
@ -2215,7 +2213,6 @@ static int _match_du_to_dev(struct cmd_context *cmd, struct dev_use *du, struct
|
|||||||
*/
|
*/
|
||||||
id->idtype = du->idtype;
|
id->idtype = du->idtype;
|
||||||
id->idname = (char *)idname;
|
id->idname = (char *)idname;
|
||||||
id->dev = dev;
|
|
||||||
dm_list_add(&dev->ids, &id->list);
|
dm_list_add(&dev->ids, &id->list);
|
||||||
|
|
||||||
if (idname && !strcmp(idname, du_idname)) {
|
if (idname && !strcmp(idname, du_idname)) {
|
||||||
@ -2255,7 +2252,6 @@ static int _match_du_to_dev(struct cmd_context *cmd, struct dev_use *du, struct
|
|||||||
/* wwid types are 1,2,3 and idtypes are DEV_ID_TYPE_ */
|
/* wwid types are 1,2,3 and idtypes are DEV_ID_TYPE_ */
|
||||||
id->idtype = wwid_type_to_idtype(dw->type);
|
id->idtype = wwid_type_to_idtype(dw->type);
|
||||||
id->idname = strdup(dw->id);
|
id->idname = strdup(dw->id);
|
||||||
id->dev = dev;
|
|
||||||
dm_list_add(&dev->ids, &id->list);
|
dm_list_add(&dev->ids, &id->list);
|
||||||
du->dev = dev;
|
du->dev = dev;
|
||||||
dev->id = id;
|
dev->id = id;
|
||||||
@ -2560,7 +2556,6 @@ static void _get_devs_with_serial_numbers(struct cmd_context *cmd, struct dm_lis
|
|||||||
goto next_free;
|
goto next_free;
|
||||||
id->idtype = DEV_ID_TYPE_SYS_SERIAL;
|
id->idtype = DEV_ID_TYPE_SYS_SERIAL;
|
||||||
id->idname = (char *)idname;
|
id->idname = (char *)idname;
|
||||||
id->dev = dev;
|
|
||||||
dm_list_add(&dev->ids, &id->list);
|
dm_list_add(&dev->ids, &id->list);
|
||||||
devl->dev = dev;
|
devl->dev = dev;
|
||||||
dm_list_add(devs, &devl->list);
|
dm_list_add(devs, &devl->list);
|
||||||
@ -2847,7 +2842,6 @@ void device_ids_validate(struct cmd_context *cmd, struct dm_list *scanned_devs,
|
|||||||
du->idname = dup_devname1;
|
du->idname = dup_devname1;
|
||||||
du->devname = dup_devname2;
|
du->devname = dup_devname2;
|
||||||
id->idname = dup_devname3;
|
id->idname = dup_devname3;
|
||||||
id->dev = dev;
|
|
||||||
du->dev = dev;
|
du->dev = dev;
|
||||||
dev->id = id;
|
dev->id = id;
|
||||||
dev->flags |= DEV_MATCHED_USE_ID;
|
dev->flags |= DEV_MATCHED_USE_ID;
|
||||||
@ -3652,7 +3646,6 @@ void device_ids_search(struct cmd_context *cmd, struct dm_list *new_devs,
|
|||||||
du->dev = dev;
|
du->dev = dev;
|
||||||
id->idtype = new_idtype;
|
id->idtype = new_idtype;
|
||||||
id->idname = new_idname2;
|
id->idname = new_idname2;
|
||||||
id->dev = dev;
|
|
||||||
dev->id = id;
|
dev->id = id;
|
||||||
dev->flags |= DEV_MATCHED_USE_ID;
|
dev->flags |= DEV_MATCHED_USE_ID;
|
||||||
dm_list_add(&dev->ids, &id->list);
|
dm_list_add(&dev->ids, &id->list);
|
||||||
|
Loading…
Reference in New Issue
Block a user