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][ 06/13] [Suspend2] Serialise storage manager config in an image header.
    Date
    Routines to read and write the storage manager configuration.

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

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

    diff --git a/kernel/power/storage.c b/kernel/power/storage.c
    index 5fdcadd..714e95e 100644
    --- a/kernel/power/storage.c
    +++ b/kernel/power/storage.c
    @@ -154,3 +154,19 @@ static unsigned long usm_storage_needed(
    return strlen(usm_helper_data.program);
    }

    +static int usm_save_config_info(char *buf)
    +{
    + int len = strlen(usm_helper_data.program);
    + memcpy(buf, usm_helper_data.program, len);
    + return len;
    +}
    +
    +static void usm_load_config_info(char *buf, int size)
    +{
    + /* Don't load the saved path if one has already been set */
    + if (usm_helper_data.program[0])
    + return;
    +
    + memcpy(usm_helper_data.program, buf, size);
    +}
    +
    --
    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 07:00    [W:0.020 / U:94.608 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site