lkml.org 
[lkml]   [2004]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: swappiness=0 makes software suspend fail.
    On Mon, May 31, 2004 at 01:50:49PM +0200, Pavel Machek wrote:

    > I believe stefan has some script that fixes swap signature using dd if
    > it detects suspend signature...

    this is in boot.swap initscript:

    check_swap_sig () {
    local part="$(get_swap_id)"
    local where what type rest p c
    while read where what type rest ; do
    test "$type" = "swap" || continue
    c=continue
    for p in $part ; do
    test "$p" = "$where" && c=true
    done
    $c
    case "$(dd if=$where bs=1 count=6 skip=4086 2>/dev/null)" in
    S1SUSP|S2SUSP) mkswap $where
    esac
    done < /etc/fstab
    }

    so if the user passes "noresume", the boot scripts fix up the mess :-)
    An unconditional "mkswap" on the swap partition is a not-so-good idea
    unless you check the ID of the partition from the partition table since
    mkswap will create swap on anything you give him which may not always
    be what you wanted.

    Anyway, i think it is not too bad doing such cleanup stuff in userspace.

    --
    Stefan Seyfried QA / R&D mobile devices, SUSE LINUX AG

    "Any ideas, John?"
    "Well, surrounding thems out."
    -
    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: 2005-03-22 14:03    [W:0.034 / U:0.324 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site