summaryrefslogtreecommitdiff
path: root/easytool
diff options
context:
space:
mode:
Diffstat (limited to 'easytool')
-rw-r--r--easytool/easytool.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/easytool/easytool.c b/easytool/easytool.c
index 8ab2262..b2436c6 100644
--- a/easytool/easytool.c
+++ b/easytool/easytool.c
@@ -91,7 +91,8 @@ static void parse_acc_bits(struct acc_bits_parsed *abp, uint8_t *acc_bits)
/* storage of a transaction log record on the transponder itself */
struct easy_log_rec {
- uint8_t unknown[2];
+ uint8_t trans_id;
+ uint8_t unknown;
uint8_t timestamp[3]; /* seconds since January 1st 1970 / 256 */
uint8_t trans_type;
uint16_t amount; /* transaction amount / value */
@@ -111,9 +112,9 @@ static void dump_easy_log(const struct easy_log_rec *elr)
{
time_t t_time = convert_timestamp(elr->timestamp);
struct tm *t_tm = gmtime(&t_time);
- printf("%4u-%02u-%02u %02u:%02u | %10s | Paid %4u NTD | %4u NTD remaining\n",
+ printf("%4u-%02u-%02u %02u:%02u | %02x | %10s | Paid %4u NTD | %4u NTD remaining\n",
t_tm->tm_year+1900, t_tm->tm_mon+1, t_tm->tm_mday,
- t_tm->tm_hour, t_tm->tm_min,
+ t_tm->tm_hour, t_tm->tm_min, elr->trans_id,
get_value_string(easy_tt_names, elr->trans_type),
elr->amount, elr->remaining);
switch (elr->trans_type) {
personal git repositories of Harald Welte. Your mileage may vary