Serguei Tzukanov added JFS and XFS support.
-Jason Thomas added Linux DAC960 support.
+Jason Thomas added Linux DAC960 support and support for hiding/unhiding
+logical partitions.
+2001-11-29 Yoshinori K. Okuji <okuji@gnu.org>
+
+ From Jason Thomas:
+ * stage2/disk_io.c (set_partition_hidden_flag): Complete rewrite
+ of this function which now supports logical partitions.
+
2001-11-12 Yoshinori K. Okuji <okuji@gnu.org>
* docs/grub.texi: The copyright of this file is only held by
uninstall-recursive check-recursive installcheck-recursive
DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
Makefile.am Makefile.in NEWS THANKS TODO acconfig.h \
- acinclude.m4 aclocal.m4 config.guess config.h.in config.sub \
- configure configure.in depcomp install-sh missing mkinstalldirs
+ acinclude.m4 aclocal.m4 compile config.guess config.h.in \
+ config.sub configure configure.in depcomp install-sh missing \
+ mkinstalldirs
DIST_SUBDIRS = $(SUBDIRS)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
New in 0.91:
* Support for Linux DAC960 is added.
* JFS and XFS support is added.
+* The commands "hide" and "unhide" support logical partitions.
* Important bugfixes are made for ReiserFS, APM, TFTP, etc.
New in 0.90 - 2001-07-11:
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
-.TH GRUB-INSTALL "8" "October 2001" "grub-install (GNU GRUB 0.90)" FSF
+.TH GRUB-INSTALL "8" "November 2001" "grub-install (GNU GRUB 0.90)" FSF
.SH NAME
grub-install \- install GRUB on your drive
.SH SYNOPSIS
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
-.TH GRUB-MD5-CRYPT "8" "October 2001" "grub-md5-crypt (GNU GRUB )" FSF
+.TH GRUB-MD5-CRYPT "8" "November 2001" "grub-md5-crypt (GNU GRUB )" FSF
.SH NAME
grub-md5-crypt \- Encrypt a password in MD5 format
.SH SYNOPSIS
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
-.TH GRUB "8" "October 2001" "grub (GNU GRUB 0.90)" FSF
+.TH GRUB "8" "November 2001" "grub (GNU GRUB 0.90)" FSF
.SH NAME
grub \- the grub shell
.SH SYNOPSIS
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
-.TH MBCHK "1" "October 2001" "mbchk (GNU GRUB 0.90)" FSF
+.TH MBCHK "1" "November 2001" "mbchk (GNU GRUB 0.90)" FSF
.SH NAME
mbchk \- check the format of a Multiboot kernel
.SH SYNOPSIS
-@set UPDATED 13 October 2001
-@set UPDATED-MONTH October 2001
+@set UPDATED 12 November 2001
+@set UPDATED-MONTH November 2001
@set EDITION 0.90
@set VERSION 0.90
-@set UPDATED 13 October 2001
-@set UPDATED-MONTH October 2001
+@set UPDATED 12 November 2001
+@set UPDATED-MONTH November 2001
@set EDITION 0.90
@set VERSION 0.90
int
set_partition_hidden_flag (int hidden)
{
+ unsigned long part = 0xFFFFFF;
+ unsigned long start, len, offset, ext_offset;
+ int entry, type;
char mbr[512];
- if (current_drive & 0x80)
+ /* The drive must be a hard disk. */
+ if (! (current_drive & 0x80))
{
- int part = current_partition >> 16;
-
- if (part > 3)
+ errnum = ERR_BAD_ARGUMENT;
+ return 1;
+ }
+
+ /* The partition must be a PC slice. */
+ if ((current_partition >> 16) == 0xFF
+ || (current_partition & 0xFFFF) != 0xFFFF)
+ {
+ errnum = ERR_BAD_ARGUMENT;
+ return 1;
+ }
+
+ /* Look for the partition. */
+ while (next_partition (current_drive, 0xFFFFFF, &part, &type,
+ &start, &len, &offset, &entry,
+ &ext_offset, mbr))
+ {
+ if (part == current_partition)
{
- errnum = ERR_NO_PART;
- return 0;
- }
-
- if (! rawread (current_drive, 0, 0, SECTOR_SIZE, mbr))
- return 0;
-
- if (hidden)
- PC_SLICE_TYPE (mbr, part) |= PC_SLICE_TYPE_HIDDEN_FLAG;
- else
- PC_SLICE_TYPE (mbr, part) &= ~PC_SLICE_TYPE_HIDDEN_FLAG;
-
- if (! rawwrite (current_drive, 0, mbr))
- return 0;
+ /* Found. */
+ if (hidden)
+ PC_SLICE_TYPE (mbr, entry) |= PC_SLICE_TYPE_HIDDEN_FLAG;
+ else
+ PC_SLICE_TYPE (mbr, entry) &= ~PC_SLICE_TYPE_HIDDEN_FLAG;
+
+ /* Write back the MBR to the disk. */
+ buf_track = -1;
+ if (! rawwrite (current_drive, offset, mbr))
+ return 1;
+
+ /* Succeed. */
+ return 0;
+ }
}
-
+
return 1;
}