patch-2.2.12 linux/drivers/isdn/avmb1/b1.c
Next file: linux/drivers/isdn/avmb1/b1pci.c
Previous file: linux/drivers/isdn/avmb1/avmcard.h
Back to the patch index
Back to the overall index
- Lines: 71
- Date:
Wed Aug 25 17:29:47 1999
- Orig file:
v2.2.11/linux/drivers/isdn/avmb1/b1.c
- Orig date:
Mon Aug 9 16:05:55 1999
diff -u --recursive --new-file v2.2.11/linux/drivers/isdn/avmb1/b1.c linux/drivers/isdn/avmb1/b1.c
@@ -1,11 +1,20 @@
/*
- * $Id: b1.c,v 1.4 1999/07/09 15:05:38 keil Exp $
+ * $Id: b1.c,v 1.7 1999/08/04 10:10:09 calle Exp $
*
* Common module for AVM B1 cards.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1.c,v $
+ * Revision 1.7 1999/08/04 10:10:09 calle
+ * Bugfix: corrected /proc functions, added structure for new AVM cards.
+ *
+ * Revision 1.6 1999/07/23 08:51:04 calle
+ * small fix and typo in checkin before.
+ *
+ * Revision 1.5 1999/07/23 08:41:48 calle
+ * prepared for new AVM cards.
+ *
* Revision 1.4 1999/07/09 15:05:38 keil
* compat.h is now isdn_compat.h
*
@@ -54,7 +63,7 @@
#include "capicmd.h"
#include "capiutil.h"
-static char *revision = "$Revision: 1.4 $";
+static char *revision = "$Revision: 1.7 $";
/* ------------------------------------------------------------- */
@@ -401,7 +410,10 @@
flag = ((__u8 *)(profp->manu))[1];
switch (flag) {
- case 0: strcpy(card->cardname, "B1"); break;
+ case 0: if (card->version[VER_CARDTYPE])
+ strcpy(card->cardname, card->version[VER_CARDTYPE]);
+ else strcpy(card->cardname, "B1");
+ break;
case 3: strcpy(card->cardname,"PCMCIA B"); break;
case 4: strcpy(card->cardname,"PCMCIA M1"); break;
case 5: strcpy(card->cardname,"PCMCIA M2"); break;
@@ -580,6 +592,7 @@
case avm_m2: s = "M2"; break;
case avm_t1isa: s = "T1 ISA (HEMA)"; break;
case avm_t1pci: s = "T1 PCI"; break;
+ case avm_c4: s = "C4"; break;
default: s = "???"; break;
}
len += sprintf(page+len, "%-16s %s\n", "type", s);
@@ -619,15 +632,11 @@
}
len += sprintf(page+len, "%-16s %s\n", "cardname", card->cardname);
- if (len < off)
- return 0;
- *eof = 1;
- *start = page - off;
- return ((count < len-off) ? count : len-off);
- if (len < off)
+ if (off+count >= len)
+ *eof = 1;
+ if (len < off)
return 0;
- *eof = 1;
- *start = page - off;
+ *start = page + off;
return ((count < len-off) ? count : len-off);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)