chiark / gitweb /
libvolume_id: recognize swap partitions with a tuxonice hibernate image
[elogind.git] / extras / volume_id / lib / linux_swap.c
index 9ff16e279861d92ac1e89e587aea04de624b19fa..592a38570d46d4852fcf4b4c93f4430676054723 100644 (file)
@@ -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;