diff options
Diffstat (limited to 'mdk-stage1/tools.c')
-rw-r--r-- | mdk-stage1/tools.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mdk-stage1/tools.c b/mdk-stage1/tools.c index 7724c6e72..e3a0fa479 100644 --- a/mdk-stage1/tools.c +++ b/mdk-stage1/tools.c @@ -42,7 +42,8 @@ #include "automatic.h" #include "tools.h" - +#include "probing.h" +#include "modules.h" static struct param_elem params[50]; static int param_number = 0; @@ -476,6 +477,17 @@ int kernel_version(void) return charstar_to_int(val.release + 2); } +char * floppy_device(void) +{ + char ** names, ** models; + my_insmod("sd_mod", ANY_DRIVER_TYPE, NULL, 0); + get_medias(FLOPPY, &names, &models, BUS_ANY); + if (names && *names) + return asprintf_("/dev/%s", *names); + else + return "/dev/fd0"; +} + char * asprintf_(const char *msg, ...) { int n; |