diff options
author | Vladimir Dronnikov | 2010-02-08 03:08:05 +0100 |
---|---|---|
committer | Denys Vlasenko | 2010-02-08 03:08:05 +0100 |
commit | 73ccd0ca879b3b3958fc15fad9565aa97ee04884 (patch) | |
tree | 988ea0d360d1b3d63b935c59272660eed67861b1 /util-linux | |
parent | 14a917eaab18975573b52d256cb4b2b88747a016 (diff) | |
download | busybox-73ccd0ca879b3b3958fc15fad9565aa97ee04884.zip busybox-73ccd0ca879b3b3958fc15fad9565aa97ee04884.tar.gz |
volume_id/linux_swap: detect suspended image signatures too
Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/volume_id/linux_swap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/util-linux/volume_id/linux_swap.c b/util-linux/volume_id/linux_swap.c index 1b5488f..5743546 100644 --- a/util-linux/volume_id/linux_swap.c +++ b/util-linux/volume_id/linux_swap.c @@ -52,7 +52,11 @@ int FAST_FUNC volume_id_probe_linux_swap(struct volume_id *id /*,uint64_t off*/) goto found; } - if (memcmp(buf, "SWAPSPACE2", 10) == 0) { + if (memcmp(buf, "SWAPSPACE2", 10) == 0 + || memcmp(buf, "S1SUSPEND", 9) == 0 + || memcmp(buf, "S2SUSPEND", 9) == 0 + || memcmp(buf, "ULSUSPEND", 9) == 0 + ) { sw = volume_id_get_buffer(id, off, sizeof(struct swap_header_v1_2)); if (sw == NULL) return -1; |