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 committed 1999-12-29 01:27:35 +00:00
1 parent 1a1f49c966
commit 2745c43fd4
13 files changed
+78 -76

No files matched your search

+1 -2
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
+16 -2
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)
{