New API call iso_image_report_system_area()

This commit is contained in:
2014-04-11 15:39:45 +02:00
parent 1ac59bec46
commit dd27f579eb
18 changed files with 2184 additions and 108 deletions

View File

@ -1534,6 +1534,26 @@ uint32_t iso_read_bb(const uint8_t *buf, int bytes, int *error)
return v1;
}
uint64_t iso_read_lsb64(const uint8_t *buf)
{
int i;
uint64_t ret = 0;
for (i=0; i < 8; i++)
ret += ((uint64_t) buf[i]) << (i * 8);
return ret;
}
uint64_t iso_read_msb64(const uint8_t *buf)
{
int i;
uint64_t ret = 0;
for (i=0; i < 8; i++)
ret += ((uint64_t) buf[7 - i]) << (i * 8);
return ret;
}
void iso_datetime_7(unsigned char *buf, time_t t, int always_gmt)
{
static int tzsetup = 0;
@ -2011,6 +2031,17 @@ int iso_util_dec_to_uint32(char *dec, uint32_t *value, int flag)
}
int iso_util_bin_to_hex(char *target, uint8_t *bytes, int num_bytes, int flag)
{
int i;
for (i = 0; i < num_bytes; i++)
sprintf(target + 2 * i, "%-2.2x", bytes[i]);
target[2 * num_bytes] = 0;
return 1;
}
int iso_util_hex_to_bin(char *hex, char *bin, int bin_size, int *bin_count,
int flag)
{