summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/stage1.c
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-11-21 14:43:32 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-11-21 14:43:32 +0000
commit06e0bdfe68920691681c0db04f31dc1c90fdad98 (patch)
tree0855cbcf8e5bd3070241d80cf4a155ca5aa7989d /mdk-stage1/stage1.c
parente7824747d4e6dff795518d8f70b82ac08fa332f2 (diff)
downloaddrakx-backup-do-not-use-06e0bdfe68920691681c0db04f31dc1c90fdad98.tar
drakx-backup-do-not-use-06e0bdfe68920691681c0db04f31dc1c90fdad98.tar.gz
drakx-backup-do-not-use-06e0bdfe68920691681c0db04f31dc1c90fdad98.tar.bz2
drakx-backup-do-not-use-06e0bdfe68920691681c0db04f31dc1c90fdad98.tar.xz
drakx-backup-do-not-use-06e0bdfe68920691681c0db04f31dc1c90fdad98.zip
migrate to pcmcia support from kernel, patching untouched imported
sources from pcmcia-cs-3.1.29, to ease further updates of vendor code (start from a clean pcmcia_ subdir)
Diffstat (limited to 'mdk-stage1/stage1.c')
-rw-r--r--mdk-stage1/stage1.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c
index de9bffd2f..0db624951 100644
--- a/mdk-stage1/stage1.c
+++ b/mdk-stage1/stage1.c
@@ -1,9 +1,9 @@
/*
* Guillaume Cottenceau (gc@mandrakesoft.com)
*
- * Copyright 2000 MandrakeSoft
+ * Copyright 2000-2001 MandrakeSoft
*
- * View the homepage: http://us.mandrakesoft.com/~gc/html/stage1.html
+ * View the homepage: http://people.mandrakesoft.com/~gc/html/stage1.html
*
*
* This software may be freely redistributed under the terms of the GNU
@@ -48,7 +48,7 @@
#include "insmod.h"
#ifdef ENABLE_PCMCIA
-#include "pcmcia/pcmcia.h"
+#include "pcmcia_/pcmcia.h"
#endif
#ifndef DISABLE_CDROM
@@ -268,6 +268,20 @@ static void expert_third_party_modules(void)
static void handle_pcmcia(char ** pcmcia_adapter)
{
#ifdef ENABLE_PCMCIA
+ char buf[50];
+ int fd = open("/proc/version", O_RDONLY);
+ int size;
+ if (fd == -1)
+ fatal_error("could not open /proc/version");
+ size = read(fd, buf, sizeof(buf));
+ buf[size-1] = '\0'; // -1 to eat the \n
+ close(fd);
+ buf[17] = '\0'; // enough to extract `2.2'
+ if (ptr_begins_static_str(buf+14, "2.2")) {
+ stg1_error_message("We now use kernel pcmcia support and this won't work with a 2.2 kernel.");
+ return;
+ }
+
*pcmcia_adapter = pcmcia_probe();
if (!*pcmcia_adapter) {
log_message("no pcmcia adapter found");