lkml.org 
[lkml]   [2006]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[Suspend2][ 13/21] [Suspend2] Main message output.
    Date
    Output one of the main messages describing our progress, possibly also
    clearing the progress bar. These messages are printk'd if there is no
    active userui.

    Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

    kernel/power/ui.c | 27 +++++++++++++++++++++++++++
    1 files changed, 27 insertions(+), 0 deletions(-)

    diff --git a/kernel/power/ui.c b/kernel/power/ui.c
    index 6542f3f..b11edb8 100644
    --- a/kernel/power/ui.c
    +++ b/kernel/power/ui.c
    @@ -439,3 +439,30 @@ void abort_suspend(const char *fmt, ...)
    }
    }

    +/* suspend_prepare_status
    + * Description: Prepare the 'nice display', drawing the header and version,
    + * along with the current action and perhaps also resetting the
    + * progress bar.
    + * Arguments:
    + * int clearbar: Whether to reset the progress bar.
    + * const char *fmt, ...: The action to be displayed.
    + */
    +void suspend_prepare_status(int clearbar, const char *fmt, ...)
    +{
    + va_list args;
    +
    + if (fmt) {
    + va_start(args, fmt);
    + lastheader_message_len = vsnprintf(lastheader, 512, fmt, args);
    + va_end(args);
    + }
    +
    + if (clearbar)
    + suspend_update_status(0, 1, NULL);
    +
    + __suspend_message(0, SUSPEND_STATUS, 1, lastheader, NULL);
    +
    + if (ui_helper_data.pid == -1)
    + printk(KERN_EMERG "%s\n", lastheader);
    +}
    +
    --
    Nigel Cunningham nigel at suspend2 dot net
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-06-27 06:52    [W:0.021 / U:29.948 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site