summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2010-11-02 09:41:58 -1000
committerDavid Cantrell <dcantrell@redhat.com>2010-11-10 08:49:36 -1000
commit34249ea3714f7dc02b869d136db0231e02452ff2 (patch)
treef74a37535149c8fcc4cb4995cb22160f698354cf /loader
parent2058434b67377391061051dbfd3919cd55c39a79 (diff)
Use unpack_archive_file() instead of unpackCpioBall()
Diffstat (limited to 'loader')
-rw-r--r--loader/lang.c12
-rw-r--r--loader/method.c4
-rw-r--r--loader/urlinstall.c3
3 files changed, 8 insertions, 11 deletions
diff --git a/loader/lang.c b/loader/lang.c
index 035fb75c8..4f230dcd2 100644
--- a/loader/lang.c
+++ b/loader/lang.c
@@ -39,6 +39,7 @@
#include "lang.h"
#include "loadermisc.h"
#include "windows.h"
+#include "unpack.h"
#include "../pyanaconda/isys/lang.h"
#include "../pyanaconda/isys/isys.h"
@@ -141,7 +142,6 @@ int getLangInfo(struct langInfo ** langs) {
void loadLanguage (char * file) {
char filename[200];
- gzFile stream;
int fd, hash, rc;
char * key = getenv("LANGKEY");
@@ -159,20 +159,16 @@ void loadLanguage (char * file) {
sprintf(filename, "/etc/loader.tr");
}
- stream = gzopen(file, "r");
-
- if (!stream) {
+ if (access(file, R_OK) == -1) {
newtWinMessage("Error", "OK", "Translation for %s is not available. "
"The Installation will proceed in English.", key);
return ;
}
sprintf(filename, "%s.tr", key);
+ rc = unpack_archive_file(filename, "/tmp/translation");
- rc = installCpioFile(stream, filename, "/tmp/translation", 1);
- gzclose(stream);
-
- if (rc || access("/tmp/translation", R_OK)) {
+ if (rc != ARCHIVE_OK || access("/tmp/translation", R_OK) == -1) {
newtWinMessage("Error", "OK", "Cannot get translation file %s.\n",
filename);
return;
diff --git a/loader/method.c b/loader/method.c
index 0d28460d2..b3bb941ae 100644
--- a/loader/method.c
+++ b/loader/method.c
@@ -44,10 +44,10 @@
#include "lang.h"
#include "mediacheck.h"
#include "method.h"
+#include "unpack.h"
#include "../pyanaconda/isys/imount.h"
#include "../pyanaconda/isys/isys.h"
-#include "../pyanaconda/isys/cpio.h"
#include "../pyanaconda/isys/log.h"
#include "devt.h"
@@ -310,7 +310,7 @@ void copyUpdatesImg(char * path) {
umount("/tmp/update-disk");
unlink("/tmp/update-disk");
} else {
- unpackCpioBall(path, "/tmp/updates");
+ unpack_archive_file(path, "/tmp/updates");
}
}
}
diff --git a/loader/urlinstall.c b/loader/urlinstall.c
index 0998198e8..80285cd06 100644
--- a/loader/urlinstall.c
+++ b/loader/urlinstall.c
@@ -47,6 +47,7 @@
#include "cdinstall.h"
#include "urls.h"
#include "windows.h"
+#include "unpack.h"
/* boot flags */
extern uint64_t flags;
@@ -177,7 +178,7 @@ int loadUrlImages(struct loaderData_s *loaderData) {
unlink("/tmp/updates-disk.img");
unlink("/tmp/update-disk");
} else if (!access("/tmp/updates-disk.img", R_OK)) {
- unpackCpioBall("/tmp/updates-disk.img", "/tmp/updates");
+ unpack_archive_file("/tmp/updates-disk.img", "/tmp/updates");
unlink("/tmp/updates-disk.img");
}