On Saturday 02 September 2006 00:44, Holger Macht wrote:
> On Fri 01. Sep - 15:46:31, Pat Double wrote:
> > If this is not already done, please consider this patch to detect
> > suspend2 at the new /sys/power/suspend2 location.

> >  bool PM_Interface::haveSuspend2()
> >  {
> > -   if (access("/proc/suspend2", F_OK) < 0) {
> > +   if (access("/proc/suspend2", F_OK) < 0
> > +           && access("/sys/power/suspend2", F_OK) < 0) {
> >                  return false;
> >     }
>
> Wouldn't a logical 'or' be better here? Or have both kernel interfaces to
> exist always?

No, only one of them is there at the same time.

After a comment on the last review of suspend2 on LKML, it has been proposed 
to move its userland interface from /proc/ to /sys, the /proc/suspend2 
interface is for backwards compatibility with suspend2 only.

So the patch looks OK.
-- 
sebas

 http://www.kde.org | http://vizZzion.org |  GPG Key ID: 9119 0EF9 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
God may be subtle, but he isn't plain mean. - Albert Einstein

Attachment: pgpsCVGjPnvvL.pgp
Description: PGP signature

_______________________________________________
powersave-devel mailing list
powersave-devel@forge.novell.com
http://forge.novell.com/mailman/listinfo/powersave-devel

Reply via email to