Lines Matching refs:sectorsize
122 g_parse_lba(const char *lbastr, unsigned int sectorsize, off_t *sectors)
128 assert(sectorsize > 0);
136 unit = sectorsize;
168 unit = sectorsize; /* sector */
183 if (number % sectorsize)
185 number /= sectorsize;
209 ssize_t sectorsize;
215 sectorsize = g_sectorsize(fd);
216 if (sectorsize == -1)
217 sectorsize = 0;
219 return ((unsigned int)sectorsize);
228 ssize_t sectorsize;
243 sectorsize = g_sectorsize(fd);
244 if (sectorsize == -1) {
248 assert(sectorsize >= (ssize_t)size);
249 sector = malloc(sectorsize);
254 if (pread(fd, sector, sectorsize, mediasize - sectorsize) !=
255 sectorsize) {
285 ssize_t sectorsize;
300 sectorsize = g_sectorsize(fd);
301 if (sectorsize == -1) {
305 assert(sectorsize >= (ssize_t)size);
306 sector = malloc(sectorsize);
312 bzero(sector + size, sectorsize - size);
313 if (pwrite(fd, sector, sectorsize, mediasize - sectorsize) !=
314 sectorsize) {
331 ssize_t sectorsize;
346 sectorsize = g_sectorsize(fd);
347 if (sectorsize <= 0) {
351 sector = malloc(sectorsize);
357 if (pread(fd, sector, sectorsize, mediasize - sectorsize) !=
358 sectorsize) {
368 bzero(sector, sectorsize);
369 if (pwrite(fd, sector, sectorsize, mediasize - sectorsize) !=
370 sectorsize) {