All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: David Miller <davem@davemloft.net>
Cc: bluez-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [Bluez-devel] [PATCH]bluetooth: hci_sysfs connection bus_id add support for	diffrent hci device
Date: Wed, 31 Oct 2007 08:56:49 +0100	[thread overview]
Message-ID: <1193817409.32459.10.camel@violet> (raw)
In-Reply-To: <20071031.000141.241824894.davem@davemloft.net>

Hi Dave,

> > diff -upr linux/net/bluetooth/hci_sysfs.c linux.new/net/bluetooth/hci_sysfs.c
> > --- linux/net/bluetooth/hci_sysfs.c	2007-10-31 10:21:00.000000000 +0800
> > +++ linux.new/net/bluetooth/hci_sysfs.c	2007-10-31 10:21:55.000000000 +0800
> > @@ -302,7 +302,8 @@ void hci_conn_add_sysfs(struct hci_conn 
> >  	conn->dev.release = bt_release;
> >  
> >  	snprintf(conn->dev.bus_id, BUS_ID_SIZE,
> > -			"%s%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X",
> > +			"%s%s%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X",
> > +			hdev->name,
> >  			conn->type == ACL_LINK ? "acl" : "sco",
> >  			ba->b[5], ba->b[4], ba->b[3],
> >  			ba->b[2], ba->b[1], ba->b[0]);
> 
> This might not work.
> 
> Your device's name is already 15 characters long,
> BUS_ID_SIZE is 20, and it seems hdev->name could
> easily overflow the 4 or 5 characters of space
> remaining.

and should also be not needed since their parents are different. However
we had to add the connections to a bus. Otherwise the userspace will
never see them. I have to think about the right solution for this
problem.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

WARNING: multiple messages have this Message-ID (diff)
From: Marcel Holtmann <marcel@holtmann.org>
To: David Miller <davem@davemloft.net>
Cc: hidave.darkstar@gmail.com, linux-kernel@vger.kernel.org,
	bluez-devel@lists.sourceforge.net
Subject: Re: [PATCH]bluetooth: hci_sysfs connection bus_id add support for diffrent hci device
Date: Wed, 31 Oct 2007 08:56:49 +0100	[thread overview]
Message-ID: <1193817409.32459.10.camel@violet> (raw)
In-Reply-To: <20071031.000141.241824894.davem@davemloft.net>

Hi Dave,

> > diff -upr linux/net/bluetooth/hci_sysfs.c linux.new/net/bluetooth/hci_sysfs.c
> > --- linux/net/bluetooth/hci_sysfs.c	2007-10-31 10:21:00.000000000 +0800
> > +++ linux.new/net/bluetooth/hci_sysfs.c	2007-10-31 10:21:55.000000000 +0800
> > @@ -302,7 +302,8 @@ void hci_conn_add_sysfs(struct hci_conn 
> >  	conn->dev.release = bt_release;
> >  
> >  	snprintf(conn->dev.bus_id, BUS_ID_SIZE,
> > -			"%s%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X",
> > +			"%s%s%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X",
> > +			hdev->name,
> >  			conn->type == ACL_LINK ? "acl" : "sco",
> >  			ba->b[5], ba->b[4], ba->b[3],
> >  			ba->b[2], ba->b[1], ba->b[0]);
> 
> This might not work.
> 
> Your device's name is already 15 characters long,
> BUS_ID_SIZE is 20, and it seems hdev->name could
> easily overflow the 4 or 5 characters of space
> remaining.

and should also be not needed since their parents are different. However
we had to add the connections to a bus. Otherwise the userspace will
never see them. I have to think about the right solution for this
problem.

Regards

Marcel



  reply	other threads:[~2007-10-31  7:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-31  2:30 [PATCH]bluetooth: hci_sysfs connection bus_id add support for diffrent hci device Dave Young
2007-10-31  7:01 ` David Miller
2007-10-31  7:56   ` Marcel Holtmann [this message]
2007-10-31  7:56     ` Marcel Holtmann
2007-10-31  9:13     ` Dave Young
2007-10-31  9:59       ` [Bluez-devel] " Marcel Holtmann
2007-10-31  9:59         ` Marcel Holtmann
2007-11-01  1:05         ` Dave Young
2007-11-01  2:20           ` Dave Young
2007-11-01  4:56             ` [Bluez-devel] " Marcel Holtmann
2007-11-01  4:56               ` Marcel Holtmann
2007-10-31  9:06   ` Dave Young

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1193817409.32459.10.camel@violet \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.