FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu Development

 
 
LinkBack Thread Tools
 
Old 11-02-2010, 07:44 PM
David Cantrell
 
Default Use unpack_archive_file() instead of unpackCpioBall()

---
loader/lang.c | 12 ++++--------
loader/method.c | 4 ++--
loader/urlinstall.c | 3 ++-
3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/loader/lang.c b/loader/lang.c
index 035fb75..4f230dc 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.
",
filename);
return;
diff --git a/loader/method.c b/loader/method.c
index d84a2e8..0173f5a 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"
@@ -345,7 +345,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 0998198..80285cd 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");
}

--
1.7.2.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 11-09-2010, 09:45 PM
David Cantrell
 
Default Use unpack_archive_file() instead of unpackCpioBall()

---
loader/lang.c | 12 ++++--------
loader/method.c | 4 ++--
loader/urlinstall.c | 3 ++-
3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/loader/lang.c b/loader/lang.c
index 035fb75..4f230dc 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.
",
filename);
return;
diff --git a/loader/method.c b/loader/method.c
index 844048f..d80462f 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"
@@ -343,7 +343,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 0998198..80285cd 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");
}

--
1.7.3.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 12:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org