*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdlib.h>
{
if (optname >> 16 == 0) {
switch (optname) {
+ case RFID_OPT_LAYER2_UID:
+ printf("----> sizeof(ph->uid): %d\n",sizeof(ph->uid));
+ if ((ph->uid_len < sizeof(ph->uid)) && (optlen<=sizeof(ph->uid))) {
+ //(ph->uid_len<optlen)
+ ph->uid_len = optlen;
+ memcpy(ph->uid, optval, optlen);
+ } else
+ return -EINVAL;
+ break;
default:
return -EINVAL;
break;