mirror of
https://git.proxmox.com/git/grub2
synced 2025-10-06 11:08:37 +00:00

lots of OS-specific code to iterate over all possible devices, we use it in a number of scripts to discover devices and reimplementing those in terms of something else would be very complicated.
14 lines
301 B
C
14 lines
301 B
C
#include <stdio.h>
|
|
|
|
#include <grub/util/deviceiter.h>
|
|
|
|
void
|
|
grub_util_emit_devicemap_entry (FILE *fp, char *name, int is_floppy,
|
|
int *num_fd, int *num_hd)
|
|
{
|
|
if (is_floppy)
|
|
fprintf (fp, "(fd%d)\t%s\n", (*num_fd)++, name);
|
|
else
|
|
fprintf (fp, "(hd%d)\t%s\n", (*num_hd)++, name);
|
|
}
|