Hi! > Now I have something in the brown-paper-bag category.
No, I do not think this is brown-paper-bag category... Yes, go ahead with commit. 32-bit limitations are stupid/ugly... Pavel > Without this patch s2disk on i386 (32-bit in general) doesn't work with > swap files placed above 2 GB from the beginning of the partition. I think > it'll also have a problem with a swap partition larger than 2 GB, but I > haven't > checked this. > > Greetings, > Rafael > > > --- > resume.c | 4 +++- > suspend.c | 14 +++++++++++--- > 2 files changed, 14 insertions(+), 4 deletions(-) > > Index: suspend/suspend.c > =================================================================== > --- suspend.orig/suspend.c > +++ suspend/suspend.c > @@ -9,6 +9,8 @@ > * > */ > > +#define _LARGEFILE64_SOURCE > + > #include <sys/types.h> > #include <sys/stat.h> > #include <sys/ioctl.h> > @@ -219,7 +221,7 @@ static int write_area(int fd, void *buf, > ssize_t cnt = 0; > > if (offset) { > - if (lseek(fd, offset, SEEK_SET) == offset) > + if (lseek64(fd, offset, SEEK_SET) == offset) > cnt = write(fd, buf, size); > if (cnt == size) > res = 0; > Index: suspend/resume.c > =================================================================== > --- suspend.orig/resume.c > +++ suspend/resume.c > @@ -10,6 +10,8 @@ > */ > > #define _GNU_SOURCE > +#define _LARGEFILE64_SOURCE > + > #include <sys/types.h> > #include <sys/stat.h> > #include <sys/ioctl.h> > @@ -147,7 +149,7 @@ static int read_area(int fd, void *buf, > ssize_t cnt = 0; > > if (offset) { > - if (lseek(fd, offset, SEEK_SET) == offset) > + if (lseek64(fd, offset, SEEK_SET) == offset) > cnt = read(fd, buf, size); > if (cnt < (ssize_t)size) { > if (cnt < 0) -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ------------------------------------------------------------------------- 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