| 1423 | } |
| 1424 | |
| 1425 | static int cbfs_remove(void) |
| 1426 | { |
| 1427 | if (!param.name) { |
| 1428 | ERROR("You need to specify -n/--name.\n"); |
| 1429 | return 1; |
| 1430 | } |
| 1431 | |
| 1432 | struct cbfs_image image; |
| 1433 | if (cbfs_image_from_buffer(&image, param.image_region, |
| 1434 | param.headeroffset)) |
| 1435 | return 1; |
| 1436 | |
| 1437 | if (cbfs_remove_entry(&image, param.name) != 0) { |
| 1438 | ERROR("Removing file '%s' failed.\n", |
| 1439 | param.name); |
| 1440 | return 1; |
| 1441 | } |
| 1442 | |
| 1443 | return maybe_update_metadata_hash(&image); |
| 1444 | } |
| 1445 | |
| 1446 | static int cbfs_create(void) |
| 1447 | { |
nothing calls this directly
no test coverage detected