|
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)
{
|