Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Kubuntu Development (http://www.linux-archive.org/kubuntu-development/)
-   -   Remove unused unpackCpioBall() function. (http://www.linux-archive.org/kubuntu-development/447280-remove-unused-unpackcpioball-function.html)

David Cantrell 11-02-2010 07:44 PM

Remove unused unpackCpioBall() function.
 
---
loader/method.c | 36 ------------------------------------
loader/method.h | 1 -
2 files changed, 0 insertions(+), 37 deletions(-)

diff --git a/loader/method.c b/loader/method.c
index 0173f5a..1cb826e 100644
--- a/loader/method.c
+++ b/loader/method.c
@@ -301,42 +301,6 @@ static void copyErrorFn (char *msg) {
newtWinMessage(_("Error"), _("OK"), _(msg));
}

-/*
- * unpack a gzipped cpio ball into a tree rooted at rootDir
- * returns 0 on success, 1 on failure
- */
-int unpackCpioBall(char * ballPath, char * rootDir) {
- gzFile fd;
- char *buf, *cwd;
- int rc = 1;
-
- if (access(ballPath, R_OK))
- return 1;
-
- if (access(rootDir, R_OK)) {
- if (g_mkdir_with_parents(rootDir, 0755) == -1)
- logMessage(ERROR, "mkdir error on %s: %m", rootDir);
- }
-
- buf = (char *)malloc(PATH_MAX);
- cwd = getcwd(buf, PATH_MAX);
- if ((rc = chdir(rootDir)) == 0) {
- fd = gunzip_open(ballPath);
- if (fd) {
- if (!installCpioFile(fd, NULL, NULL, 0)) {
- logMessage(INFO, "copied contents of %s into %s", ballPath,
- rootDir);
- rc = chdir(cwd);
- return 0;
- }
- gunzip_close(fd);
- }
- rc = chdir(cwd);
- }
-
- return 1;
-}
-
void copyUpdatesImg(char * path) {
if (!access(path, R_OK)) {
if (!doPwMount(path, "/tmp/update-disk", "auto", "ro", NULL)) {
diff --git a/loader/method.h b/loader/method.h
index 0de8914..6218343 100644
--- a/loader/method.h
+++ b/loader/method.h
@@ -45,7 +45,6 @@ void queryIsoMediaCheck(char * isoDir);

int getFileFromBlockDevice(char *device, char *path, char * dest);

-int unpackCpioBall(char * ballPath, char * rootDir);
void copyUpdatesImg(char * path);
void copyProductImg(char * path);

--
1.7.2.3

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

David Cantrell 11-09-2010 09:45 PM

Remove unused unpackCpioBall() function.
 
---
loader/method.c | 34 ----------------------------------
loader/method.h | 1 -
2 files changed, 0 insertions(+), 35 deletions(-)

diff --git a/loader/method.c b/loader/method.c
index d80462f..1cb826e 100644
--- a/loader/method.c
+++ b/loader/method.c
@@ -301,40 +301,6 @@ static void copyErrorFn (char *msg) {
newtWinMessage(_("Error"), _("OK"), _(msg));
}

-/*
- * unpack a gzipped cpio ball into a tree rooted at rootDir
- * returns 0 on success, 1 on failure
- */
-int unpackCpioBall(char * ballPath, char * rootDir) {
- gzFile fd;
- char *buf, *cwd;
- int rc = 1;
-
- if (access(ballPath, R_OK))
- return 1;
-
- if (access(rootDir, R_OK))
- mkdirChain(rootDir);
-
- buf = (char *)malloc(PATH_MAX);
- cwd = getcwd(buf, PATH_MAX);
- if ((rc = chdir(rootDir)) == 0) {
- fd = gunzip_open(ballPath);
- if (fd) {
- if (!installCpioFile(fd, NULL, NULL, 0)) {
- logMessage(INFO, "copied contents of %s into %s", ballPath,
- rootDir);
- rc = chdir(cwd);
- return 0;
- }
- gunzip_close(fd);
- }
- rc = chdir(cwd);
- }
-
- return 1;
-}
-
void copyUpdatesImg(char * path) {
if (!access(path, R_OK)) {
if (!doPwMount(path, "/tmp/update-disk", "auto", "ro", NULL)) {
diff --git a/loader/method.h b/loader/method.h
index 0de8914..6218343 100644
--- a/loader/method.h
+++ b/loader/method.h
@@ -45,7 +45,6 @@ void queryIsoMediaCheck(char * isoDir);

int getFileFromBlockDevice(char *device, char *path, char * dest);

-int unpackCpioBall(char * ballPath, char * rootDir);
void copyUpdatesImg(char * path);
void copyProductImg(char * path);

--
1.7.3.2

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


All times are GMT. The time now is 07:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.