From: Damjan Georgievski Date: Mon, 21 Apr 2008 10:44:25 +0000 (+0200) Subject: libvolume_id: recognize swap partitions with a tuxonice hibernate image X-Git-Tag: 174~1725 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be9c76b4345b36ec40d8b7b22dc687b4042fe56f;p=systemd libvolume_id: recognize swap partitions with a tuxonice hibernate image --- diff --git a/extras/volume_id/lib/linux_swap.c b/extras/volume_id/lib/linux_swap.c index 9ff16e27..592a3857 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;