hciattach patch: make the device string longer
Hi people,
For our port on the HP Ipaq 1940, we want to use Bluez as the bluetooth library.
Our work is mostly based at handhelds.org, we want to have the Familiar distribution on our devices too.
We were having some problems with hciattach not working as it should, and finally pinpointed it on one specific line.
At the top of main() in hciattach.c, the device node is put in a variable 'dev', which is only 20 bytes long. The problem is that our device is (with null-termination character) exactly 21 bytes long. So that's why I propose the patch at the bottom of this mail, it's actually a 1-character patch.
Excuse me if I break into existing conversations, or this has already been fixed in CVS. (I only checked the latest release)
Thanks in advance for your comments!
Regards, Arjan Schrijver
hciattach.c 2005-12-02 10:52:17.000000000 +0100 renamed from hciattach.c.old 2005-12-02 10:51:22.000000000 +0100 +1 -1
@@ -968,7 +968,7 @@ int send_break = 0; pid_t pid; struct sigaction sa; - char dev[20]; + char dev[25]; detach = 1; printpid = 0;
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Marcel Holtmann
maintainerHi Arjan,
Quoted 6 lines
For our port on the HP Ipaq 1940, we want to use Bluez as the bluetooth library.
Our work is mostly based at handhelds.org, we want to have the Familiar distribution on our devices too.
We were having some problems with hciattach not working as it should, and finally pinpointed it on one specific line.
Quoted 8 lines
At the top of
main()inhciattach.c, the device node is put in a variable 'dev', which is only 20 bytes long. The problem is that our device is (with null-termination character) exactly 21 bytes long. So that's why I propose the patch at the bottom of this mail, it's actually a 1-character patch.
Excuse me if I break into existing conversations, or this has already been fixed in CVS. (I only checked the latest release) Thanks in advance for your comments!
I don't get why a device node name is longer than 20 characters, but I fixed it in the CVS. However I preferred to use PATH_MAX instead of only 30 bytes.
Regards
Marcel
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Quoted 4 lines · Marcel Holtmann
I don't get why a device node name is longer than 20 characters, but I fixed it in the CVS. However I preferred to use
PATH_MAXinstead of only 30 bytes.
In order to comply with some sort of guideline (I'm not the driver programmer), we had to switch to /dev/s3c2410_serial0 as device. As you can see it makes exactly 20 characters, but 21 including the \0.
Anyway, thanks for fixing!
Arjan
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel