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

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



> 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


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