Lines Matching defs:fp
446 FILE *fp;
452 fp = fopen (device, "r");
453 if (! fp)
481 if (ioctl (fileno (fp), CDROM_GET_CAPABILITY, 0) >= 0)
489 if (fstat (fileno (fp), &st))
496 && ioctl (fileno (fp), HDIO_GETGEO, &hdg))
504 if (ioctl (fileno (fp), CDIOCCLRDEBUG, 0) >= 0)
510 if (fread (buf, 1, 512, fp) != 512)
512 fclose (fp);
516 fclose (fp);
522 read_device_map (FILE *fp, char **map, const char *map_file)
547 while (fgets (buf, sizeof (buf), fp))
651 FILE *fp = 0;
667 fp = fopen (map_file, "r");
668 if (fp)
672 ret = read_device_map (fp, *map, map_file);
673 fclose (fp);
686 fp = fopen (map_file, "w");
696 if (fp)
697 fprintf (fp, "(fd%d)\t%s\n", i, name);
728 if (fp)
729 fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
736 if (fp)
737 fclose (fp);
755 if (fp)
756 fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
775 if (fp)
776 fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
795 if (fp)
796 fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
824 if (fp)
825 fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
835 if (fp)
836 fclose (fp);