Lines Matching defs:fh
191 int fh;
268 fh = open(argv[1],O_RDONLY);
269 if (fh < 0) {
273 bootsize = lseek(fh,0L,SEEK_END);
274 lseek(fh,0L,SEEK_SET);
284 if (read(fh,bootcode,bootsize) != bootsize) {
289 close(fh);
320 fh = open(argv[2],O_RDWR|O_CREAT,S_IREAD|S_IWRITE);
321 if (fh < 0) {
327 if (lseek(fh, bootsect_offset * 512, SEEK_SET) != (bootsect_offset * 512)) {
331 if (write(fh,&bootblock,sizeof(bootblock)) != sizeof(bootblock)) {
336 if (lseek(fh, bootcode_offset * 512, SEEK_SET) != (bootcode_offset * 512)) {
340 if (write(fh,bootcode,bootbufsize) != bootbufsize) {
345 close(fh);