From dc775b5cb8341761914172c63fd1a5f2e265eaed Mon Sep 17 00:00:00 2001 From: Michael BOUCHAUD Date: Wed, 19 Sep 2012 19:24:33 +0000 Subject: [PATCH] entrance: typo in configure.ac and fix compil with --enable-grub2. Big thx to Igor Murzov SVN revision: 76874 --- configure.ac | 4 ++-- src/daemon/entrance_action.c | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 8fc174a..450d242 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,7 @@ AC_MSG_RESULT([${enable_pam}]) # Grub2 AC_ARG_ENABLE([grub2], - [AC_HELP_STRING([--enable-gru2b], [enable grub2 support. @<:@default=disabled@:>@])], + [AC_HELP_STRING([--enable-grub2], [enable grub2 support. @<:@default=disabled@:>@])], [ if test "x${enableval}" = "xyes" ; then enable_grub2="yes" @@ -80,7 +80,7 @@ AC_MSG_RESULT([${enable_consolekit}]) # Set edje_cc path AC_ARG_WITH([edje-cc], - [AC_HELP_STRING([ --with-edje-cc=PATH], [specify a specific path to edje_cc])], + [AC_HELP_STRING([--with-edje-cc=PATH], [specify a specific path to edje_cc])], [ v=$withval; edje_cc=$v diff --git a/src/daemon/entrance_action.c b/src/daemon/entrance_action.c index be6c643..b4a5128 100644 --- a/src/daemon/entrance_action.c +++ b/src/daemon/entrance_action.c @@ -211,13 +211,14 @@ _entrance_action_grub2_get(void) if (!grub2_ok) { grub2_ok = 1; - PT("GRUB2 save mode found \n"); + PT("GRUB2 save mode found\n"); } else { char *action; char *local; char *tmp; + char *buf; r2 += 10; size -= 10; @@ -237,8 +238,11 @@ _entrance_action_grub2_get(void) action = malloc((tmp - r2 + 1 + 11) * sizeof (char)); if (!action) goto end_line; + buf = alloca((tmp - r2 + 1 + 11 + 10) * sizeof (char)); + sprintf(action, "Reboot on %s", local); - PT("GRUB2 '%s'\n", action); + sprintf(buf, "GRUB2 '%s'\n", action); + PT(buf); _entrance_actions = eina_list_append(_entrance_actions, _entrance_action_add(action,