skip CD-ROMs, avoid an automake bug, make sure that LBA read/write are supported, increase the number of devices to be probed.

This commit is contained in:
okuji 1999-12-29 01:27:35 +00:00
parent 1a1f49c966
commit 2745c43fd4
13 changed files with 78 additions and 76 deletions

View file

@ -1,3 +1,22 @@
1999-12-29 OKUJI Yoshinori <okuji@gnu.org>
* grub/asmstub.c (check_device) [__linux__]: Check if DEVICE is
a CD-ROM drive by the HDIO_GETGEO ioctl. If so, then return
zero. Reported by Pavel Roskin.
* stage2/Makefile.am (nodist_noinst_DATA): Renamed to ...
(noinst_DATA): ... this. The primary DATA is `nodist' by
default, at least theoretically. Reported by Klaus Reichl.
* stage2/bios.c (get_diskinfo): Set the LBA flag in GEOMETRY
only if bit 0 in DRP.FLAGS is set. Reported by Zack Weinberg
<zack@rabi.columbia.edu>.
From Pavel Roskin:
* grub/asmstub.c (init_device_map): Increase the number of
devices to be probed to 8 for IDE disks and 16 for SCSI
disks. Reported by Anton Anisimov <aa@bestlinux.net>.
1999-12-06 Gordon Matzigkeit <gord@fig.org>
* README (DEVELOPERS): Change CVS location to subversions.

View file

@ -246,17 +246,14 @@ maintainer-clean-tags:
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
-rm -rf $(distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
chmod a-w $(distdir)
dc_install_base=`cd $(distdir)/=inst && pwd` \
&& cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
@ -265,13 +262,8 @@ distcheck: dist
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& test `find $$dc_install_base -type f -print | wc -l` -le 1 \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& $(MAKE) $(AM_MAKEFLAGS) distclean \
&& rm -f $(distdir).tar.gz \
&& test `find . -type f -print | wc -l` -eq 0
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
&& $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
@banner="$(distdir).tar.gz is ready for distribution"; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
@ -283,16 +275,16 @@ dist: distdir
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
$(AMTAR) ch$(AMTARFLAGS)f - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
$(AMTAR) ch$(AMTARFLAGS)f - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
-rm -rf $(distdir)
mkdir $(distdir)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(distdir) && pwd`; \
@ -302,7 +294,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir); \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@ -357,7 +349,6 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-rm -f Makefile.in
mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-recursive

3
debian/Makefile.in vendored
View file

@ -118,7 +118,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir); \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@ -160,7 +160,6 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-rm -f Makefile.in
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am

View file

@ -229,8 +229,9 @@ uninstall-info:
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
d=$(srcdir); \
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $$d/$$file"; \
install-info --info-dir=$(DESTDIR)$(infodir) --remove $$d/$$file; \
done; \
else :; fi
@$(NORMAL_UNINSTALL)
@ -257,12 +258,12 @@ mostlyclean-aminfo:
-rm -f grub.aux grub.cp grub.cps grub.dvi grub.fn grub.fns grub.pgs \
grub.ky grub.kys grub.ps grub.log grub.pg grub.toc grub.tp \
grub.tps grub.vr grub.vrs grub.op grub.tr grub.cv grub.cn \
grub.cm grub.ov multiboot.aux multiboot.cp multiboot.cps \
multiboot.dvi multiboot.fn multiboot.fns multiboot.pgs \
multiboot.ky multiboot.kys multiboot.ps multiboot.log \
multiboot.pg multiboot.toc multiboot.tp multiboot.tps \
multiboot.vr multiboot.vrs multiboot.op multiboot.tr \
multiboot.cv multiboot.cn multiboot.cm multiboot.ov
multiboot.aux multiboot.cp multiboot.cps multiboot.dvi \
multiboot.fn multiboot.fns multiboot.pgs multiboot.ky \
multiboot.kys multiboot.ps multiboot.log multiboot.pg \
multiboot.toc multiboot.tp multiboot.tps multiboot.vr \
multiboot.vrs multiboot.op multiboot.tr multiboot.cv \
multiboot.cn
clean-aminfo:
@ -366,7 +367,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir); \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@ -411,7 +412,6 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-rm -f Makefile.in
mostlyclean-am: mostlyclean-vti mostlyclean-aminfo mostlyclean-generic
mostlyclean: mostlyclean-am

View file

@ -221,7 +221,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir); \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@ -296,7 +296,6 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-rm -f Makefile.in
mostlyclean-am: mostlyclean-sbinPROGRAMS mostlyclean-compile \
mostlyclean-tags mostlyclean-depend mostlyclean-generic

View file

@ -355,7 +355,7 @@ init_device_map (void)
}
/* IDE disks. */
for (i = 0; i < 4; i++)
for (i = 0; i < 8; i++)
{
char name[16];
@ -373,7 +373,7 @@ init_device_map (void)
}
/* The rest is SCSI disks. */
for (i = 0; i < 8; i++)
for (i = 0; i < 16; i++)
{
char name[16];
@ -518,6 +518,20 @@ check_device (const char *device)
return 0;
}
#ifdef __linux__
/* Check if DEVICE is a CD-ROM drive by the HDIO_GETGEO ioctl. */
{
struct hd_geometry hdg;
struct stat st;
if (fstat (fileno (fp), &st))
return 0;
if (S_ISBLK (st.st_mode) && ioctl (fileno (fp), HDIO_GETGEO, &hdg))
return 0;
}
#endif /* __linux__ */
/* Attempt to read the first sector. */
if (fread (buf, 1, 512, fp) != 512)
{

View file

@ -197,7 +197,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir); \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@ -271,7 +271,6 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-rm -f Makefile.in
mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
mostlyclean-tags mostlyclean-depend mostlyclean-generic

