diff --git a/ChangeLog b/ChangeLog index a377e4861..83f63f935 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +1999-12-29 OKUJI Yoshinori + + * 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 + . + + 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 . + 1999-12-06 Gordon Matzigkeit * README (DEVELOPERS): Change CVS location to subversions. diff --git a/Makefile.in b/Makefile.in index 6668aff9d..9b85d9285 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/debian/Makefile.in b/debian/Makefile.in index 2fe119ecc..e822cdc32 100644 --- a/debian/Makefile.in +++ b/debian/Makefile.in @@ -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 diff --git a/docs/Makefile.in b/docs/Makefile.in index f22f9c521..8f4d9f1cd 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -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 diff --git a/grub/Makefile.in b/grub/Makefile.in index d23fd4a2d..32ce21f9d 100644 --- a/grub/Makefile.in +++ b/grub/Makefile.in @@ -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 diff --git a/grub/asmstub.c b/grub/asmstub.c index d6fa53333..8ef074a6a 100644 --- a/grub/asmstub.c +++ b/grub/asmstub.c @@ -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) { diff --git a/lib/Makefile.in b/lib/Makefile.in index 5a33cdb62..0c3e2f749 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -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 diff --git a/netboot/Makefile.in b/netboot/Makefile.in index 737711df2..372753a5f 100644 --- a/netboot/Makefile.in +++ b/netboot/Makefile.in @@ -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 diff --git a/stage1/Makefile.in b/stage1/Makefile.in index 095efb237..222a73bcb 100644 --- a/stage1/Makefile.in +++ b/stage1/Makefile.in @@ -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 diff --git a/stage2/Makefile.am b/stage2/Makefile.am index 863e874fd..d6ab99354 100644 --- a/stage2/Makefile.am +++ b/stage2/Makefile.am @@ -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 diff --git a/stage2/Makefile.in b/stage2/Makefile.in index a2ebd6879..8d416ae9d 100644 --- a/stage2/Makefile.in +++ b/stage2/Makefile.in @@ -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 \ diff --git a/stage2/bios.c b/stage2/bios.c index b02a99103..d57e76cb8 100644 --- a/stage2/bios.c +++ b/stage2/bios.c @@ -158,12 +158,16 @@ get_diskinfo (int drive, struct geometry *geometry) err = get_diskinfo_int13_extensions (drive, &drp); if (! err) { - geometry->flags = BIOSDISK_FLAG_LBA_EXTENSION; - - /* FIXME: when the 2TB limit becomes critical, we must - change the type of TOTAL_SECTORS to unsigned long - long. */ - total_sectors = drp.total_sectors & ~0L; + /* Make sure that LBA read/write functions are supported. */ + if (drp.flags & 1) + { + geometry->flags = BIOSDISK_FLAG_LBA_EXTENSION; + + /* FIXME: when the 2TB limit becomes critical, we must + change the type of TOTAL_SECTORS to unsigned long + long. */ + total_sectors = drp.total_sectors & ~0L; + } } } diff --git a/util/Makefile.in b/util/Makefile.in index c646b901a..805dd580b 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -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