src/mess/tools/messtest/testimgt.c
| r2635 | r2636 | |
| 10 | 10 | #include "../imgtool/imgtool.h" |
| 11 | 11 | #include "../imgtool/modules.h" |
| 12 | 12 | |
| 13 | |
| 14 | |
| 15 | /*************************************************************************** |
| 16 | PARAMETERS |
| 17 | ***************************************************************************/ |
| 18 | |
| 13 | 19 | #define VERBOSE_FILECHAIN 0 |
| 14 | 20 | |
| 15 | | struct expected_dirent |
| 21 | |
| 22 | |
| 23 | /*************************************************************************** |
| 24 | TYPE DEFINITIONS |
| 25 | ***************************************************************************/ |
| 26 | |
| 27 | typedef struct _expected_dirent expected_dirent; |
| 28 | struct _expected_dirent |
| 16 | 29 | { |
| 17 | 30 | const char *filename; |
| 18 | 31 | int size; |
| 19 | 32 | }; |
| 20 | 33 | |
| 34 | |
| 35 | |
| 36 | /*************************************************************************** |
| 37 | IMPLEMENTATION |
| 38 | ***************************************************************************/ |
| 39 | |
| 21 | 40 | static const char *tempfile_name(void) |
| 22 | 41 | { |
| 23 | 42 | static char buffer[256]; |
| r2635 | r2636 | |
| 202 | 221 | if (VERBOSE_FILECHAIN) |
| 203 | 222 | { |
| 204 | 223 | char buf[1024]; |
| 205 | | err = imgtool_partition_get_chain_string(state->partition, filename, buf, sizeof(buf) / sizeof(buf[0])); |
| 224 | err = imgtool_partition_get_chain_string(state->partition, filename, buf, ARRAY_LENGTH(buf)); |
| 206 | 225 | if (err == IMGTOOLERR_SUCCESS) |
| 207 | 226 | report_message(MSG_INFO, "Filechain '%s': %s", filename, buf); |
| 208 | 227 | } |
| r2635 | r2636 | |
| 286 | 305 | xml_attribute_node *attr_node; |
| 287 | 306 | xml_data_node *child_node; |
| 288 | 307 | const char *filename; |
| 289 | | struct expected_dirent *entry; |
| 290 | | struct expected_dirent entries[256]; |
| 308 | expected_dirent *entry; |
| 309 | expected_dirent entries[256]; |
| 291 | 310 | int entry_count; |
| 292 | 311 | |
| 293 | 312 | if (!state->partition) |