Lines Matching refs:fh
130 int fh;
217 fh = open(argv[2],O_RDONLY|O_BINARY);
218 if (fh < 0) {
222 flashsize = lseek(fh,0L,SEEK_END);
223 lseek(fh,0L,SEEK_SET);
232 if (read(fh,flashcode+CFE_BIENDIAN_LE_OFFSET,flashsize) != flashsize) {
237 close(fh);
248 fh = open(argv[1],O_RDONLY|O_BINARY);
249 if (fh < 0) {
254 be_size = lseek(fh,0L,SEEK_END);
255 lseek(fh,0L,SEEK_SET);
259 close(fh);
263 if (read(fh,flashcode,be_size) != be_size) {
268 close(fh);
277 fh = open(argv[1],O_RDONLY|O_BINARY);
278 if (fh < 0) {
283 flashsize = lseek(fh,0L,SEEK_END);
284 lseek(fh,0L,SEEK_SET);
292 if (read(fh,flashcode,flashsize) != flashsize) {
297 close(fh);
330 fh = open(outfile,O_RDWR|O_CREAT|O_TRUNC,S_IREAD|S_IWRITE|S_IRGRP|S_IWGRP|S_IROTH|O_BINARY);
331 if (fh < 0) {
335 if (write(fh,&header,sizeof(header)) != sizeof(header)) {
339 if (write(fh,flashcode,flashsize) != flashsize) {
346 close(fh);