aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2008-05-23 23:28:57 +0000
committerRafael J. Wysocki <rjw@sisk.pl>2008-05-23 23:28:57 +0000
commite19c7341563cc31a9a3b28255d32e03c5b7fc5a1 (patch)
treee4573502f9479907521a49e36259cea9c30f06bb
parent2f53393eb784d8a45217a6f793b44d397a597190 (diff)
downloadsuspend-utils-e19c7341563cc31a9a3b28255d32e03c5b7fc5a1.tar.gz
There is a bug in the new image saving code causing it to fail if
more than one extents page is used (more likely to happen in case of a compressed image). Fix it.
-rw-r--r--suspend.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/suspend.c b/suspend.c
index b7f7faf..07984ac 100644
--- a/suspend.c
+++ b/suspend.c
@@ -694,8 +694,10 @@ static loff_t next_swap_page(struct swap_map_handle *handle)
if (handle->cur_extent->start < handle->cur_extent->end) {
ext = *handle->cur_extent;
memset(handle->cur_extent, 0, sizeof(struct extent));
+ handle->nr_extents = 1;
} else {
memset(&ext, 0, sizeof(struct extent));
+ handle->nr_extents = 0;
}
if (save_extents(handle, 0))
return 0;