From 6bdb0de51a85201e47b3fb5e7c59e409785259cd Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Fri, 18 Apr 2008 15:24:31 +0000 Subject: [PATCH] fix endian issue on patch --- e2fsprogs-1.40.8-blkid-swap-tests.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/e2fsprogs-1.40.8-blkid-swap-tests.patch b/e2fsprogs-1.40.8-blkid-swap-tests.patch index 8bc80f0..02b197d 100644 --- a/e2fsprogs-1.40.8-blkid-swap-tests.patch +++ b/e2fsprogs-1.40.8-blkid-swap-tests.patch @@ -27,13 +27,14 @@ index 45885c3..a070201 100644 unsigned char *buf __BLKID_ATTR((unused))) { struct swap_id_block *sws; -@@ -843,6 +843,11 @@ static int probe_swap1(struct blkid_probe *probe, +@@ -843,6 +843,12 @@ static int probe_swap1(struct blkid_probe *probe, if (!sws) return 1; + /* check for wrong version or zeroed pagecount, for sanity */ + if (!memcmp(id->bim_magic, "SWAPSPACE2", id->bim_len) && -+ (sws->sws_version != 1 || sws->sws_lastpage == 0)) ++ (blkid_le32(sws->sws_version) != 1 || ++ sws->sws_lastpage == 0)) + return 1; + /* arbitrary sanity check.. is there any garbage down there? */