Hello community,
here is the log from the commit of package suspend
checked in at Thu Oct 19 19:03:58 CEST 2006.
--------
--- arch/i386/suspend/suspend.changes 2006-10-17 01:29:14.000000000 +0200
+++ /mounts/work_src_done/STABLE/suspend/suspend.changes 2006-10-18 23:41:23.000000000 +0200
@@ -1,0 +2,10 @@
+Wed Oct 18 23:40:30 CEST 2006 - seife@suse.de
+
+- update to current CVS:
+ - fix suspend to swap partitions > 2GB
+ - add support for swap files (needs newer kernel)
+ - whitelist update
+- package version number restructured to make future updates to
+ upcoming releases smoother
+
+-------------------------------------------------------------------
Old:
----
suspend-20061012.tar.bz2
New:
----
suspend-0.20.20061018.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ suspend.spec ++++++
--- /var/tmp/diff_new_pack.fE9V4M/_old 2006-10-19 19:03:47.000000000 +0200
+++ /var/tmp/diff_new_pack.fE9V4M/_new 2006-10-19 19:03:47.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package suspend (Version 20061012)
+# spec file for package suspend (Version 0.20.20061018)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,10 +12,10 @@
Name: suspend
BuildRequires: gnutls-devel pciutils-devel
-Version: 20061012
-Release: 3
+Version: 0.20.20061018
+Release: 1
Summary: A Set Of Tools To Support Sleep Modes
-License: GPL
+License: GNU General Public License (GPL) - all versions
URL: http://sourceforge.net/projects/suspend
Group: System/Console
Source: %{name}-%{version}.tar.bz2
@@ -88,6 +88,13 @@
%doc doc/installation-on-SUSE-10.1.txt openSUSE-factory-README.txt scripts/
%changelog -n suspend
+* Wed Oct 18 2006 - seife@suse.de
+- update to current CVS:
+- fix suspend to swap partitions > 2GB
+- add support for swap files (needs newer kernel)
+- whitelist update
+- package version number restructured to make future updates to
+ upcoming releases smoother
* Tue Oct 17 2006 - ro@suse.de
- link also against libz when linking against libpci
* Thu Oct 12 2006 - seife@suse.de
++++++ suspend-20061012.tar.bz2 -> suspend-0.20.20061018.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suspend-20061012/HOWTO new/suspend-0.20.20061018/HOWTO
--- old/suspend-20061012/HOWTO 2006-09-28 14:32:10.000000000 +0200
+++ new/suspend-0.20.20061018/HOWTO 2006-10-12 23:18:40.000000000 +0200
@@ -10,7 +10,7 @@
(a) This package
(b) Linux kernel supporting the swsusp userland interface (2.6.17 or above)
-(c) Swap partition, approximately as big as 1/2 of RAM
+(c) Swap partition or a swap file, approximately as big as 1/2 of RAM
(d) Special device file for the snapshot device (character, 10, 231), e.g.
crw-r--r-- 1 root root 10, 231 Jan 13 21:21 /dev/snapshot
@@ -93,7 +93,12 @@
[There should be just one resume partition, for now. You'll need at most 1/2
of your RAM of free space on it, but in some cases it may be smaller, too.
The s2disk tool may be configured to create quite small snapshot images but
-then some contents of the RAM will have to be swapped out before suspend.]
+then some contents of the RAM will have to be swapped out before suspend.
+
+It also is possible to use a swap file for suspending, but this only works with
+the 2.6.18-mm3 kernel (or later). In such a case the resume partition is the
+partition that holds the swap file, and there is an additional configuration
+parameter "resume offset" that has to be set, as described below.]
- Build the suspend tools in the usual way:
@@ -238,7 +243,9 @@
and the following parameters:
+resume offset =
image size =
+shutdown method =
suspend loglevel =
compute checksum =
compress =
@@ -247,7 +254,13 @@
max loglevel = <ignored>
early writeout =
splash =
-shutdown method =
+
+The "resume offset" parameter is necessary if a swap file is used for
+suspending. In such a case the device identified by the "resume device"
+parameter is regarded as the partition that contains the swap file, and
+"resume offset" must be equal to the offset from the beginning of this
+partition at which the swap file's header is located, in units.
+[For this feature to work, you will need an -mm kernel, 2.6.18-mm3 or newer.]
The "image size" parameter may be used to limit the size of the system
snapshot image created by the s2disk tool, but it's not mandatory. Namely,
@@ -256,6 +269,17 @@
with a bigger image. If "image size" is set to 0, the snapshot image will be
as small as possible.
+The "shutdown method" parameter defines the operation that will be carried out
+after the suspend image has been created and the machine is ready to be powered
+off. If it is set to "reboot", the machine will be rebooted immediately.
+If it is set to "platform", the machine will be shut down using special
+power management operations available from the kernel that may be necessary
+for the hardware to be properly reinitialized after the resume, and may cause
+the system to resume faster (this is the recommended shutdown method on the
+majority of systems). For any other value the machine will be powered off.
+The default is to use the "platform" method. [For this feature to work,
+you will need an -mm kernel, 2.6.18-mm3 or newer.]
+
If the "compute checksum" parameter is set to 'y', the s2disk and resume
tools will use the MD5 algorithm to verify the image integrity.
@@ -276,12 +300,6 @@
the image to it. [This has been reported to speed up the suspend on some
boxes and eliminates the "fast progress meter and long fsync wait" effect.]
-If the "shutdown method" parameter is set to "reboot", the s2disk utility will
-reboot the machine rather than powering down. This is useful when testing
-repeated benchmarks, such as when checking whether "early writeout" produces a
-speedup or not for your combination of hardware, image size, and s2disk
-parameters.
-
The "splash" parameter is used to make s2disk and/or resume use a splash system
(when set to 'y'). Currently the bootsplash.org and splashy splash systems
are supported. Note that for both systems your initrd or initramfs will
@@ -290,15 +308,16 @@
The resume tool can use the same configuration file that is used by the
s2disk tool, but it will ignore most of the above parameters. It will use the
-value of "suspend loglevel" as the kernel console loglevel during resume. Additionally
-it will use the value of "max loglevel" as the kernel console loglevel to switch to in
-case the resume fails (this parameter is ignored by the s2disk tool).
+value of "suspend loglevel" as the kernel console loglevel during resume.
+Additionally it will use the value of "max loglevel" as the kernel console
+loglevel to switch to in case the resume fails (this parameter is ignored by
+the s2disk tool).
It is not necessary to set "compute checksum = y" and/or "compress = y",
-and/or "encrypt = y" for the resume tool. The appropriate information related to
-these options will be passed to it in the image header by the s2disk tool.
-However, the resume tool will only use the splash system if "splash = y" is set for it
-explicitly.
+and/or "encrypt = y" for the resume tool. The appropriate information related
+to these options will be passed to it in the image header by the s2disk tool.
+However, the resume tool will only use the splash system if "splash = y" is set
+for it explicitly.
In order to create the configuration file for s2disk and/or resume, it is
recommended to edit the file suspend.conf in the conf/ subdirectory of the
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suspend-20061012/resume.c new/suspend-0.20.20061018/resume.c
--- old/suspend-20061012/resume.c 2006-10-11 23:17:48.000000000 +0200
+++ new/suspend-0.20.20061018/resume.c 2006-10-16 15:51:37.000000000 +0200
@@ -10,6 +10,8 @@
*/
#define _GNU_SOURCE
+#define _LARGEFILE64_SOURCE
+
#include
#include
#include
@@ -37,6 +39,7 @@
static char snapshot_dev_name[MAX_STR_LEN] = SNAPSHOT_DEVICE;
static char resume_dev_name[MAX_STR_LEN] = RESUME_DEVICE;
+static loff_t resume_offset;
static int suspend_loglevel = SUSPEND_LOGLEVEL;
static int max_loglevel = MAX_LOGLEVEL;
static char verify_checksum;
@@ -68,6 +71,11 @@
.len = MAX_STR_LEN
},
{
+ .name = "resume offset",
+ .fmt = "%llu",
+ .ptr = &resume_offset,
+ },
+ {
.name = "suspend loglevel",
.fmt = "%d",
.ptr = &suspend_loglevel,
@@ -141,7 +149,7 @@
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)
@@ -532,7 +540,7 @@
char *buffer = (char *)mem_pool + page_size;
unsigned int nr_pages;
unsigned int size = sizeof(struct swsusp_header);
- unsigned int shift = page_size - size;
+ unsigned int shift = (resume_offset + 1) * page_size - size;
char c;
fd = open(resume_dev_name, O_RDWR);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suspend-20061012/suspend.c new/suspend-0.20.20061018/suspend.c
--- old/suspend-20061012/suspend.c 2006-10-06 16:28:31.000000000 +0200
+++ new/suspend-0.20.20061018/suspend.c 2006-10-16 15:51:38.000000000 +0200
@@ -9,6 +9,8 @@
*
*/
+#define _LARGEFILE64_SOURCE
+
#include
#include
#include
@@ -45,6 +47,7 @@
static char snapshot_dev_name[MAX_STR_LEN] = SNAPSHOT_DEVICE;
static char resume_dev_name[MAX_STR_LEN] = RESUME_DEVICE;
+static loff_t resume_offset;
static unsigned long pref_image_size = IMAGE_SIZE;
static int suspend_loglevel = SUSPEND_LOGLEVEL;
static char compute_checksum;
@@ -89,6 +92,11 @@
.len = MAX_STR_LEN
},
{
+ .name = "resume offset",
+ .fmt = "%llu",
+ .ptr = &resume_offset,
+ },
+ {
.name = "image size",
.fmt = "%lu",
.ptr = &pref_image_size,
@@ -185,9 +193,18 @@
return ioctl(dev, SNAPSHOT_FREE_SWAP_PAGES, 0);
}
-static inline int set_swap_file(int dev, dev_t blkdev)
+static inline int set_swap_file(int dev, dev_t blkdev, loff_t offset)
{
- return ioctl(dev, SNAPSHOT_SET_SWAP_FILE, blkdev);
+ struct resume_swap_area swap;
+ int error;
+
+ swap.dev = blkdev;
+ swap.offset = offset;
+ error = ioctl(dev, SNAPSHOT_SET_SWAP_AREA, &swap);
+ if (error && !offset)
+ error = ioctl(dev, SNAPSHOT_SET_SWAP_FILE, blkdev);
+
+ return error;
}
/**
@@ -204,7 +221,7 @@
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;
@@ -236,7 +253,8 @@
#endif
};
-static int init_swap_writer(struct swap_map_handle *handle, int dev, int fd, void *buf)
+static int
+init_swap_writer(struct swap_map_handle *handle, int dev, int fd, void *buf)
{
if (!buf)
return -EINVAL;
@@ -477,12 +495,14 @@
{
int error = 0;
unsigned int size = sizeof(struct swsusp_header);
- unsigned int shift = page_size - size;
+ unsigned int shift = (resume_offset + 1) * page_size - size;
if (lseek(fd, shift, SEEK_SET) != shift)
return -EIO;
+
if (read(fd, &swsusp_header, size) < size)
return -EIO;
+
if (!memcmp("SWAP-SPACE", swsusp_header.sig, 10) ||
!memcmp("SWAPSPACE2", swsusp_header.sig, 10)) {
memcpy(swsusp_header.orig_sig, swsusp_header.sig, 10);
@@ -490,6 +510,7 @@
swsusp_header.image = start;
if (lseek(fd, shift, SEEK_SET) != shift)
return -EIO;
+
if (write(fd, &swsusp_header, size) < size)
error = -EIO;
} else {
@@ -620,7 +641,7 @@
{
int ret, error = 0;
unsigned int size = sizeof(struct swsusp_header);
- unsigned int shift = page_size - size;
+ unsigned int shift = (resume_offset + 1) * page_size - size;
if (lseek(fd, shift, SEEK_SET) != shift)
return -EIO;
@@ -1244,7 +1265,7 @@
goto Close_resume_fd;
}
- if (set_swap_file(snapshot_fd, resume_dev)) {
+ if (set_swap_file(snapshot_fd, resume_dev, resume_offset)) {
ret = errno;
fprintf(stderr, "suspend: Could not use the resume device "
"(try swapon -a)\n");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suspend-20061012/swsusp.h new/suspend-0.20.20061018/swsusp.h
--- old/suspend-20061012/swsusp.h 2006-10-12 14:54:27.000000000 +0200
+++ new/suspend-0.20.20061018/swsusp.h 2006-10-12 23:18:40.000000000 +0200
@@ -14,6 +14,11 @@
#include "encrypt.h"
+struct resume_swap_area {
+ loff_t offset;
+ u_int32_t dev;
+} __attribute__((packed));
+
#define SNAPSHOT_IOC_MAGIC '3'
#define SNAPSHOT_FREEZE _IO(SNAPSHOT_IOC_MAGIC, 1)
#define SNAPSHOT_UNFREEZE _IO(SNAPSHOT_IOC_MAGIC, 2)
@@ -27,7 +32,9 @@
#define SNAPSHOT_SET_SWAP_FILE _IOW(SNAPSHOT_IOC_MAGIC, 10, unsigned int)
#define SNAPSHOT_S2RAM _IO(SNAPSHOT_IOC_MAGIC, 11)
#define SNAPSHOT_PMOPS _IOW(SNAPSHOT_IOC_MAGIC, 12, unsigned int)
-#define SNAPSHOT_IOC_MAXNR 12
+#define SNAPSHOT_SET_SWAP_AREA _IOW(SNAPSHOT_IOC_MAGIC, 13, \
+ struct resume_swap_area)
+#define SNAPSHOT_IOC_MAXNR 13
#define PMOPS_PREPARE 1
#define PMOPS_ENTER 2
@@ -190,7 +197,7 @@
#define SUSPEND_SWAPPINESS 100
-#define GEN_PARAM 9
+#define GEN_PARAM 10
#ifdef CONFIG_COMPRESS
#define COMPRESS_PARAM 1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suspend-20061012/whitelist.c new/suspend-0.20.20061018/whitelist.c
--- old/suspend-20061012/whitelist.c 2006-10-12 11:59:51.000000000 +0200
+++ new/suspend-0.20.20061018/whitelist.c 2006-10-18 17:18:07.000000000 +0200
@@ -39,7 +39,8 @@
{ "ASUSTEK ", "A2H/L ", "", "", 0 },
{ "ASUSTEK ", "L2000D", "", "", S3_MODE },
{ "ASUSTEK ", "L3000D", "", "", VBE_POST|VBE_SAVE },
- { "ASUSTeK Computer Inc. ", "M6N ", "", "", S3_MODE },
+ /* Manfred Tremmel, https://bugzilla.novell.com/show_bug.cgi?id=171107 */
+ { "ASUSTeK Computer Inc. ", "M6N ", "", "", S3_BIOS|S3_MODE },
{ "ASUSTeK Computer Inc. ", "M6Ne ", "", "", S3_MODE },
/* Charles de Miramon */
{ "ASUSTeK Computer Inc. ", "M5N ", "", "", S3_BIOS|S3_MODE },
@@ -64,6 +65,8 @@
{ "Compaq", "N620c *", "", "", S3_BIOS|S3_MODE },
/* Dell Inspiron 500m, Per Øyvind Karlsen */
{ "Dell Computer Corporation", "Inspiron 500m*", "", "", S3_BIOS },
+ /* Dell Inspiron 510m, Jose Carlos Garcia Sogo */
+ { "Dell Inc.", "Inspiron 510m *", "", "", VBE_POST },
/* Eric Sandall */
{ "Dell Computer Corporation", "Inspiron 5100 *", "", "", NOFB },
/* VBE_POST|VBE_SAVE works on text console, but not under X. Tested by Chirag Rajyaguru */
@@ -97,6 +100,8 @@
{ "FUJITSU SIEMENS", "Amilo A7645 ", "", "", VBE_SAVE|S3_BIOS|S3_MODE },
/* , tested with X only */
{ "FUJITSU SIEMENS", "LIFEBOOK S7010", "", "", 0 },
+ /* Eckhart Woerner */
+ { "FUJITSU SIEMENS", "LIFEBOOK T4010", "", "", S3_BIOS|S3_MODE },
{ "FUJITSU SIEMENS", "Stylistic ST5000", "", "", S3_BIOS|S3_MODE },
/* This is a desktop with onboard i810 video */
{ "FUJITSU SIEMENS", "SCENIC W300/W600", "", "", VBE_POST|VBE_SAVE },
@@ -146,7 +151,7 @@
{ "LENOVO", "1704*", "", "", S3_BIOS|S3_MODE },
{ "LENOVO", "1706*", "", "", S3_BIOS|S3_MODE },
/* https://bugzilla.novell.com/show_bug.cgi?id=210928, note the small "p" in Thinkpad */
- { "LENOVO", "", "Thinkpad R60", "", S3_BIOS },
+ { "LENOVO", "", "Thinkpad R60", "", S3_BIOS|S3_MODE },
/* At least 1709 series thinkpads can be whitelisted by name,
and we can probably delete entries above, too.... */
{ "LENOVO", "", "ThinkPad X60", "", S3_BIOS|S3_MODE },
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org