|
From: Peter K. <pk...@us...> - 2001-10-04 13:09:47
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bt_misc.c 1.17 1.18=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Do not fail if TIOCGSERIAL ioctl does not work.
The diff of the modified file(s):
--- bt_misc.c 2001/10/04 10:04:07 1.17
+++ bt_misc.c 2001/10/04 13:09:46 1.18
@@ -334,6 +334,7 @@
unsigned long baudbase =3D atol(speedstr);
unsigned long speed =3D baudbase;
struct serial_struct serial;
+ int got_serial =3D 0;
=20
if (fd < 0)
{
@@ -357,11 +358,9 @@
exit(1);
}
=20
- if (ioctl(fd, TIOCGSERIAL, &serial))
+ if (ioctl(fd, TIOCGSERIAL, &serial) >=3D 0)
{
- perror("Error getting serial_struct with TIOCGSERIAL");
- exit(1);
- }
+ got_serial =3D 1;
=20=20=20=20=20
if (divisor)
{
@@ -375,6 +374,7 @@
/* Remove special baudrate */=20
serial.flags &=3D ~ASYNC_SPD_CUST;
}
+ }
=20=20=20=20=20
cfmakeraw(&t);
=20=09
@@ -403,7 +403,7 @@
exit(1);
}
=20
- if (ioctl(fd, TIOCSSERIAL, &serial))
+ if (got_serial && ioctl(fd, TIOCSSERIAL, &serial) < 0)
{
perror("Error setting serial_struct with TIOCSSERIAL");
}
|