Lines Matching refs:opts
438 static struct option *add_opt(struct option *opts, size_t *nr_opts, in add_opt() argument
441 opts = realloc(opts, (*nr_opts + 1) * sizeof(*opts)); in add_opt()
442 if (opts == NULL) in add_opt()
444 opts[*nr_opts].name = name; in add_opt()
445 opts[*nr_opts].has_arg = has_arg; in add_opt()
446 opts[*nr_opts].flag = NULL; in add_opt()
447 opts[*nr_opts].val = val; in add_opt()
449 return opts; in add_opt()
452 static struct option *fill_common_opts(struct option *opts, size_t *nr_opts, in fill_common_opts() argument
458 opts = add_opt(opts, nr_opts, desc->cmdline_name, has_arg, in fill_common_opts()
460 return opts; in fill_common_opts()
700 struct option *opts = NULL; in create_cmd() local
708 opts = fill_common_opts(opts, &nr_opts, required_argument); in create_cmd()
709 opts = add_opt(opts, &nr_opts, "plat-toc-flags", required_argument, in create_cmd()
711 opts = add_opt(opts, &nr_opts, "align", required_argument, OPT_ALIGN); in create_cmd()
712 opts = add_opt(opts, &nr_opts, "blob", required_argument, 'b'); in create_cmd()
713 opts = add_opt(opts, &nr_opts, NULL, 0, 0); in create_cmd()
718 c = getopt_long(argc, argv, "b:", opts, &opt_index); in create_cmd()
726 desc = lookup_image_desc_from_opt(opts[opt_index].name); in create_cmd()
764 free(opts); in create_cmd()
801 struct option *opts = NULL; in update_cmd() local
812 opts = fill_common_opts(opts, &nr_opts, required_argument); in update_cmd()
813 opts = add_opt(opts, &nr_opts, "align", required_argument, OPT_ALIGN); in update_cmd()
814 opts = add_opt(opts, &nr_opts, "blob", required_argument, 'b'); in update_cmd()
815 opts = add_opt(opts, &nr_opts, "out", required_argument, 'o'); in update_cmd()
816 opts = add_opt(opts, &nr_opts, "plat-toc-flags", required_argument, in update_cmd()
818 opts = add_opt(opts, &nr_opts, NULL, 0, 0); in update_cmd()
823 c = getopt_long(argc, argv, "b:o:", opts, &opt_index); in update_cmd()
831 desc = lookup_image_desc_from_opt(opts[opt_index].name); in update_cmd()
873 free(opts); in update_cmd()
921 struct option *opts = NULL; in unpack_cmd() local
931 opts = fill_common_opts(opts, &nr_opts, required_argument); in unpack_cmd()
932 opts = add_opt(opts, &nr_opts, "blob", required_argument, 'b'); in unpack_cmd()
933 opts = add_opt(opts, &nr_opts, "force", no_argument, 'f'); in unpack_cmd()
934 opts = add_opt(opts, &nr_opts, "out", required_argument, 'o'); in unpack_cmd()
935 opts = add_opt(opts, &nr_opts, NULL, 0, 0); in unpack_cmd()
940 c = getopt_long(argc, argv, "b:fo:", opts, &opt_index); in unpack_cmd()
948 desc = lookup_image_desc_from_opt(opts[opt_index].name); in unpack_cmd()
988 free(opts); in unpack_cmd()
1063 struct option *opts = NULL; in remove_cmd() local
1074 opts = fill_common_opts(opts, &nr_opts, no_argument); in remove_cmd()
1075 opts = add_opt(opts, &nr_opts, "align", required_argument, OPT_ALIGN); in remove_cmd()
1076 opts = add_opt(opts, &nr_opts, "blob", required_argument, 'b'); in remove_cmd()
1077 opts = add_opt(opts, &nr_opts, "force", no_argument, 'f'); in remove_cmd()
1078 opts = add_opt(opts, &nr_opts, "out", required_argument, 'o'); in remove_cmd()
1079 opts = add_opt(opts, &nr_opts, NULL, 0, 0); in remove_cmd()
1084 c = getopt_long(argc, argv, "b:fo:", opts, &opt_index); in remove_cmd()
1092 desc = lookup_image_desc_from_opt(opts[opt_index].name); in remove_cmd()
1131 free(opts); in remove_cmd()
1248 static struct option opts[] = { in main() local
1257 c = getopt_long(argc, argv, "+v", opts, &opt_index); in main()