Use nostdinc

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-02-07 17:30:16 +01:00
parent a73d26ead3
commit a1a8d38a58
3 changed files with 16 additions and 24 deletions

View file

@ -146,6 +146,11 @@ usage (int status)
}
void grub_hostfs_init (void);
void grub_hostfs_fini (void);
void grub_host_init (void);
void grub_host_fini (void);
int
main (int argc, char *argv[])
{
@ -204,6 +209,8 @@ main (int argc, char *argv[])
signal (SIGINT, SIG_IGN);
grub_console_init ();
grub_host_init ();
grub_hostfs_init ();
/* XXX: This is a bit unportable. */
grub_util_biosdisk_init (dev_map);
@ -236,6 +243,8 @@ main (int argc, char *argv[])
grub_main ();
grub_fini_all ();
grub_hostfs_fini ();
grub_host_fini ();
grub_machine_fini ();

View file

@ -168,7 +168,7 @@ grub_util_biosdisk_open (const char *name, grub_disk_t disk)
drive = find_grub_drive (name);
if (drive < 0)
return grub_error (GRUB_ERR_BAD_DEVICE,
return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
"no mapping exists for `%s'", name);
disk->has_partitions = 1;
@ -198,7 +198,7 @@ grub_util_biosdisk_open (const char *name, grub_disk_t disk)
fd = open (map[drive].device, O_RDONLY);
if (fd == -1)
return grub_error (GRUB_ERR_BAD_DEVICE, "cannot open `%s' while attempting to get disk size", map[drive].device);
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "cannot open `%s' while attempting to get disk size", map[drive].device);
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__)
if (fstat (fd, &st) < 0 || ! S_ISCHR (st.st_mode))
@ -244,7 +244,7 @@ grub_util_biosdisk_open (const char *name, grub_disk_t disk)
# warning "No special routine to get the size of a block device is implemented for your OS. This is not possibly fatal."
#endif
if (stat (map[drive].device, &st) < 0)
return grub_error (GRUB_ERR_BAD_DEVICE, "cannot stat `%s'", map[drive].device);
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "cannot stat `%s'", map[drive].device);
disk->total_sectors = st.st_size >> GRUB_DISK_SECTOR_BITS;