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]

 



> 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?

- Chris

_______________________________________________
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