Re: [PATCH]bluetooth: hci_sysfs connection bus_id add support fordiffrent hci device

From: Marcel Holtmann
Date: Thu Nov 01 2007 - 00:57:19 EST


Hi Dave,

> > > Maybe we can use this instead:
> > > > 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 + 3,
> > > > conn->type == ACL_LINK ? "acl" : "sco",
> > > > ba->b[5], ba->b[4], ba->b[3],
> > > > ba->b[2], ba->b[1], ba->b[0]);
> > >
> > > I had a look on how other subsystems handle this case and yes, they
> > > duplicate the id number from its parent device. So I applied the
> > > attached patch to my tree.
>
> Sorry for my noise.
> Theoretically, for the "%d-%s" version, overwrite is also possible.
>
> hdev->id is u16, imagine the id is 65535, then total length is 21.

even to reach 3 digits you have to attach 100 Bluetooth devices at the
same time. Tell me when you have done that ;)

However, as I said, we have to move to using the connection handle.

Regards

Marcel


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/