Lines Matching refs:bd
39 struct bioc_disk bd; in sr_prepare_chunk() local
44 diskfd = sr_open_chunk(devfd, vol, disk, &bd, &realdev, &part); in sr_prepare_chunk()
152 sr_open_chunk(int devfd, int vol, int disk, struct bioc_disk *bd, in sr_open_chunk() argument
158 memset(bd, 0, sizeof(*bd)); in sr_open_chunk()
159 bd->bd_volid = vol; in sr_open_chunk()
160 bd->bd_diskid = disk; in sr_open_chunk()
161 if (ioctl(devfd, BIOCDISK, bd) == -1) in sr_open_chunk()
165 if (bd->bd_status != BIOC_SDONLINE && in sr_open_chunk()
166 bd->bd_status != BIOC_SDREBUILD) { in sr_open_chunk()
173 if (bd->bd_size == 0) in sr_open_chunk()
176 if (strlen(bd->bd_vendor) < 1) in sr_open_chunk()
178 *part = bd->bd_vendor[strlen(bd->bd_vendor) - 1]; in sr_open_chunk()
181 bd->bd_vendor[strlen(bd->bd_vendor) - 1] = '\0'; in sr_open_chunk()
184 if ((diskfd = opendev(bd->bd_vendor, (nowrite ? O_RDONLY : O_RDWR), in sr_open_chunk()