| 1349 | } |
| 1350 | |
| 1351 | static int cbfs_add(void) |
| 1352 | { |
| 1353 | convert_buffer_t convert = cbfstool_convert_raw; |
| 1354 | |
| 1355 | if (param.type == CBFS_TYPE_FSP) { |
| 1356 | convert = cbfstool_convert_fsp; |
| 1357 | } else if (param.type == CBFS_TYPE_STAGE) { |
| 1358 | ERROR("stages can only be added with cbfstool add-stage\n"); |
| 1359 | return 1; |
| 1360 | } else if (param.stage_xip) { |
| 1361 | ERROR("cbfstool add supports xip only for FSP component type\n"); |
| 1362 | return 1; |
| 1363 | } |
| 1364 | |
| 1365 | return cbfs_add_component(param.filename, |
| 1366 | param.name, |
| 1367 | param.headeroffset, |
| 1368 | convert); |
| 1369 | } |
| 1370 | |
| 1371 | static int cbfs_add_stage(void) |
| 1372 | { |
nothing calls this directly
no test coverage detected