Re: [PATCH BlueZ v2 1/2] storage: Store BLE address type in "primary" file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johan,

From: Johan Hedberg <johan.hedberg@xxxxxxxxx>
Date: Tue, 22 May 2012 11:05:36 +0300

> > +	/* New format: address#type */
> > +	ba2str(dba, key);
> > +	sprintf(&key[17], "#%hhu", bdaddr_type);
> 
> Since BlueZ 4.100 will be the first user space version being able to use
> mgmtops with a kernel where mgmt is enabled by default (3.4) I don't
> think we need to worry about old format vs new format, i.e. the code
> comment above is unnecessary.

Ok. When we were implemeting this, our first thought was to just ignore the old
storage formats and then use the new storage one.

So, later we decided to keep backward compatibily with the old storage format
since one might not want to delete his old entries so that the patch wouldn't
work with this new storage format (the old keys would never be found).

I'll remove the comment above. Thanks for pointing it out.

> 
> > +	/* New format: address#type */
> > +	ba2str(dba, key);
> > +	sprintf(&key[17], "#%hhu", bdaddr_type);
> > +
> > +	str = textfile_caseget(filename, key);
> > +	if (str != NULL)
> > +		return str;
> > +
> > +	/* Old format: address only */
> > +	key[17] = '\0';
> > +
> > +	return textfile_caseget(filename, key);
> 
> Same thing here. I think we can leave out any code that tries to work
> with the old storage format since we can consider LE support as
> experimental/unstable in all previous user space releases.

Fair enough. I'll remove the comment above, as well the code that leads with the
old storage format. Thanks again!


		Paulo
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux