Date: Thu, 20 Nov 2008 08:20:53 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185123 - head/usr.sbin/dumpcis Message-ID: <200811200820.mAK8KrQl044617@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811200820.mAK8KrQl044617>