|
From: Peter K. <pk...@us...> - 2001-05-14 11:47:46
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bt_if.c 1.14 1.15=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Use bt_openctrl() to open the control device.
The diff of the modified file(s):
--- bt_if.c 2001/05/14 11:09:22 1.14
+++ bt_if.c 2001/05/14 11:47:45 1.15
@@ -138,7 +138,7 @@
#ifndef BT_USERSTACK
char* bt_hw_vendor(void)
{
- int bt_cfd =3D open(BT_CTRL_TTY, O_RDWR | O_NOCTTY);
+ int bt_cfd =3D bt_openctrl();
static char buffer[20];
=20
if (bt_cfd < 0 || ioctl(bt_cfd, BTHWVENDOR, buffer) < 0)
@@ -157,7 +157,7 @@
int devfd;
=20
printf("Resetting HW board...\n");
- if ((devfd =3D open(BT_CTRL_TTY, O_RDWR | O_NOCTTY)) >=3D 0)
+ if ((devfd =3D bt_openctrl()) >=3D 0)
{
if (ioctl(devfd, BTRESETPHYSICALHW) < 0)
{
@@ -172,7 +172,7 @@
}
else
{
- fprintf(stderr, "ERROR! Failed to open " BT_CTRL_TTY "\n");
+ fprintf(stderr, "ERROR! Failed to open BT control device\n");
}
#else
printf("Please reset HW board within 5 seconds\n");
@@ -183,14 +183,14 @@
int bt_openctrl(void)
{
int bt_cfd;
- D(syslog(LOG_INFO, "Now opening BT Ctrl TTY [%s]\n", BT_CTRL_TTY));
+ D(syslog(LOG_INFO, "Now opening BT Ctrl TTY [" BT_CTRL_TTY "]"));
#ifdef BT_USERSTACK
printf(__FUNCTION__ ": ignored in userstack\n");
return FD_BTUSERCTRL;
#else=20
if ((bt_cfd =3D open(BT_CTRL_TTY, O_RDWR | O_NOCTTY)) < 0)
{
- fprintf(stderr, "could not open %s\n", BT_CTRL_TTY);
+ fprintf(stderr, "Could not open " BT_CTRL_TTY "\n");
exit(1);
}
#endif
|