[Pkg-bluetooth-maintainers] Bug#322732: more on this bug (was: rfcomm bind fails with obscure error message)

Filippo Giunchedi filippo at debian.org
Fri May 19 20:48:15 UTC 2006


tags 322732 + upstream
thanks

> Hello
> 
> When the 'rfcomm' kernel module isn't compiled with CONFIG_BT_RFCOMM_TTY
> enabled, 'rfcomm bind' will fail with an obscure error message, "Can't
> create device: Operation not supported".  It does this when it's trying to
> bind to a device in /dev.
> 
> Could this be changed to report something more useful, such as "Check
> rfcomm.ko is compiled with TTY support"?

Hi,
I agree with this bug and the ioctl is mostly likely to fail when there is no
rfcomm tty support, here is my proposed patch:

--- rfcomm/main.c       (revision 154)
+++ rfcomm/main.c       (working copy)
@@ -172,8 +172,10 @@
                        req.channel = 1;
        }

-       if ((err = ioctl(ctl, RFCOMMCREATEDEV, &req)) < 0 )
+       if ((err = ioctl(ctl, RFCOMMCREATEDEV, &req)) < 0 ){
                perror("Can't create device");
+               fprintf(stderr, "Check RFCOMM TTY availabily");
+    }

        return err;
 }

comments? 

thanks,
filippo
--
Filippo Giunchedi - http://esaurito.net
PGP key: 0x6B79D401
random quote follows:

What a strange illusion it is to suppose that beauty is goodness.
-- Lev Tolstoj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-bluetooth-maintainers/attachments/20060519/46cdf25d/attachment.pgp


More information about the Pkg-bluetooth-maintainers mailing list