Hi, On Thursday, 14 September 2006 12:06, Stefan Seyfried wrote: > On Wed, Sep 13, 2006 at 10:47:22PM +0200, Rafael J. Wysocki wrote: > > > > From: Stefan Seyfried <[EMAIL PROTECTED]> > > > > > > diff --exclude='.*' --exclude='*o' -ruNp > > > /usr/src/linux/kernel/power/power.h > > > linux-2.6.18-rc6-2/kernel/power/power.h > > > --- /usr/src/linux/kernel/power/power.h 2006-09-08 19:02:33.000000000 > > > +0200 > > > +++ linux-2.6.18-rc6-2/kernel/power/power.h 2006-09-12 > > > 17:45:33.000000000 +0200 > > > @@ -78,7 +78,12 @@ int snapshot_image_loaded(struct snapsho > > > #define SNAPSHOT_FREE_SWAP_PAGES _IO(SNAPSHOT_IOC_MAGIC, 9) > > > #define SNAPSHOT_SET_SWAP_FILE _IOW(SNAPSHOT_IOC_MAGIC, 10, > > > unsigned int) > > > #define SNAPSHOT_S2RAM _IO(SNAPSHOT_IOC_MAGIC, 11) > > > -#define SNAPSHOT_IOC_MAXNR 11 > > > +#define SNAPSHOT_PMOPS _IOW(SNAPSHOT_IOC_MAGIC, 12, > > > unsigned int) > > > +#define SNAPSHOT_IOC_MAXNR 12 > > > + > BTW: this is one of the parts i am most unsure about: > > > > +#define PMOPS_PREPARE 1 > > > +#define PMOPS_ENTER 2 > > > +#define PMOPS_FINISH 3 > > maybe an enum would be better? I have no idea.
Well, enum seems to be preferable on lkml. ;-) > > > + case SNAPSHOT_PMOPS: > > > + switch (arg) { > > > > + } > > > + break; > > > + > > > default: > > > error = -ENOTTY; > > > > The kernel part looks pretty clean to me. I think we can try to push it > > upstream, but the interface change needs to be documented and we'll also > > have > > to prepare some uswsusp documentation for Documentation/ABI/ along with it. > > The interface change is also just an addition and backwards compatible, This is a "must have" feature. > means: old versions of suspend will still work on newer kernels, and in newer > versions i would put a "power_off()" after the PMOPS_ENTER ioctl anyway as a > safety net, should the pmops call fail. Or just check the error code returned by PMOPS_ENTER and call power_off() if non-zero? -- You never change things by fighting the existing reality. R. Buckminster Fuller ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel