Lines Matching defs:fd
174 int fd,
219 if (lseek(fd, (off_t)(startblk * DEV_BSIZE), SEEK_SET) < 0) {
225 if (write(fd, buffer, iosize) != iosize) {
230 if (lseek(fd, (off_t)(startblk * DEV_BSIZE), SEEK_SET) < 0) {
235 if (read(fd, buffer, iosize) != iosize) {
290 if (devid_get(fd, &devid) == 0) {
306 if (lseek(fd, (off_t)(firstblk * DEV_BSIZE), SEEK_SET) < 0) {
311 if (write(fd, mb, DEV_BSIZE) != DEV_BSIZE) {
316 if (lseek(fd, (off_t)(firstblk * DEV_BSIZE), SEEK_SET) < 0) {
321 if (read(fd, mb, DEV_BSIZE) != DEV_BSIZE) {
340 int fd,
385 if (devid_get(fd, &devid) == 0) {
407 if (lseek(fd, (off_t)(firstblk * DEV_BSIZE), SEEK_SET) < 0)
410 if (write(fd, mb, DEV_BSIZE) != DEV_BSIZE)
413 if (lseek(fd, (off_t)(firstblk * DEV_BSIZE), SEEK_SET) < 0)
416 if (read(fd, mb, DEV_BSIZE) != DEV_BSIZE)
1126 int ret = 1, fd;
1146 fd = open(tsname, O_RDONLY);
1147 if (fd == -1)
1149 sz = read(fd, tbuf, tsz);
1150 (void) close(fd);
1154 fd = open(sname, O_RDONLY);
1155 if (fd == -1)
1157 sz = read(fd, buf, tsz);
1158 (void) close(fd);
1454 int fd;
1457 if ((fd = open(np->rname, O_RDWR)) < 0)
1461 if (mkmasterblks(sp, np, fd, (i * dbsize + 16), dbsize,
1463 (void) close(fd);
1467 (void) close(fd);
1796 int fd = -1;
2094 if ((fd = open(np->rname, O_RDWR)) >= 0) {
2095 meta_mkdummymaster(sp, fd, 16);
2096 (void) close(fd);