Lines Matching refs:params
120 static int process_command_cfg_create(const struct cfg_create_params *params) { in process_command_cfg_create() argument
125 cfg_fp = fopen(params->cfg_filename, "r"); in process_command_cfg_create()
127 fprintf(stderr, "Can not open config file: %s\n", params->cfg_filename); in process_command_cfg_create()
131 printf("create image file: %s...\n", params->img_filename); in process_command_cfg_create()
133 img_fp = fopen(params->img_filename, "wb"); in process_command_cfg_create()
135 fprintf(stderr, "Can not create file: %s\n", params->img_filename); in process_command_cfg_create()
139 if (params->dtb_dir != NULL) { in process_command_cfg_create()
140 if (chdir(params->dtb_dir) != 0) { in process_command_cfg_create()
141 fprintf(stderr, "Can not switch to directory: %s\n", params->dtb_dir); in process_command_cfg_create()
149 params->cfg_filename); in process_command_cfg_create()
154 if (ret < 0) unlink(params->img_filename); in process_command_cfg_create()
175 struct cfg_create_params params; in handle_command_cfg_create() local
176 memset(¶ms, 0, sizeof(params)); in handle_command_cfg_create()
177 params.img_filename = argv[arg_start]; in handle_command_cfg_create()
178 params.cfg_filename = argv[arg_start + 1]; in handle_command_cfg_create()
188 params.dtb_dir = optarg; in handle_command_cfg_create()
196 return process_command_cfg_create(¶ms); in handle_command_cfg_create()