From 4a15097d15d566829fd4c37d586dd1fa61affea1 Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Fri, 18 May 2012 16:26:37 +0000 Subject: [PATCH] Update mifare_desfire_write_data() and mifare_desfire_write_data_ex() prototypes so that the data buffer is constant --- libfreefare/freefare.h | 4 ++-- libfreefare/mifare_desfire.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libfreefare/freefare.h b/libfreefare/freefare.h index 5083e21..23b66df 100644 --- a/libfreefare/freefare.h +++ b/libfreefare/freefare.h @@ -370,8 +370,8 @@ int mifare_desfire_delete_file (MifareTag tag, uint8_t file_no); ssize_t mifare_desfire_read_data (MifareTag tag, uint8_t file_no, off_t offset, size_t length, void *data); ssize_t mifare_desfire_read_data_ex (MifareTag tag, uint8_t file_no, off_t offset, size_t length, void *data, int cs); -ssize_t mifare_desfire_write_data (MifareTag tag, uint8_t file_no, off_t offset, size_t length, void *data); -ssize_t mifare_desfire_write_data_ex (MifareTag tag, uint8_t file_no, off_t offset, size_t length, void *data, int cs); +ssize_t mifare_desfire_write_data (MifareTag tag, uint8_t file_no, off_t offset, size_t length, const void *data); +ssize_t mifare_desfire_write_data_ex (MifareTag tag, uint8_t file_no, off_t offset, size_t length, const void *data, int cs); int mifare_desfire_get_value (MifareTag tag, uint8_t file_no, int32_t *value); int mifare_desfire_get_value_ex (MifareTag tag, uint8_t file_no, int32_t *value, int cs); int mifare_desfire_credit (MifareTag tag, uint8_t file_no, int32_t amount); diff --git a/libfreefare/mifare_desfire.c b/libfreefare/mifare_desfire.c index f4cc537..24c5df0 100644 --- a/libfreefare/mifare_desfire.c +++ b/libfreefare/mifare_desfire.c @@ -1626,13 +1626,13 @@ write_data (MifareTag tag, uint8_t command, uint8_t file_no, off_t offset, size_ } ssize_t -mifare_desfire_write_data (MifareTag tag, uint8_t file_no, off_t offset, size_t length, void *data) +mifare_desfire_write_data (MifareTag tag, uint8_t file_no, off_t offset, size_t length, const void *data) { return mifare_desfire_write_data_ex (tag, file_no, offset, length, data, madame_soleil_get_write_communication_settings (tag, file_no)); } ssize_t -mifare_desfire_write_data_ex (MifareTag tag, uint8_t file_no, off_t offset, size_t length, void *data, int cs) +mifare_desfire_write_data_ex (MifareTag tag, uint8_t file_no, off_t offset, size_t length, const void *data, int cs) { return write_data (tag, 0x3D, file_no, offset, length, data, cs); }