From 4b46733cea33f0ff2bba0d07f267498619736fcb Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Tue, 30 Mar 2010 16:25:58 +0000 Subject: do not list /dev/fd0 when no floppy is found (#58390) --- mdk-stage1/Makefile | 2 +- mdk-stage1/NEWS | 3 +++ mdk-stage1/thirdparty.c | 4 ++-- mdk-stage1/tools.c | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) (limited to 'mdk-stage1') diff --git a/mdk-stage1/Makefile b/mdk-stage1/Makefile index e319cbf7a..f078e7986 100644 --- a/mdk-stage1/Makefile +++ b/mdk-stage1/Makefile @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -VERSION=1.44 +VERSION=1.45 PRODUCT=drakx-installer-binaries # diff --git a/mdk-stage1/NEWS b/mdk-stage1/NEWS index 074b5a8dc..f6f2a6747 100644 --- a/mdk-stage1/NEWS +++ b/mdk-stage1/NEWS @@ -1,3 +1,6 @@ +1.45: +- do not list /dev/fd0 when no floppy is found (#58390) + 1.44: - rebuild with latest list_modules.pm (might fix #57833) diff --git a/mdk-stage1/thirdparty.c b/mdk-stage1/thirdparty.c index 247b7e1f9..1aba562fd 100644 --- a/mdk-stage1/thirdparty.c +++ b/mdk-stage1/thirdparty.c @@ -68,7 +68,7 @@ static enum return_type thirdparty_choose_device(char ** device, int probe_only) #endif floppy_dev = floppy_device(); - if (strstr(floppy_dev, "/dev/") == floppy_dev) { + if (floppy_dev && strstr(floppy_dev, "/dev/") == floppy_dev) { floppy_dev = floppy_dev + 5; } if (floppy_dev) @@ -132,7 +132,7 @@ static enum return_type thirdparty_choose_device(char ** device, int probe_only) return results; } - if (streq(*device, floppy_dev)) { + if (floppy_dev && streq(*device, floppy_dev)) { /* a floppy is selected, don't try to list partitions */ return RETURN_OK; } diff --git a/mdk-stage1/tools.c b/mdk-stage1/tools.c index 95064f095..433019fca 100644 --- a/mdk-stage1/tools.c +++ b/mdk-stage1/tools.c @@ -357,5 +357,5 @@ char * floppy_device(void) if (names && *names) return asprintf_("/dev/%s", *names); else - return "/dev/fd0"; + return NULL; } -- cgit v1.2.1