Skip to content

Commit

Permalink
Gracefully handle setting the default entry with the direct method wh…
Browse files Browse the repository at this point in the history
…en no grubenv was found
  • Loading branch information
David Mohr committed May 17, 2010
1 parent 9ea522f commit b5bb168
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gchd-direct.c
Expand Up @@ -112,9 +112,11 @@ set_default_entry (Gchd * gchd, gchar * entry, GError **error)
gboolean b;
gchar * env_filename;

r = 0;
env_filename = gchd_get_grub_file (gchd, "grubenv", error);

r = grub_envblk_set (priv->env, default_key, entry);
if (env_filename)
r = grub_envblk_set (priv->env, default_key, entry);

if (!r)
{
Expand Down

0 comments on commit b5bb168

Please sign in to comment.