summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-09-05 16:34:24 +0000
committerJeremy Katz <katzj@redhat.com>2002-09-05 16:34:24 +0000
commit5deccaced77a7ef64e161fab9415157d8919b15f (patch)
tree1fecd9d666adabe8e9390a0fcde99639ec58b70a /loader
parenta78c9e098fe9001af3ddff99cc46a3f2112dd881 (diff)
downloadanaconda-5deccaced77a7ef64e161fab9415157d8919b15f.tar.gz
anaconda-5deccaced77a7ef64e161fab9415157d8919b15f.tar.xz
anaconda-5deccaced77a7ef64e161fab9415157d8919b15f.zip
merge anaconda-8-0-branch to HEAD
Diffstat (limited to 'loader')
-rw-r--r--loader/devices.c24
-rw-r--r--loader/dietstubs.c4
-rw-r--r--loader/loader.c4
-rw-r--r--loader/mkctype.c10
4 files changed, 39 insertions, 3 deletions
diff --git a/loader/devices.c b/loader/devices.c
index 09ab1e8fc..c79ccbd34 100644
--- a/loader/devices.c
+++ b/loader/devices.c
@@ -24,6 +24,10 @@
#include "kudzu/kudzu.h"
#include "isys/cpio.h"
+
+/* pulled in from loader.c */
+char *getCurrentFloppyDevice(void);
+
void eject(char * deviceName) {
int fd;
@@ -223,6 +227,7 @@ int devLoadDriverDisk(moduleInfoSet modInfo, moduleList modLoaded,
int askForExistence, char * device) {
int rc;
int done = 0;
+ char *origdev, *usedev;
struct driverDiskInfo * ddi;
ddi = calloc(sizeof(*ddi), 1);
@@ -246,11 +251,24 @@ int devLoadDriverDisk(moduleInfoSet modInfo, moduleList modLoaded,
device or IDE CD-ROM (i.e. it is only USB), they may have
unplugged their CD-ROM at this point to plug in a USB floppy
device. */
+
+ /* XXXX this is making the big assumption we are only pulling a
+ driver disk from the floppy device. setFloppyDevice() will
+ set the extern char *floppyDevice to the proper device */
+
+ /* If floppyDevice changed after calling setFloppyDevice(), use
+ the new value. Otherwise use the value we were passed. */
+ origdev = strdup(getCurrentFloppyDevice());
setFloppyDevice(flags);
+ if (strcmp(origdev, getCurrentFloppyDevice()))
+ usedev = getCurrentFloppyDevice();
+ else
+ usedev = device;
+ free(origdev);
- ddi->device = strdup(device);
- ddi->mntDevice = malloc(strlen(device) + 10);
- sprintf(ddi->mntDevice, "/tmp/%s", device);
+ ddi->device = strdup(usedev);
+ ddi->mntDevice = malloc(strlen(usedev) + 10);
+ sprintf(ddi->mntDevice, "/tmp/%s", usedev);
devMakeInode(ddi->device, ddi->mntDevice);
diff --git a/loader/dietstubs.c b/loader/dietstubs.c
index 008dbaef4..dab88965f 100644
--- a/loader/dietstubs.c
+++ b/loader/dietstubs.c
@@ -160,3 +160,7 @@ void * __rawmemchr (void* s, int c) {
s++;
return s;
}
+
+char * dcgettext (const char *domainname, const char *msgid, int category) {
+ return msgid;
+}
diff --git a/loader/loader.c b/loader/loader.c
index 0bea23c59..f66eea9ce 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -3050,6 +3050,10 @@ void loadUfs(struct knownDevices *kd, moduleList modLoaded,
#define loadUfs(kd,modLoaded,modDepsPtr,flags) do { } while (0)
#endif
+/* return value of global floppyDevice */
+char *getCurrentFloppyDevice() {
+ return floppyDevice;
+}
void setFloppyDevice(int flags) {
#if defined(__i386__) || defined(__ia64__)
struct device ** devices;
diff --git a/loader/mkctype.c b/loader/mkctype.c
index c8d34b9c3..ed00411a9 100644
--- a/loader/mkctype.c
+++ b/loader/mkctype.c
@@ -1,6 +1,12 @@
#include <ctype.h>
#include <stdio.h>
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+# define __ctype_b (*__ctype_b_loc())
+# define __ctype_tolower (*__ctype_tolower_loc())
+# define __ctype_toupper (*__ctype_toupper_loc())
+#endif
+
int main(int argc, char ** argv) {
int i;
@@ -43,5 +49,9 @@ int main(int argc, char ** argv) {
printf("\n};\n\n");
printf("const int * __ctype_tolower = __ctype_tolower_internal + 128;\n\n");
+ printf ("const unsigned short int **__ctype_b_loc (void) { return &__ctype_b; }\n");
+ printf ("const int **__ctype_toupper_loc (void) { return &__ctype_toupper; }\n");
+ printf ("const int **__ctype_tolower_loc (void) { return &__ctype_tolower; }\n\n");
+
return 0;
};