projects
/
librfid
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
disable debug in the default compile (Uwe Hermann)
[librfid]
/
src
/
rfid.c
diff --git
a/src/rfid.c
b/src/rfid.c
index
9df85a0
..
fb5b9c3
100644
(file)
--- a/
src/rfid.c
+++ b/
src/rfid.c
@@
-12,7
+12,7
@@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
* 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., 5
9 Temple Place, Suite 330, Boston, MA 02111-1307
USA
+ * Foundation, Inc., 5
1 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA
*/
#include <stdio.h>
#include <string.h>
*/
#include <stdio.h>
#include <string.h>
@@
-33,7
+33,6
@@
struct rfid_reader_handle rfid_rh;
#endif
#ifndef LIBRFID_FIRMWARE
#endif
#ifndef LIBRFID_FIRMWARE
-#ifdef LIBRFID_DEBUG
const char *
rfid_hexdump(const void *data, unsigned int len)
{
const char *
rfid_hexdump(const void *data, unsigned int len)
{
@@
-50,7
+49,6
@@
rfid_hexdump(const void *data, unsigned int len)
}
return string;
}
}
return string;
}
-#endif/*LIBRFID_DEBUG*/
#else
#define rfid_hexdump(x, y) hexdump(x, y)
#endif
#else
#define rfid_hexdump(x, y) hexdump(x, y)
#endif
@@
-61,9
+59,8
@@
int rfid_setopt(struct rfid_handle *rh, unsigned int level,
const void *opt, unsigned int *optlen)
{
switch (level) {
const void *opt, unsigned int *optlen)
{
switch (level) {
- case RFID_LEVEL_ASIC:
case RFID_LEVEL_READER:
case RFID_LEVEL_READER:
- return
-EINVAL
;
+ return
rfid_reader_setopt(optname, opt, optlen)
;
break;
case RFID_LEVEL_LAYER2:
return rfid_layer2_setopt(optname, opt, optlen);
break;
case RFID_LEVEL_LAYER2:
return rfid_layer2_setopt(optname, opt, optlen);
@@
-71,6
+68,7
@@
int rfid_setopt(struct rfid_handle *rh, unsigned int level,
case RFID_LEVEL_LAYER3:
return rfid_layer3_setopt(optname, opt, optlen);
break;
case RFID_LEVEL_LAYER3:
return rfid_layer3_setopt(optname, opt, optlen);
break;
+ case RFID_LEVEL_ASIC:
default:
return -EINVAL;
break;
default:
return -EINVAL;
break;
@@
-84,9
+82,8
@@
int rfid_getopt(struct rfid_handle *rh, unsigned int level,
void *opt, unsigned int *optlen)
{
switch (level) {
void *opt, unsigned int *optlen)
{
switch (level) {
- case RFID_LEVEL_ASIC:
case RFID_LEVEL_READER:
case RFID_LEVEL_READER:
- return
-EINVAL
;
+ return
rfid_reader_getopt(optname, opt, optlen)
;
break;
case RFID_LEVEL_LAYER2:
return rfid_layer2_getopt(optname, opt, optlen);
break;
case RFID_LEVEL_LAYER2:
return rfid_layer2_getopt(optname, opt, optlen);
@@
-94,6
+91,7
@@
int rfid_getopt(struct rfid_handle *rh, unsigned int level,
case RFID_LEVEL_LAYER3:
return rfid_layer3_getopt(optname, opt, optlen);
break;
case RFID_LEVEL_LAYER3:
return rfid_layer3_getopt(optname, opt, optlen);
break;
+ case RFID_LEVEL_ASIC:
default:
return -EINVAL;
break;
default:
return -EINVAL;
break;