mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@cyclades.com>
To: Stefan Seyfried <seife@suse.de>
Cc: Pavel Machek <pavel@ucw.cz>, LKML <linux-kernel@vger.kernel.org>,
	dtor_core@ameritech.net,
	Bernard Blackham <bernard@blackham.com.au>
Subject: Re: Swsusp, resume and kernel versions
Date: Fri, 18 Feb 2005 21:34:25 +1100	[thread overview]
Message-ID: <1108722865.4077.8.camel@desktop.cunningham.myip.net.au> (raw)
In-Reply-To: <421506FC.3060909@suse.de>

Hi Stefan.

For Suspend2, we also put a device id in the space, so there's only room
for one character, which is a lower or upper case Z. (We also validate
the device ID, so a random Z won't cause an oops).

Thanks for the code. With your/Suse's permission, I'll ask Bernard
(cc'd) to include the script in the docs somewhere with the appropriate
credit.

Thanks and regards,

Nigel

On Fri, 2005-02-18 at 08:05, Stefan Seyfried wrote:
> Nigel Cunningham wrote:
> 
> > If the mistakenly booted kernel isn't suspend enabled, however, you need
> > a more generic method of removing the image, such as mkswapping the
> > storage device. This is what I was speaking of.
> 
> The following code is used in the SUSE bootscripts to do exactly this:
> 
> ----------------------------------------------------
> get_swap_id() {
>     local line;
>     fdisk -l | while read line; do
>         case "$line" in
>         /*Linux\ [sS]wap*) echo "${line%% *}"
>         esac
>     done
> }
> 
> 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
> }
> ---------------------------------------------------------------------
> 
> This invalidates the suspend signature if the kernel has not already
> done it. It probably does not cover the softwaresuspend2 signature but
> that should be trivial to add.
> 
> Regards,
> 
>   Stefan
-- 
Nigel Cunningham
Software Engineer, Canberra, Australia
http://www.cyclades.com

Ph: +61 (2) 6292 8028      Mob: +61 (417) 100 574


  reply	other threads:[~2005-02-18 10:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-17  4:46 Dmitry Torokhov
2005-02-17  5:15 ` Nigel Cunningham
2005-02-17  5:38   ` Dmitry Torokhov
2005-02-17  8:09     ` Nigel Cunningham
2005-02-17 21:05       ` Stefan Seyfried
2005-02-18 10:34         ` Nigel Cunningham [this message]
2005-02-18 11:23           ` Stefan Seyfried
2005-02-17 11:07 ` Pavel Machek
2005-02-17 16:28   ` John M Flinchbaugh
2005-02-17 17:30     ` Dmitry Torokhov
2005-02-17 19:56       ` Pavel Machek
2005-02-17 20:09         ` Dmitry Torokhov
2005-02-18  2:02         ` Bernard Blackham
2005-02-18 11:24           ` Pavel Machek
2005-02-18 12:26             ` Bernard Blackham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1108722865.4077.8.camel@desktop.cunningham.myip.net.au \
    --to=ncunningham@cyclades.com \
    --cc=bernard@blackham.com.au \
    --cc=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=seife@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®