From 847a005af40e2d86c88f3833f163b4755c860787 Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 23 Apr 2003 23:40:28 +0000 Subject: [PATCH] Copy CIS3 and CIS4 strings into the kernel too. PR: 51333 Submitted by: Scott Mitchell --- usr.sbin/pccard/pccardd/cardd.c | 6 ++++++ usr.sbin/pccard/pccardd/cardd.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/usr.sbin/pccard/pccardd/cardd.c b/usr.sbin/pccard/pccardd/cardd.c index fa9a27737d1d..9e392e2ba295 100644 --- a/usr.sbin/pccard/pccardd/cardd.c +++ b/usr.sbin/pccard/pccardd/cardd.c @@ -370,6 +370,10 @@ escape: strlcpy(sp->manufstr, sp->cis->manuf, sizeof(sp->manufstr)); if (sp->cis->vers) strlcpy(sp->versstr, sp->cis->vers, sizeof(sp->versstr)); + if (sp->cis->add_info1) + strlcpy(sp->cis3str, sp->cis->add_info1, sizeof(sp->cis3str)); + if (sp->cis->add_info2) + strlcpy(sp->cis4str, sp->cis->add_info2, sizeof(sp->cis4str)); if (cp->ether) { struct ether *e = 0; @@ -994,6 +998,8 @@ setup_slot(struct slot *sp) drv.prodext = sp->prodext; strlcpy(drv.manufstr, sp->manufstr, sizeof(drv.manufstr)); strlcpy(drv.versstr, sp->versstr, sizeof(drv.versstr)); + strlcpy(drv.cis3str, sp->cis3str, sizeof(drv.cis3str)); + strlcpy(drv.cis4str, sp->cis4str, sizeof(drv.cis4str)); /* * 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 b39df25407c9..f01c51b5c919 100644 --- a/usr.sbin/pccard/pccardd/cardd.h +++ b/usr.sbin/pccard/pccardd/cardd.h @@ -127,6 +127,8 @@ struct slot { unsigned char eaddr[6]; /* If any */ char manufstr[DEV_MAX_CIS_LEN]; char versstr[DEV_MAX_CIS_LEN]; + char cis3str[DEV_MAX_CIS_LEN]; + char cis4str[DEV_MAX_CIS_LEN]; struct allocblk io; /* I/O block spec */ struct allocblk mem; /* Memory block spec */ int irq; /* Irq value */