svn commit: r185123 - head/usr.sbin/dumpcis
Warner Losh
imp at FreeBSD.org
Thu Nov 20 00:20:53 PST 2008
Author: imp
Date: Thu Nov 20 08:20:53 2008
New Revision: 185123
URL: http://svn.freebsd.org/changeset/base/185123
Log:
Restore now-useless ioctl as a roadmap. The original dumpcis code
assumed it had to toggle between attribute and common memory in the
cards. The kernel is supposed to cope with that automatically and
give us a tuple list. However, there's a number of details of how
that happens that's currently, ummm, magical and/or not implemented
for 16-bit PC Cards that have CIS_LONGLINK_C tuples in them (eg, mix
both attribute memory and common memory). Also, CIS_LOGNLINK_A
entries might not be handled completely correctly either, since there
can be gaps in the attribute vs common stuff.
All this will need to be corrected in the kernel. Once it is
corrected, dumpcis can be made even simpler in some ways, a little
more complicated in others once an API for presentation of CIS to
userland in these weird cases is settled upon.
Modified:
head/usr.sbin/dumpcis/readcis.c
Modified: head/usr.sbin/dumpcis/readcis.c
==============================================================================
--- head/usr.sbin/dumpcis/readcis.c Thu Nov 20 08:14:14 2008 (r185122)
+++ head/usr.sbin/dumpcis/readcis.c Thu Nov 20 08:20:53 2008 (r185123)
@@ -259,6 +259,7 @@ read_one_tuplelist(int fd, int flags, of
tl = xmalloc(sizeof(*tl));
tl->offs = offs;
tl->flags = flags & MDF_ATTR;
+ ioctl(fd, PIOCRWFLAG, &flags);
lseek(fd, offs, SEEK_SET);
do {
if (read(fd, &code, 1) != 1) {
More information about the svn-src-head
mailing list