Lines Matching refs:di
99 static int dev_stor_get(int type, int *more, struct device_info *di) in dev_stor_get() argument
110 if (di->cookie != NULL) { in dev_stor_get()
113 if (di->cookie == in dev_stor_get()
126 di->cookie = (void *)blk_get_dev(specs[type].name, i); in dev_stor_get()
128 if (di->cookie != NULL) { in dev_stor_get()
140 di->type = specs[type].type; in dev_stor_get()
142 dd = (struct blk_desc *)di->cookie; in dev_stor_get()
147 di->di_stor.block_count = dd->lba; in dev_stor_get()
148 di->di_stor.block_size = dd->blksz; in dev_stor_get()
151 di->cookie = NULL; in dev_stor_get()
175 static int dev_is_stor(int type, struct device_info *di) in dev_is_stor() argument
177 return (dev_stor_type(di->cookie) == type) ? 1 : 0; in dev_is_stor()
181 static int dev_enum_stor(int type, struct device_info *di) in dev_enum_stor() argument
204 if (di->cookie == NULL) { in dev_enum_stor()
211 found = dev_stor_get(type, &more, di); in dev_enum_stor()
214 } else if (dev_is_stor(type, di)) { in dev_enum_stor()
223 found = dev_stor_get(type, &more, di); in dev_enum_stor()
247 found = dev_stor_get(type, &more, di); in dev_enum_stor()
264 (u_int32_t)di->cookie); in dev_enum_stor()
281 int dev_enum_storage(struct device_info *di) in dev_enum_storage() argument
287 if (dev_enum_stor(i, di)) in dev_enum_storage()