summaryrefslogtreecommitdiffstats
path: root/loader/lang.c
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-11-30 22:23:45 +0000
committerMatt Wilson <msw@redhat.com>1999-11-30 22:23:45 +0000
commitbeeb609dffdeb0414ca4658911e5dcb4dd8006a9 (patch)
treeca5f92d6c694f54af9cf48f0161571e8d5fa86c3 /loader/lang.c
parentf687e3cd850fb2378252c6d2fb0c3bbac2ef3107 (diff)
downloadanaconda-beeb609dffdeb0414ca4658911e5dcb4dd8006a9.tar.gz
anaconda-beeb609dffdeb0414ca4658911e5dcb4dd8006a9.tar.xz
anaconda-beeb609dffdeb0414ca4658911e5dcb4dd8006a9.zip
o changes needed to use rpmio from rpm HEADr0-7-3
o typo in exception screen o other things that came along the way.
Diffstat (limited to 'loader/lang.c')
-rw-r--r--loader/lang.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/loader/lang.c b/loader/lang.c
index a1c005e78..d9484a3bc 100644
--- a/loader/lang.c
+++ b/loader/lang.c
@@ -10,6 +10,10 @@
#include <sys/ioctl.h>
#include <unistd.h>
#include <zlib.h>
+
+#include <glob.h> /* XXX rpmlib.h */
+#include <dirent.h> /* XXX rpmlib.h */
+
#include <rpm/rpmio.h>
#include <linux/keyboard.h>
#include <linux/kd.h>
@@ -121,18 +125,18 @@ void loadLanguage (char * file, int flags) {
sprintf(filename, "/etc/loader.tr");
}
- stream = fdOpen(file, O_RDONLY, 0644);
+ stream = Fopen (file, "r.fdio");
- if (fdFileno(stream) < 0) {
+ if (!stream || Ferror (stream)) {
newtWinMessage("Error", "OK", "Cannot open %s: %s. Installation will "
- "proceed in English.", file, strerror(errno));
+ "proceed in English.", file, Fstrerror(stream));
return ;
}
sprintf(filename, "%s.tr", key);
rc = installCpioFile(stream, filename, "/tmp/translation", 1);
- fdClose(stream);
+ Fclose(stream);
if (rc || access("/tmp/translation", R_OK)) {
newtWinMessage("Error", "OK", "Cannot get translation file %s.\n",
@@ -181,15 +185,15 @@ static int loadFont(char * fontFile, int flags) {
#if 0
if (!FL_TESTING(flags)) {
#endif
- stream = fdOpen("/etc/fonts.cgz", O_RDONLY, 0644);
- if (fdFileno(stream) < 0) {
+ stream = Fopen("/etc/fonts.cgz", "r.fdio");
+ if (!stream || Ferror (stream)) {
newtWinMessage("Error", "OK",
- "Cannot open fonts: %s", strerror(errno));
+ "Cannot open fonts: %s", Fstrerror(stream));
return LOADER_ERROR;
}
rc = installCpioFile(stream, fontFile, "/tmp/font", 1);
- fdClose(stream);
+ Fclose(stream);
if (rc || access("/tmp/font", R_OK)) {
return LOADER_ERROR;
}