static int command_version(int argc, char **argv) { ccprintf("Chip: %s %s %s\n", system_get_chip_vendor(), system_get_chip_name(), system_get_chip_revision()); ccprintf("Board: %d\n", system_get_board_version()); ccprintf("RO: %s\n", system_get_version(SYSTEM_IMAGE_RO)); ccprintf("RW: %s\n", system_get_version(SYSTEM_IMAGE_RW)); ccprintf("Build: %s\n", system_get_build_info()); return EC_SUCCESS; }
static int host_command_get_chip_info(struct host_cmd_handler_args *args) { struct ec_response_get_chip_info *r = args->response; strzcpy(r->vendor, system_get_chip_vendor(), sizeof(r->vendor)); strzcpy(r->name, system_get_chip_name(), sizeof(r->name)); strzcpy(r->revision, system_get_chip_revision(), sizeof(r->revision)); args->response_size = sizeof(*r); return EC_RES_SUCCESS; }