Re: [PATCH] Always return correct network config, when kickstartNetworkUp returns 0 (#495042)

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

 



Hi,

Looks ok,

Ack.

Regards,

Hans


On 12/14/2009 03:45 PM, Martin Sivak wrote:
If kickstartNetworkUp finishes successfully, copy the network config to
persistent store. If we call it again with network already configured,
just return 0 and fill the net configuration from the recorded state.
---
  loader2/net.c |    7 +++++++
  1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/loader2/net.c b/loader2/net.c
index 58af1db..526df3d 100644
--- a/loader2/net.c
+++ b/loader2/net.c
@@ -2424,10 +2424,14 @@ int chooseNetworkInterface(struct loaderData_s * loaderData) {
  int kickstartNetworkUp(struct loaderData_s * loaderData,
                         struct networkDeviceConfig *netCfgPtr) {
      int rc, query;
+    static struct networkDeviceConfig netCfgStore;

      /* we may have networking already, so return to the caller */
      if ((loaderData->ipinfo_set == 1) || (loaderData->ipv6info_set == 1)) {
          logMessage(INFO, "networking already configured in kickstartNetworkUp");
+
+        /* Give the network information to the caller (#495042) */
+        memcpy(netCfgPtr,&netCfgStore, sizeof(netCfgStore));
          return 0;
      }

@@ -2493,6 +2497,9 @@ int kickstartNetworkUp(struct loaderData_s * loaderData,
              break;
      } while (1);

+    /* Store all information for possible subsequent calls (#495042) */
+    memcpy(&netCfgStore, netCfgPtr, sizeof(netCfgStore));
+
      return 0;
  }


_______________________________________________
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