This fix does two things (1) When reading the configuration file it resets entry to NULL on every pass, thus clearing the value out on each pass to make sure it's existance doesn't get propigated. (2) Adds a better check for entry's existance once the reading is done. This check will now either set the default image to the entry (same as before) or set it to -1 which is the expected error or not found code Signed-off-by: John 'Warthog9' Hawley <warthog9@xxxxxxxxxxxxxx> --- grubby/grubby.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/grubby/grubby.c b/grubby/grubby.c index 1e4ba98..9299063 100644 --- a/grubby/grubby.c +++ b/grubby/grubby.c @@ -869,9 +869,14 @@ static struct grubConfig * readConfig(const char * inName, extractTitle(line))) break; } i++; + entry = NULL; } - if (entry) cfg->defaultImage = i; + if (entry){ + cfg->defaultImage = i; + }else{ + cfg->defaultImage = -1; + } } } else { cfg->defaultImage = 0;
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list