From 3c6e88cb0fc4d9592c68c5fcb74b2e46b1445523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Mon, 23 Jan 2012 17:16:07 +0100 Subject: [PATCH] fixed checking whether Windows 7 was hibernated On Windows XP and Vista, the system hibernation is identified by the sequence "hibr" at the beginning of hiberfil.sys. This had been changed to "HIBR" in Windows 7, so both sequences have to be accepted as hibernation criteria. --- libntfs-3g/volume.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libntfs-3g/volume.c b/libntfs-3g/volume.c index a18109f1..f4d7b83f 100644 --- a/libntfs-3g/volume.c +++ b/libntfs-3g/volume.c @@ -762,7 +762,8 @@ int ntfs_volume_check_hiberfile(ntfs_volume *vol, int verbose) errno = EPERM; goto out; } - if (memcmp(buf, "hibr", 4) == 0) { + if ((memcmp(buf, "hibr", 4) == 0) + || (memcmp(buf, "HIBR", 4) == 0)) { if (verbose) ntfs_log_error("Windows is hibernated, refused to mount.\n"); errno = EPERM;