* [Bluez-devel] more on this bug (was: rfcomm bind fails with obscure error message)
@ 2006-05-19 20:48 Filippo Giunchedi
2006-05-29 13:16 ` [Pkg-bluetooth-maintainers] Bug#322732: " Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: Filippo Giunchedi @ 2006-05-19 20:48 UTC (permalink / raw)
To: 322732, 322732-submitter; +Cc: bluez-devel, control
[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]
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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Pkg-bluetooth-maintainers] Bug#322732: [Bluez-devel] more on this bug (was: rfcomm bind fails with obscure error message)
2006-05-19 20:48 [Bluez-devel] more on this bug (was: rfcomm bind fails with obscure error message) Filippo Giunchedi
@ 2006-05-29 13:16 ` Marcel Holtmann
2006-06-04 15:15 ` Bug#322732: " Filippo Giunchedi
0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2006-05-29 13:16 UTC (permalink / raw)
To: bluez-devel; +Cc: 322732-submitter, 322732, bluez-devel, control
Hi Filippo,
> > 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?
check for EOPNOTSUPP error code and only then print this error.
Regards
Marcel
_______________________________________________
Pkg-bluetooth-maintainers mailing list
Pkg-bluetooth-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-bluetooth-maintainers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Bug#322732: [Pkg-bluetooth-maintainers] Bug#322732: [Bluez-devel] more on this bug (was: rfcomm bind fails with obscure error message)
2006-05-29 13:16 ` [Pkg-bluetooth-maintainers] Bug#322732: " Marcel Holtmann
@ 2006-06-04 15:15 ` Filippo Giunchedi
2006-06-04 15:46 ` Bug#322732: [Bluez-devel] [Pkg-bluetooth-maintainers] Bug#322732: " Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: Filippo Giunchedi @ 2006-06-04 15:15 UTC (permalink / raw)
To: 322732; +Cc: 322732-submitter, bluez-devel
[-- Attachment #1.1.1: Type: text/plain, Size: 381 bytes --]
On Mon, May 29, 2006 at 03:16:21PM +0200, Marcel Holtmann wrote:
> > comments?
>
> check for EOPNOTSUPP error code and only then print this error.
allright, I fixed this with the attached patch
thanks,
filippo
--
Filippo Giunchedi - http://esaurito.net
PGP key: 0x6B79D401
random quote follows:
Either this man is dead or my watch has stopped.
-- Groucho Marx
[-- Attachment #1.1.2: 010_rfcomm_tty.patch --]
[-- Type: text/plain, Size: 426 bytes --]
--- rfcomm/main.c (revision 154)
+++ rfcomm/main.c (working copy)
@@ -172,8 +172,12 @@
req.channel = 1;
}
- if ((err = ioctl(ctl, RFCOMMCREATEDEV, &req)) < 0 )
- perror("Can't create device");
+ if ((err = ioctl(ctl, RFCOMMCREATEDEV, &req)) < 0 ) {
+ if (err == EOPNOTSUPP)
+ fprintf(stderr, "RFCOMM TTY support not available\n");
+ else
+ perror("Can't create device");
+ }
return err;
}
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 211 bytes --]
_______________________________________________
Pkg-bluetooth-maintainers mailing list
Pkg-bluetooth-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-bluetooth-maintainers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Bug#322732: [Bluez-devel] [Pkg-bluetooth-maintainers] Bug#322732: more on this bug (was: rfcomm bind fails with obscure error message)
2006-06-04 15:15 ` Bug#322732: " Filippo Giunchedi
@ 2006-06-04 15:46 ` Marcel Holtmann
0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2006-06-04 15:46 UTC (permalink / raw)
To: BlueZ development; +Cc: 322732-submitter, 322732
Hi Filippo,
> > > comments?
> >
> > check for EOPNOTSUPP error code and only then print this error.
>
> allright, I fixed this with the attached patch
the patch has been applied to the CVS now. Thanks.
Regards
Marcel
_______________________________________________
Pkg-bluetooth-maintainers mailing list
Pkg-bluetooth-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-bluetooth-maintainers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-06-04 15:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-19 20:48 [Bluez-devel] more on this bug (was: rfcomm bind fails with obscure error message) Filippo Giunchedi
2006-05-29 13:16 ` [Pkg-bluetooth-maintainers] Bug#322732: " Marcel Holtmann
2006-06-04 15:15 ` Bug#322732: " Filippo Giunchedi
2006-06-04 15:46 ` Bug#322732: [Bluez-devel] [Pkg-bluetooth-maintainers] Bug#322732: " Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).