|
From: Mattias A. <mat...@us...> - 2001-03-30 10:28:22
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
btdebug.c 1.17 1.18=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* added time diff since last debug printout
The diff of the modified file(s):
--- btdebug.c 2001/03/02 21:52:15 1.17
+++ btdebug.c 2001/03/30 10:28:20 1.18
@@ -66,24 +66,45 @@
#ifdef __KERNEL__
=20
static u8 buf[20];
+static struct timeval tv_old =3D {0,0};
=20=20
u8* print_time(s32 use_stdout)
{
- s32 len;
+ s32 len, diff;
struct timeval tv;=20=20
do_gettimeofday(&tv);
+=09
+ diff =3D ((tv.tv_sec - tv_old.tv_sec)*1000000 + tv.tv_usec) -=20
+ tv_old.tv_usec;
+=09
if (use_stdout=3D=3D1) {
- printk(buf, "[%d,%d] ", tv.tv_sec, tv.tv_usec);
- return NULL;
+ printk("[%03d,%08d|%06d] ",=20
+ (int)tv.tv_sec, (int)tv.tv_usec, diff);
}
else
{=20=20
- len =3D sprintf(buf, "[%d,%d]", (int)tv.tv_sec, (int)tv.tv_usec);
+ len =3D sprintf(buf, "[%03d,%08d|%06d] ",=20
+ (int)tv.tv_sec, tv.tv_usec, diff);
buf[len]=3D0;
}
+ tv_old =3D tv;
return buf;
}
=20
+void=20
+print_data(const u8 *message, u8 *buf, s32 len)
+{=20
+ s32 t;
+ printk("\n%s (%d)", message, len);
+ for (t=3D0;t<len;t++)=20
+ {
+ if((t%16)=3D=3D0)
+ printk("\n ");
+ printk("0x%02x ", buf[t]);
+ }
+ printk("\n");
+}
+
#else
/* No timestamps in usermode yet */
char* print_time(int use_stdout)
@@ -92,19 +113,21 @@
return "No timestamps in usermode stack yet\n";
}
=20
-#endif
void=20
print_data(const u8 *message, u8 *buf, s32 len)
{=20
s32 t;
- printk("\n%s (%d)", message, len);
+ printf("\n%s (%d)", message, len);
for (t=3D0;t<len;t++)=20
{
if((t%16)=3D=3D0)
printk("\n ");
- printk("0x%02x ", buf[t]);
+ printf("0x%02x ", buf[t]);
}
- printk("\n");
+ printf("\n");
}
+
+#endif
+
=20
/****************** END OF FILE debug.c **********************************=
***/
|
|
From: Mattias A. <mat...@us...> - 2001-04-12 15:14:06
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
btdebug.c 1.18 1.19=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* added bd2str which converts a bd addr into a string
=20=20
The diff of the modified file(s):
--- btdebug.c 2001/03/30 10:28:20 1.18
+++ btdebug.c 2001/04/12 15:14:06 1.19
@@ -126,8 +126,16 @@
}
printf("\n");
}
-
#endif
=20
+const char* bd2str(const unsigned char *bd)
+{
+ static char buf[20];
+
+ sprintf(buf, "%02X:%02X:%02X:%02X:%02X:%02X",
+ bd[0], bd[1], bd[2], bd[3], bd[4], bd[5]);
+
+ return buf;
+}
=20
/****************** END OF FILE debug.c **********************************=
***/
|
|
From: Peter K. <pk...@us...> - 2001-05-17 15:16:56
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
btdebug.c 1.19 1.20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Handle message =3D=3D NULL in print_data().
The diff of the modified file(s):
--- btdebug.c 2001/04/12 15:14:06 1.19
+++ btdebug.c 2001/05/17 15:16:55 1.20
@@ -72,6 +72,7 @@
{
s32 len, diff;
struct timeval tv;=20=20
+
do_gettimeofday(&tv);
=20=09
diff =3D ((tv.tv_sec - tv_old.tv_sec)*1000000 + tv.tv_usec) -=20
@@ -95,10 +96,13 @@
print_data(const u8 *message, u8 *buf, s32 len)
{=20
s32 t;
- printk("\n%s (%d)", message, len);
+
+ if (message)
+ printk("\n%s (%d)\n", message, len);
+ printk(" ");
for (t=3D0;t<len;t++)=20
{
- if((t%16)=3D=3D0)
+ if (!((t+1) % 16))
printk("\n ");
printk("0x%02x ", buf[t]);
}
@@ -117,11 +121,14 @@
print_data(const u8 *message, u8 *buf, s32 len)
{=20
s32 t;
- printf("\n%s (%d)", message, len);
+
+ if (message)
+ printf("\n%s (%d)\n", message, len);
+ printf(" ");
for (t=3D0;t<len;t++)=20
{
- if((t%16)=3D=3D0)
- printk("\n ");
+ if(!((t+1) % 16))
+ printf("\n ");
printf("0x%02x ", buf[t]);
}
printf("\n");
|
|
From: Peter K. <pk...@us...> - 2001-05-23 15:10:48
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
btdebug.c 1.20 1.21=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Corrected print_data() to not write lines loger than 80 characters.
* Only need one version of print_data() (printk is defined to printf
in btdebug.h for user mode).
The diff of the modified file(s):
--- btdebug.c 2001/05/17 15:16:55 1.20
+++ btdebug.c 2001/05/23 15:10:48 1.21
@@ -92,48 +92,32 @@
return buf;
}
=20
-void=20
-print_data(const u8 *message, u8 *buf, s32 len)
-{=20
- s32 t;
-
- if (message)
- printk("\n%s (%d)\n", message, len);
- printk(" ");
- for (t =3D 0; t < len; t++)
- {
- if (!((t+1) % 16))
- printk("\n ");
- printk("0x%02x ", buf[t]);
- }
- printk("\n");
-}
-
#else
+
/* No timestamps in usermode yet */
char* print_time(int use_stdout)
{
printf("No timestamps in usermode stack yet\n");
return "No timestamps in usermode stack yet\n";
}
+#endif
=20
void=20
print_data(const u8 *message, u8 *buf, s32 len)
{=20
- s32 t;
+ s32 t =3D 0;
=20
if (message)
- printf("\n%s (%d)\n", message, len);
- printf(" ");
- for (t =3D 0; t < len; t++)
+ printk("\n%s (%d):\n", message, len);
+ while (t < len)
{
- if(!((t+1) % 16))
- printf("\n ");
- printf("0x%02x ", buf[t]);
+ printk("0x%02x ", buf[t++]);
+ if (!(t % 16))
+ printk("\n");
}
- printf("\n");
+ if (t % 16)
+ printk("\n");
}
-#endif
=20
const char* bd2str(const unsigned char *bd)
{
|
|
From: Mattias A. <mat...@us...> - 2001-06-06 14:57:20
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
btdebug.c 1.21 1.22=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Corrected format
* Added timestamp printing in print_data if enabled
The diff of the modified file(s):
--- btdebug.c 2001/05/23 15:10:48 1.21
+++ btdebug.c 2001/06/06 14:57:19 1.22
@@ -79,12 +79,12 @@
tv_old.tv_usec;
=20=09
if (use_stdout =3D=3D 1) {
- printk("[%03d,%08d|%06d] ",=20
+ printk("[%03d,%06d<%06d>] ",=20
(int)tv.tv_sec, (int)tv.tv_usec, diff);
}
else
{
- len =3D sprintf(buf, "[%03d,%08d|%06d] ",=20
+ len =3D sprintf(buf, "[%03d,%06d<%06d>] ",=20
(int)tv.tv_sec, tv.tv_usec, diff);
buf[len] =3D 0;
}
@@ -107,8 +107,13 @@
{=20
s32 t =3D 0;
=20
+#if BT_USE_TIMESTAMPS
if (message)
+ printk("\n%s %s (%d):\n", print_time(0), message, len);
+#else
+ if (message)
printk("\n%s (%d):\n", message, len);
+#endif
while (t < len)
{
printk("0x%02x ", buf[t++]);
|
|
From: Fredrik S. <fre...@us...> - 2001-12-21 12:17:09
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
btdebug.c 1.23 1.24=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Fixed ifdef for BT_USE_TIMESTAMPS
The diff of the modified file(s):
--- btdebug.c 2001/11/15 11:18:00 1.23
+++ btdebug.c 2001/12/21 12:17:08 1.24
@@ -66,7 +66,7 @@
u8*
bt_log_time(void)
{
-#if defined(__KERNEL__) && defined(BT_USE_TIMESTAMPS)
+#if defined(__KERNEL__) && BT_USE_TIMESTAMPS
s32 diff;
struct timeval tv;=20=20
static struct timeval tv_old =3D {0, 0};
|