| 2450 | void *opaque); |
| 2451 | |
| 2452 | static int parse_hex_buf(uint8_t *buf, int buf_size, const char **pp) |
| 2453 | { |
| 2454 | char buf1[1024]; |
| 2455 | int len; |
| 2456 | |
| 2457 | if (parse_fname(buf1, sizeof(buf1), pp) < 0) |
| 2458 | return -1; |
| 2459 | len = strlen(buf1); |
| 2460 | if ((len & 1) != 0) |
| 2461 | return -1; |
| 2462 | len >>= 1; |
| 2463 | if (len > buf_size) |
| 2464 | return -1; |
| 2465 | if (decode_hex(buf, buf1, len) < 0) |
| 2466 | return -1; |
| 2467 | return len; |
| 2468 | } |
| 2469 | |
| 2470 | static int fs_cmd_xhr(FSDevice *fs, FSFile *f, |
| 2471 | const char *p, uint32_t uid, uint32_t gid) |
no test coverage detected