From d24002df4fbae5c2a97a97851de6e39ae9fb9130 Mon Sep 17 00:00:00 2001 From: okuji Date: Thu, 21 Dec 2000 22:35:01 +0000 Subject: [PATCH] use lower case for the variable name MBR. --- ChangeLog | 6 ++++++ stage2/disk_io.c | 25 +++++++++++++------------ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7690ef0cd..08a8e348a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-12-22 OKUJI Yoshinori + + * stage2/disk_io.c (make_saved_active): Change the variable name + ``MBR'' to lower case. + (set_partition_hidden_flag): Likewise. + 2000-12-20 Jochen Hoenicke From Cedric Ware : diff --git a/stage2/disk_io.c b/stage2/disk_io.c index 02812241c..b8fcdcb20 100644 --- a/stage2/disk_io.c +++ b/stage2/disk_io.c @@ -394,7 +394,7 @@ attempt_mount (void) int make_saved_active (void) { - char MBR[512]; + char mbr[512]; if (saved_drive & 0x80) { @@ -410,31 +410,31 @@ make_saved_active (void) } /* Read the MBR in the scratch space. */ - if (! rawread (saved_drive, 0, 0, SECTOR_SIZE, (char *) MBR)) + if (! rawread (saved_drive, 0, 0, SECTOR_SIZE, mbr)) return 0; /* If the partition is an extended partition, setting the active flag violates the specification by IBM. */ - if (IS_PC_SLICE_TYPE_EXTENDED (PC_SLICE_TYPE (MBR, part))) + if (IS_PC_SLICE_TYPE_EXTENDED (PC_SLICE_TYPE (mbr, part))) { errnum = ERR_DEV_VALUES; return 0; } /* Check if the active flag is disabled. */ - if (PC_SLICE_FLAG (MBR, part) != PC_SLICE_FLAG_BOOTABLE) + if (PC_SLICE_FLAG (mbr, part) != PC_SLICE_FLAG_BOOTABLE) { int i; /* Clear all the active flags in this table. */ for (i = 0; i < 4; i++) - PC_SLICE_FLAG (MBR, i) = 0; + PC_SLICE_FLAG (mbr, i) = 0; /* Set the flag. */ - PC_SLICE_FLAG (MBR, part) = PC_SLICE_FLAG_BOOTABLE; + PC_SLICE_FLAG (mbr, part) = PC_SLICE_FLAG_BOOTABLE; /* Write back the MBR. */ - if (! rawwrite (saved_drive, 0, MBR)) + if (! rawwrite (saved_drive, 0, mbr)) return 0; } } @@ -453,7 +453,8 @@ make_saved_active (void) int set_partition_hidden_flag (int hidden) { - char MBR[512]; + char mbr[512]; + if (current_drive & 0x80) { int part = current_partition >> 16; @@ -464,15 +465,15 @@ set_partition_hidden_flag (int hidden) return 0; } - if (! rawread (current_drive, 0, 0, SECTOR_SIZE, (char *) MBR)) + if (! rawread (current_drive, 0, 0, SECTOR_SIZE, mbr)) return 0; if (hidden) - PC_SLICE_TYPE (MBR, part) |= PC_SLICE_TYPE_HIDDEN_FLAG; + PC_SLICE_TYPE (mbr, part) |= PC_SLICE_TYPE_HIDDEN_FLAG; else - PC_SLICE_TYPE (MBR, part) &= ~PC_SLICE_TYPE_HIDDEN_FLAG; + PC_SLICE_TYPE (mbr, part) &= ~PC_SLICE_TYPE_HIDDEN_FLAG; - if (! rawwrite (current_drive, 0, MBR)) + if (! rawwrite (current_drive, 0, mbr)) return 0; }