From 03fabce6eb36ce624144d6482aff2857739cd6c4 Mon Sep 17 00:00:00 2001 From: yura Date: Mon, 11 Dec 2006 03:02:23 +0000 Subject: [PATCH] o fix magicNTFS defenition o remove NTFS_SB_MAGIC because it is unusefull o rename magicNTFS -> NTFS_SB_MAGIC o make bootsect.c use NTFS_SB_MAGIC instead of hardcoded value --- include/ntfs/layout.h | 5 ++--- libntfs/bootsect.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/ntfs/layout.h b/include/ntfs/layout.h index 486340c3..9782f426 100644 --- a/include/ntfs/layout.h +++ b/include/ntfs/layout.h @@ -27,9 +27,8 @@ #include "endians.h" #include "support.h" -/* The NTFS oem_id */ -#define magicNTFS const_cpu_to_le64(0x202020205346544e) /* "NTFS " */ -#define NTFS_SB_MAGIC 0x5346544e /* 'NTFS' */ +/* The NTFS oem_id "NTFS " */ +#define NTFS_SB_MAGIC const_cpu_to_le64(0x202020205346544eULL) /* * Location of bootsector on partition: diff --git a/libntfs/bootsect.c b/libntfs/bootsect.c index f2bafb4e..90a30f01 100644 --- a/libntfs/bootsect.c +++ b/libntfs/bootsect.c @@ -83,7 +83,7 @@ BOOL ntfs_boot_sector_is_ntfs(NTFS_BOOT_SECTOR *b, /* Check OEMidentifier is "NTFS " */ ntfs_log_debug("Checking OEMid... "); - if (b->oem_id != cpu_to_le64(0x202020205346544eULL)) /* "NTFS " */ + if (b->oem_id != NTFS_SB_MAGIC) /* "NTFS " */ goto not_ntfs; ntfs_log_debug("OK\n");