View file

@ -241,7 +241,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir); \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@ -486,7 +486,6 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-rm -f Makefile.in
mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
mostlyclean-tags mostlyclean-depend mostlyclean-generic

View file

@ -221,7 +221,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir); \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@ -278,7 +278,6 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-rm -f Makefile.in
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
mostlyclean-tags mostlyclean-depend mostlyclean-generic

View file

@ -24,7 +24,7 @@ pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
nodist_pkgdata_DATA = stage2 e2fs_stage1_5 fat_stage1_5 ffs_stage1_5 \
minix_stage1_5
CLEANFILES = $(nodist_pkgdata_DATA)
nodist_noinst_DATA = pre_stage2 start
noinst_DATA = pre_stage2 start
noinst_PROGRAMS = pre_stage2.exec start.exec \
e2fs_stage1_5.exec fat_stage1_5.exec \
ffs_stage1_5.exec minix_stage1_5.exec

View file

@ -111,7 +111,7 @@ nodist_pkgdata_DATA = stage2 e2fs_stage1_5 fat_stage1_5 ffs_stage1_5 \
minix_stage1_5
CLEANFILES = $(nodist_pkgdata_DATA) $(noinst_DATA) $(BUILT_SOURCES)
nodist_noinst_DATA = pre_stage2 start
noinst_DATA = pre_stage2 start
noinst_PROGRAMS = pre_stage2.exec start.exec \
e2fs_stage1_5.exec fat_stage1_5.exec \
ffs_stage1_5.exec minix_stage1_5.exec
@ -254,11 +254,12 @@ DIST_SOURCES = $(libgrub_a_SOURCES) $(e2fs_stage1_5_exec_SOURCES) \
$(fat_stage1_5_exec_SOURCES) $(ffs_stage1_5_exec_SOURCES) \
$(minix_stage1_5_exec_SOURCES) $(pre_stage2_exec_SOURCES) \
$(start_exec_SOURCES)
DATA = $(nodist_noinst_DATA) $(nodist_pkgdata_DATA)
DATA = $(nodist_pkgdata_DATA) $(noinst_DATA)
HEADERS = $(noinst_HEADERS)
DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in compile
DIST_COMMON = $(noinst_DATA) $(noinst_HEADERS) Makefile.am Makefile.in \
compile
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@ -414,24 +415,6 @@ start.exec: $(start_exec_OBJECTS) $(start_exec_DEPENDENCIES)
.c.o:
$(COMPILE) -c $<
install-nodist_noinstDATA: $(nodist_noinst_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(noinstdir)
@list='$(nodist_noinst_DATA)'; for p in $$list; do \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(noinstdir)/$$f"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(noinstdir)/$$f; \
done
uninstall-nodist_noinstDATA:
@$(NORMAL_UNINSTALL)
@list='$(nodist_noinst_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(noinstdir)/$$f"; \
rm -f $(DESTDIR)$(noinstdir)/$$f; \
done
install-nodist_pkgdataDATA: $(nodist_pkgdata_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
@ -494,7 +477,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir); \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@ -1546,21 +1529,20 @@ installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: install-nodist_noinstDATA install-nodist_pkgdataDATA
install-data-am: install-nodist_pkgdataDATA
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-nodist_noinstDATA uninstall-nodist_pkgdataDATA
uninstall-am: uninstall-nodist_pkgdataDATA
uninstall: uninstall-am
all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) $(HEADERS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(nodist_noinstdir) \
$(DESTDIR)$(nodist_pkgdatadir)
$(mkinstalldirs) $(DESTDIR)$(nodist_pkgdatadir)
mostlyclean-generic:
@ -1574,7 +1556,6 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-rm -f Makefile.in
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
mostlyclean-noinstPROGRAMS mostlyclean-tags \
@ -1608,8 +1589,7 @@ clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile mostlyclean-noinstPROGRAMS \
distclean-noinstPROGRAMS clean-noinstPROGRAMS \
maintainer-clean-noinstPROGRAMS uninstall-nodist_noinstDATA \
install-nodist_noinstDATA uninstall-nodist_pkgdataDATA \
maintainer-clean-noinstPROGRAMS uninstall-nodist_pkgdataDATA \
install-nodist_pkgdataDATA tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir mostlyclean-depend \
distclean-depend clean-depend maintainer-clean-depend check-TESTS \

View file

@ -157,6 +157,9 @@ get_diskinfo (int drive, struct geometry *geometry)
drp.size = sizeof (drp);
err = get_diskinfo_int13_extensions (drive, &drp);
if (! err)
{
/* Make sure that LBA read/write functions are supported. */
if (drp.flags & 1)
{
geometry->flags = BIOSDISK_FLAG_LBA_EXTENSION;
@ -166,6 +169,7 @@ get_diskinfo (int drive, struct geometry *geometry)
total_sectors = drp.total_sectors & ~0L;
}
}
}
/* Don't pass GEOMETRY directly, but pass each element instead,
so that we can change the structure easily. */

View file

@ -245,7 +245,7 @@ distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir); \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
@ -320,7 +320,6 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
-rm -f Makefile.in
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
mostlyclean-tags mostlyclean-depend mostlyclean-generic