[PATCH f15-branch] Make cherry-pick from master complete (#673824)

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

 



patch of cherry-picking commit
4635296beb7a51712dc95ff9903dd44af1767758 was made on top of
a patch that went only into master.
---
 loader/kickstart.c |    8 +-------
 loader/net.c       |   14 ++++++++++++++
 loader/net.h       |    1 +
 3 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/loader/kickstart.c b/loader/kickstart.c
index 8c8b3bf..1893375 100644
--- a/loader/kickstart.c
+++ b/loader/kickstart.c
@@ -412,13 +412,7 @@ int isKickstartFileRemote(char *ksFile) {
         location = ksFile + 3;
     }
 
-    if (!strncmp(location, "http", 4) ||
-        !strncmp(location, "ftp://";, 6) ||
-        !strncmp(location, "nfs:", 4)) {
-        return 1;
-    } else {
-        return 0;
-    }
+    return isURLRemote(location);
 }
 
 void getKickstartFile(struct loaderData_s *loaderData) {
diff --git a/loader/net.c b/loader/net.c
index 399aa16..14ffee0 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -2077,6 +2077,20 @@ int get_connection(iface_t *iface) {
     return 3;
 }
 
+int isURLRemote(char *url) {
+    if (url == NULL) {
+        return 0;
+    }
+
+    if (!strncmp(url, "http", 4) ||
+        !strncmp(url, "ftp://";, 6) ||
+        !strncmp(url, "nfs:", 4)) {
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
 int isValidIPv4Address(const char *address) {
     int rc;
     struct in_addr addr;
diff --git a/loader/net.h b/loader/net.h
index d34e42f..9bf53c1 100644
--- a/loader/net.h
+++ b/loader/net.h
@@ -73,6 +73,7 @@ int kickstartNetworkUp(struct loaderData_s * loaderData,
                        iface_t * iface);
 void splitHostname (char *str, char **host, char **port);
 int get_connection(iface_t * iface);
+int isURLRemote(char *url);
 int isValidIPv4Address(const char *address);
 #ifdef ENABLE_IPV6
 int isValidIPv6Address(const char *address);
-- 
1.7.2

_______________________________________________
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