[PATCH 20/29] Remove the unused iurlinfo, urlInstallData, and fix up URL kickstarts.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 loader/method.c     |    7 -------
 loader/urlinstall.c |   24 +++++-------------------
 loader/urlinstall.h |    2 --
 loader/urls.c       |    5 -----
 loader/urls.h       |    7 -------
 5 files changed, 5 insertions(+), 40 deletions(-)

diff --git a/loader/method.c b/loader/method.c
index e2f4b3b..5e1b4da 100644
--- a/loader/method.c
+++ b/loader/method.c
@@ -477,13 +477,6 @@ void setStage2LocFromCmdline(char * arg, struct loaderData_s * ld) {
                           (((struct nfsInstallData *)ld->stage2Data)->directory),
                           (((struct nfsInstallData *)ld->stage2Data)->mountOpts)
                     );
-    } else if (!strncmp(arg, "ftp:", 4) ||
-               !strncmp(arg, "http", 4)) {
-        ld->method = METHOD_URL;
-        ld->stage2Data = calloc(sizeof(urlInstallData), 1);
-        ((urlInstallData *)ld->stage2Data)->url = strdup(arg);
-
-        logMessage(INFO, "method url - %s", ((urlInstallData *)ld->stage2Data)->url);
     } else if (!strncmp(arg, "cdrom:", 6)) {
         ld->method = METHOD_CDROM;
 
diff --git a/loader/urlinstall.c b/loader/urlinstall.c
index 3ba5a6b..ea40862 100644
--- a/loader/urlinstall.c
+++ b/loader/urlinstall.c
@@ -226,7 +226,6 @@ int promptForUrl(struct loaderData_s *loaderData) {
 
 int getFileFromUrl(char * url, char * dest, 
                    struct loaderData_s * loaderData) {
-    struct iurlinfo ui;
     char **ehdrs = NULL;
     int rc;
     iface_t iface;
@@ -238,18 +237,15 @@ int getFileFromUrl(char * url, char * dest,
         return 1;
     }
 
-    memset(&ui, 0, sizeof(ui));
-    ui.url = url;
-
     logMessage(INFO, "file location: %s", url);
 
     if (!strncmp(url, "http", 4)) {
         ehdrs = headers();
     }
 
-    rc = urlinstTransfer(loaderData, ui.url, ehdrs, dest);
+    rc = urlinstTransfer(loaderData, url, ehdrs, dest);
     if (rc) {
-        logMessage(ERROR, "failed to retrieve %s", ui.url);
+        logMessage(ERROR, "failed to retrieve %s", url);
         return 1;
     }
 
@@ -263,7 +259,6 @@ int kickstartFromUrl(char * url, struct loaderData_s * loaderData) {
 
 void setKickstartUrl(struct loaderData_s * loaderData, int argc,
 		    char ** argv) {
-    char *substr = NULL;
     gchar *url = NULL, *proxy = NULL;
     gboolean noverifyssl = FALSE;
     GOptionContext *optCon = g_option_context_new(NULL);
@@ -305,18 +300,9 @@ void setKickstartUrl(struct loaderData_s * loaderData, int argc,
         return;
     }
 
-    substr = strstr(url, ".img");
-    if (!substr || (substr && *(substr+4) != '\0')) {
-        loaderData->instRepo = strdup(url);
-        loaderData->instRepo_noverifyssl = noverifyssl;
-    } else {
-        if ((loaderData->stage2Data = calloc(sizeof(urlInstallData), 1)) == NULL)
-            return;
-
-        loaderData->method = METHOD_URL;
-        ((urlInstallData *)loaderData->stage2Data)->url = url;
-        ((urlInstallData *)loaderData->stage2Data)->noverifyssl = noverifyssl;
-    }
+    loaderData->instRepo = strdup(url);
+    loaderData->instRepo_noverifyssl = noverifyssl;
+    loaderData->method = METHOD_URL;
 
     if (proxy) {
         splitProxyParam(proxy, &loaderData->proxyUser,
diff --git a/loader/urlinstall.h b/loader/urlinstall.h
index 48bbb54..432d3f7 100644
--- a/loader/urlinstall.h
+++ b/loader/urlinstall.h
@@ -23,8 +23,6 @@
 #include "method.h"
 #include "urls.h"
 
-typedef struct iurlinfo urlInstallData;
-
 void setKickstartUrl(struct loaderData_s * loaderData, int argc,
 		     char ** argv);
 int kickstartFromUrl(char * url, struct loaderData_s * loaderData);
diff --git a/loader/urls.c b/loader/urls.c
index 4728890..72f7706 100644
--- a/loader/urls.c
+++ b/loader/urls.c
@@ -63,11 +63,6 @@ int progress_cb(void *data, double dltotal, double dlnow, double ultotal, double
     return 0;
 }
 
-void urlinfo_copy(struct iurlinfo *dst, const struct iurlinfo *src) {
-    dst->url = strdup(src->url);
-    dst->noverifyssl = src->noverifyssl;
-}
-
 int splitProxyParam(char *param, char **user, char **password, char **proxy) {
     /* proxy=[protocol://][username[:password]@]host[:port] */
     char *pattern = "([A-Za-z]+://)?(([A-Za-z0-9]+)(:[^:@]+)?@)?([^:/]+)(:[0-9]+)?(/.*)?";
diff --git a/loader/urls.h b/loader/urls.h
index d55dfd4..5e984e1 100644
--- a/loader/urls.h
+++ b/loader/urls.h
@@ -23,13 +23,6 @@
 #include "loader.h"
 #include "windows.h"
 
-struct iurlinfo {
-    char * url;
-    int noverifyssl;
-};
-
-void urlinfo_copy(struct iurlinfo *dst, const struct iurlinfo *src);
-
 int splitProxyParam(char *param, char **user, char **password, char **proxy);
 int urlMainSetupPanel(struct loaderData_s *loaderData);
 int urlinstTransfer(struct loaderData_s *loaderData, const char *src,
-- 
1.7.1.1

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


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux