diff options
author | imp <imp@FreeBSD.org> | 2002-07-22 06:58:24 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2002-07-22 06:58:24 +0000 |
commit | a76817b7416c637546707909fdf26597a09a856e (patch) | |
tree | 74ec4095ef1bc3895a1f6f4c267d975e1d2aae4a /usr.sbin/pccard | |
parent | 2442eb4eddf7def948501cf76d5fa2eab08df870 (diff) | |
download | FreeBSD-src-a76817b7416c637546707909fdf26597a09a856e.zip FreeBSD-src-a76817b7416c637546707909fdf26597a09a856e.tar.gz |
Copy cis strings into the kernel.
Diffstat (limited to 'usr.sbin/pccard')
-rw-r--r-- | usr.sbin/pccard/pccardd/cardd.c | 22 | ||||
-rw-r--r-- | usr.sbin/pccard/pccardd/cardd.h | 2 |
2 files changed, 15 insertions, 9 deletions
diff --git a/usr.sbin/pccard/pccardd/cardd.c b/usr.sbin/pccard/pccardd/cardd.c index c2431bf..9e8af7f 100644 --- a/usr.sbin/pccard/pccardd/cardd.c +++ b/usr.sbin/pccard/pccardd/cardd.c @@ -358,16 +358,18 @@ escape: bzero(sp->eaddr, sizeof(sp->eaddr)); } if (sp->cis->manufacturer && sp->cis->product) { - sp->manufacturer=sp->cis->manufacturer; - sp->product=sp->cis->product; - if(sp->cis->prodext) { - sp->prodext=sp->cis->prodext; /* For xe driver */ - } + sp->manufacturer = sp->cis->manufacturer; + sp->product = sp->cis->product; + sp->prodext = sp->cis->prodext; /* For xe driver */ } else { - sp->manufacturer=0; - sp->product=0; - sp->prodext=0; + sp->manufacturer = 0; + sp->product = 0; + sp->prodext = 0; } + if (sp->cis->manuf) + strlcpy(sp->manufstr, sp->cis->manuf, sizeof(sp->manufstr)); + if (sp->cis->vers) + strlcpy(sp->versstr, sp->cis->vers, sizeof(sp->versstr)); if (cp->ether) { struct ether *e = 0; @@ -639,7 +641,7 @@ assign_card_index(struct slot *sp, struct cis * cis) goto next; } return cp; /* found */ - next: + next:; } return cis->def_config; } @@ -990,6 +992,8 @@ setup_slot(struct slot *sp) drv.manufacturer = sp->manufacturer; drv.product = sp->product; drv.prodext = sp->prodext; + strlcpy(drv.manufstr, sp->manufstr, sizeof(drv.manufstr)); + strlcpy(drv.versstr, sp->versstr, sizeof(drv.versstr)); /* * If the driver fails to be connected to the device, * then it may mean that the driver did not recognise it. diff --git a/usr.sbin/pccard/pccardd/cardd.h b/usr.sbin/pccard/pccardd/cardd.h index afd8732..b39df25 100644 --- a/usr.sbin/pccard/pccardd/cardd.h +++ b/usr.sbin/pccard/pccardd/cardd.h @@ -125,6 +125,8 @@ struct slot { u_int product; u_int prodext; unsigned char eaddr[6]; /* If any */ + char manufstr[DEV_MAX_CIS_LEN]; + char versstr[DEV_MAX_CIS_LEN]; struct allocblk io; /* I/O block spec */ struct allocblk mem; /* Memory block spec */ int irq; /* Irq value */ |