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
--- 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; }
signature.asc
Description: Digital signature