Re: [PATCH rhel6-branch 03/11] Parse all network commands in ks (#638131)

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

 



On 01/10/2011 05:57 PM, Chris Lumens wrote:
diff --git a/loader/kickstart.c b/loader/kickstart.c
index 007d053..37125ce 100644
--- a/loader/kickstart.c
+++ b/loader/kickstart.c
@@ -546,11 +546,15 @@ static void setMediaCheck(struct loaderData_s * loaderData, int argc,
  void runKickstart(struct loaderData_s * loaderData) {
      struct ksCommandNames * cmd;
      int argc;
-    char ** argv;
+    char ** argv = NULL;

      logMessage(INFO, "setting up kickstart");
      for (cmd = ksTable; cmd->name; cmd++) {
-        if ((!ksGetCommand(cmd->code, NULL,&argc,&argv))&&  cmd->setupData) {
+        if (!strcmp(cmd->name, "network")) {
+            while ((!ksGetCommand(cmd->code, argv,&argc,&argv))&&  cmd->setupData) {
+                cmd->setupData(loaderData, argc, argv);
+            }
+        } else if ((!ksGetCommand(cmd->code, NULL,&argc,&argv))&&  cmd->setupData) {
              cmd->setupData(loaderData, argc, argv);
          }
      }
Maybe I'm just not following this inside-out code, but in runKickstart,
why don't we just walk the commands list and run the setupData function
for each element?  Why the ksTable walk and ksGetCommand call?


The only reason I can think of is to impose order of execution
(setupData) of ks commands. I'd be afraid (as in all patches in this set
generally) of changing it even though it seems contrary to what we
do in stage 2 - requiring (and keeping to some extent) certain order
of commands in ks file, talking mainly with network command in mind.

Radek

_______________________________________________
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