summaryrefslogtreecommitdiffstats
path: root/usr.sbin/dumpcis
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2008-11-20 08:20:53 +0000
committerimp <imp@FreeBSD.org>2008-11-20 08:20:53 +0000
commit4063d86dc629967ea7387a15dedecd9fc9130abe (patch)
tree9d54946a1af98d162141388944e1a4ecd66ec85b /usr.sbin/dumpcis
parent986856cb7e6efc5bcf4cf9790f2cc3ce471f6a73 (diff)
downloadFreeBSD-src-4063d86dc629967ea7387a15dedecd9fc9130abe.zip
FreeBSD-src-4063d86dc629967ea7387a15dedecd9fc9130abe.tar.gz
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.
Diffstat (limited to 'usr.sbin/dumpcis')
-rw-r--r--usr.sbin/dumpcis/readcis.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/dumpcis/readcis.c b/usr.sbin/dumpcis/readcis.c
index 1831b8d..4d2d110 100644
--- a/usr.sbin/dumpcis/readcis.c
+++ b/usr.sbin/dumpcis/readcis.c
@@ -259,6 +259,7 @@ read_one_tuplelist(int fd, int flags, off_t offs)
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) {
OpenPOWER on IntegriCloud