[Pm-utils] [patch] userspace-suspend, revisited

Tim Dijkstra newsuser at famdijkstra.org
Mon Mar 26 12:03:59 PDT 2007


On Mon, 26 Mar 2007 20:16:41 +0200
Stefan Seyfried <seife at suse.de> wrote:

>  do_suspend_hybrid()
>  {
> -	return 1
> +	local RET=1
> +	if [ -z "$HIBERNATE_METHOD" ]; then
> +		if [ -x /usr/sbin/s2both -a -c /dev/snapshot ]; then
> +			HIBERNATE_METHOD="userspace"
> +		else
> +			HIBERNATE_METHOD="kernel"
> +		fi
> +	fi

This test doens't seem necessary to me, There is no `kernel' method.
Also s2both will return an error when configured wrongly so these
are in a sense done twice...

> +	case $HIBERNATE_METHOD in
> +		userspace)
> +			set -x
> +			/usr/sbin/s2both -f $S2DISK_CONF
> +			RET=$?
> +			set +x
> +			;;
> +		*)
> +			RET=1
> +			;;
> +	esac
> +	return $RET
>  }


BTW, in pm-action REVERSE is set as "resume" or "thaw" depending on the
method. With `hybrid' we can get back from both s2ram or s2disk, did you
think about what to choose for REVERSE from hybrid?

grts Tim


More information about the Pm-utils mailing list