Lines Matching defs:ds_fd
92 int ds_fd = -1;
155 if (read(ds_fd, ds_header + ds_headsize, BLK_SIZE) < BLK_SIZE)
187 if (ds_fd >= 0)
188 (void) close(ds_fd);
189 if ((ds_fd = open(device, O_RDONLY)) >= 0 &&
190 read(ds_fd, buf, BLK_SIZE) == BLK_SIZE &&
208 } else if (ds_fd >= 0) {
209 (void) close(ds_fd);
210 ds_fd = -1;
262 ds_fd, ds_realfd, ds_volcnt, ds_volno, ds_totread, ds_volpart,
272 &ds_fd, &ds_realfd, &ds_volcnt, &ds_volno, &ds_totread,
280 * Return true if the file descriptor (ds_fd) is open on the package stream.
285 return (ds_fd >= 0 ? B_TRUE : B_FALSE);
301 if (ds_fd >= 0)
305 if ((ds_fd = open(device, O_RDONLY)) < 0) {
327 if (read(ds_fd, ds_header, BLK_SIZE) != BLK_SIZE) {
352 while (read(ds_fd, ds_header, BLK_SIZE) > 0)
359 if ((ds_fd = open(norewind, O_RDONLY)) < 0) {
375 if (read(ds_fd, ds_header, BLK_SIZE) != BLK_SIZE) {
401 if (read(ds_fd, ds_header + header_size, BLK_SIZE) !=
504 if (n = esystem(cmd, ds_fd, -1)) {
627 if ((ds_fd = open(device, O_RDONLY)) < 0)
651 if (n = esystem(cmd, ds_fd, -1)) {
694 if (n = esystem(cmd, ds_fd, -1)) {
722 * Description: Dumps all data from the static 'ds_fd' file handle into
744 while ((amtread = read(ds_fd, readbuf, BLK_SIZE)) != 0) {
804 oflag = fcntl(ds_fd, F_GETFL, 0);
813 (void) fcntl(ds_fd, F_DUPFD, fd);
828 ds_realfd = ds_fd;
829 ds_fd = fileno(ds_pp);
851 ds_fd = -1;
852 } else if (ds_fd >= 0) {
853 (void) close(ds_fd);
854 ds_fd = -1;