summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamjan Georgievski <gdamjan@gmail.com>2008-04-21 12:44:25 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-04-21 12:44:25 +0200
commitbe9c76b4345b36ec40d8b7b22dc687b4042fe56f (patch)
tree3c995a8182c3d04b5714cfe7302286f94efe0677
parent41677cf51fb2c14aa512ecf9410e43eb35560408 (diff)
libvolume_id: recognize swap partitions with a tuxonice hibernate image
-rw-r--r--extras/volume_id/lib/linux_swap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/extras/volume_id/lib/linux_swap.c b/extras/volume_id/lib/linux_swap.c
index 9ff16e2798..592a38570d 100644
--- a/extras/volume_id/lib/linux_swap.c
+++ b/extras/volume_id/lib/linux_swap.c
@@ -73,6 +73,12 @@ int volume_id_probe_linux_swap(struct volume_id *id, uint64_t off, uint64_t size
strcpy(id->type_version, "ulsuspend");
goto found_label;
}
+
+ if (memcmp(buf, "\xed\xc3\x02\xe9\x98\x56\xe5\x0c", 8) == 0) {
+ id->type = "suspend";
+ strcpy(id->type_version, "tuxonice");
+ goto found_label;
+ }
}
return -1;