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