Lines Matching defs:od

66 	struct open_disk	*od;
88 dev->d_opendata = entry->od;
118 entry->od = (struct open_disk *)dev->d_opendata;
119 entry->od->rcnt++;
144 entry->od, entry->od->rcnt);
177 struct open_disk *od;
180 od = (struct open_disk *)dev->d_opendata;
182 blocks * od->sectorsize, (char *)buf, NULL));
190 struct open_disk *od;
195 od = (struct open_disk *)pa->dev->d_opendata;
201 od->sectorsize));
208 od->sectorsize, ptblread);
224 struct open_disk *od;
228 od = (struct open_disk *)dev->d_opendata;
232 ptable_iterate(od->table, &pa, ptable_print);
239 struct open_disk *od;
264 od = (struct open_disk *)dev->d_opendata;
267 dev->d_partition, od);
270 od = (struct open_disk *)malloc(sizeof(struct open_disk));
271 if (od == NULL) {
275 dev->d_opendata = od;
276 od->rcnt = 0;
278 od->mediasize = mediasize;
279 od->sectorsize = sectorsize;
280 od->flags = flags;
282 disk_fmtdev(dev), dev->d_unit, dev->d_slice, dev->d_partition, od);
285 od->table = ptable_open(dev, mediasize / sectorsize, sectorsize,
287 if (od->table == NULL) {
294 if (ptable_gettype(od->table) == PTABLE_BSD &&
297 rc = ptable_getpart(od->table, &part, partition);
303 rc = ptable_getbestpart(od->table, &part);
305 rc = ptable_getpart(od->table, &part, slice);
310 if (ptable_gettype(od->table) == PTABLE_GPT) {
331 od->sectorsize, ptblread);
357 if (od->rcnt < 1) {
358 if (od->table != NULL)
359 ptable_close(od->table);
360 free(od);
370 dev->d_offset, od);
378 struct open_disk *od;
380 od = (struct open_disk *)dev->d_opendata;
381 DEBUG("%s closed => %p [%d]", disk_fmtdev(dev), od, od->rcnt);
382 if (od->flags & DISK_F_NOCACHE) {
383 ptable_close(od->table);
384 free(od);
400 entry->od->rcnt--;
407 entry->od, entry->od->rcnt);
410 if (entry->od->rcnt < 1) {
411 if (entry->od->table != NULL)
412 ptable_close(entry->od->table);
413 free(entry->od);