summaryrefslogtreecommitdiff
path: root/src/pm-reset-swap.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2007-03-14 15:06:19 +0000
committerPeter Jones <pjones@redhat.com>2007-03-14 15:06:19 +0000
commitff83e338fbe5688c7c3e949a837e748f55e98d6c (patch)
tree9789636a47a949b3d08c43f95f8a652f075c8f96 /src/pm-reset-swap.c
parentb85e949dadef4732847ba1f114bc325b7c19393f (diff)
- pm-reset-swap fixes from stefan
Diffstat (limited to 'src/pm-reset-swap.c')
-rw-r--r--src/pm-reset-swap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pm-reset-swap.c b/src/pm-reset-swap.c
index 2f372ea..559fce6 100644
--- a/src/pm-reset-swap.c
+++ b/src/pm-reset-swap.c
@@ -95,7 +95,8 @@ int check_resume_block(FILE *dev, off_t offset)
if (fread(buf, sizeof (char), 10, dev) != 10)
return -1;
- if (!strncmp(buf, "S1SUSPEND", 9))
+ if (!strncmp(buf, "S1SUSPEND", 9) ||
+ !strncmp(buf, "ULSUSPEND", 9))
return 1;
return 0;
@@ -148,7 +149,7 @@ int main(int argc, char *argv[])
fclose(dev);
return 2;
}
- rc = 1;
+
if (rc == 1) {
if (clear_resume_block(dev, 0)) {
fprintf(stderr, "Could not clear swap signature on \"%s\": %m\n",