Lines Matching defs:fcode_fd

143 	int fd, fcode_fd = -1, errnum = 0, devcnt = 0, retval = 0, isSbus = 0;
169 if ((fcode_fd = open(file, O_RDONLY)) < 0) {
174 if (read(fcode_fd, fcode_buf, FCODE_HDR) != FCODE_HDR) {
176 (void) close(fcode_fd);
185 isSbus = q_findSbusfile(fcode_fd, &sbus_off);
187 (void) close(fcode_fd);
223 (void) close(fcode_fd);
234 (void) close(fcode_fd);
341 (void) close(fcode_fd);
369 if (q_load_file(fcode_fd,
388 if (fcode_fd != -1)
389 (void) close(fcode_fd);
768 q_load_file(int fcode_fd, char *device)
777 if (lseek(fcode_fd, 0, SEEK_SET) == -1) {
779 (void) close(fcode_fd);
782 if (fstat(fcode_fd, &stat) == -1) {
784 (void) close(fcode_fd);
795 (void) close(fcode_fd);
802 (void) close(fcode_fd);
808 if (read(fcode_fd, download_p->dl_fcode, fcode_size)
812 (void) close(fcode_fd);
816 if (read(fcode_fd, bin, fcode_size)
820 (void) close(fcode_fd);
966 * fcode_fd file descriptor to a fcode file
975 fcode_load_file(int fcode_fd, char *device, int *fcio_errno)
988 if (lseek(fcode_fd, 0, SEEK_SET) == -1) {
993 if (fstat(fcode_fd, &stat) == -1) {
1006 if (read(fcode_fd, bin, fcode_size)
1052 int fcode_fd = -1;
1070 if ((fcode_fd = open(file, O_RDONLY)) < 0) {
1084 (void) close(fcode_fd);
1251 if (emulex_fcode_reader(fcode_fd, "fcode-version",
1258 (void) close(fcode_fd);
1273 if (fcode_load_file(fcode_fd, phys_path,
1296 if (fcode_fd != -1)
1297 (void) close(fcode_fd);
1353 emulex_fcode_reader(int fcode_fd, char *pattern, char *pattern_value,
1369 if (!fcode_fd || !pattern_value || pattern_value_size < 8) {
1373 if (fstat(fcode_fd, &stat) == -1) {
1388 lseek(fcode_fd, 0, SEEK_SET);
1389 read(fcode_fd, image, image_size);