remove autogenerated file
[librfid] / src / rfid_layer2.c
index 2bbd037..4cad6c3 100644 (file)
@@ -14,7 +14,7 @@
  *
  *  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>
@@ -117,6 +117,15 @@ rfid_layer2_setopt(struct rfid_layer2_handle *ph, int optname,
 {
        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;