Lines Matching refs:nr_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()
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()
448 ++*nr_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()
701 size_t nr_opts = 0; 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()
802 size_t nr_opts = 0; 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()
922 size_t nr_opts = 0; 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()
1064 size_t nr_opts = 0; 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()