dpkg 1.22.7-3-g89f48
|
Data Structures | |
struct | cmdinfo |
Macros | |
#define | MAX_CONFIG_LINE 1024 |
#define | ACTION(longopt, shortopt, code, func) { longopt, shortopt, 0, NULL, NULL, setaction, code, NULL, func } |
#define | ACTION_MUX(longopt, shortopt, code, func, strvar) { longopt, shortopt, 2, NULL, strvar, setaction, code, NULL, func } |
#define | OBSOLETE(longopt, shortopt) { longopt, shortopt, 0, NULL, NULL, setobsolete, 0, NULL, NULL } |
Typedefs | |
typedef int | action_func(const char *const *argv) |
Functions | |
void | badusage (const char *fmt,...) DPKG_ATTR_NORET DPKG_ATTR_PRINTF(1) |
void | dpkg_options_load (const char *prog, const struct cmdinfo *cmdinfos) |
void | dpkg_options_parse (const char *const **argvp, const struct cmdinfo *cmdinfos, const char *help_str) |
long | dpkg_options_parse_arg_int (const struct cmdinfo *cmd, const char *str) |
struct pkginfo * | dpkg_options_parse_pkgname (const struct cmdinfo *cmd, const char *name) |
Parse an argument as a package name. | |
void | setaction (const struct cmdinfo *cip, const char *value) |
void | setobsolete (const struct cmdinfo *cip, const char *value) |
void | set_instdir (const struct cmdinfo *cip, const char *value) |
void | set_admindir (const struct cmdinfo *cip, const char *value) |
void | set_root (const struct cmdinfo *cip, const char *value) |
Variables | |
const struct cmdinfo * | cipaction |
Current cmdinfo action. | |
#define ACTION | ( | longopt, | |
shortopt, | |||
code, | |||
func | |||
) | { longopt, shortopt, 0, NULL, NULL, setaction, code, NULL, func } |
#define ACTION_MUX | ( | longopt, | |
shortopt, | |||
code, | |||
func, | |||
strvar | |||
) | { longopt, shortopt, 2, NULL, strvar, setaction, code, NULL, func } |
#define MAX_CONFIG_LINE 1024 |
#define OBSOLETE | ( | longopt, | |
shortopt | |||
) | { longopt, shortopt, 0, NULL, NULL, setobsolete, 0, NULL, NULL } |
typedef int action_func(const char *const *argv) |
void badusage | ( | const char * | fmt, |
... | |||
) |
References args, m_vasprintf(), and ohshit().
Referenced by archivefiles(), assert_feature(), clearselections(), cmpversions(), commandfd(), do_auto(), do_build(), do_contents(), do_control(), do_ctrltarfile(), do_extract(), do_fsystarfile(), do_info(), do_join(), do_queue(), do_raw_extract(), do_split(), dpkg_options_parse(), dpkg_options_parse_arg_int(), dpkg_options_parse_pkgname(), forgetold(), main(), main(), packages(), parse_force(), predeppackage(), print_foreign_arches(), printarch(), setaction(), setselections(), unpackchk(), updateavailable(), validate_archname(), validate_pkgname(), validate_trigname(), and validate_version().
void dpkg_options_load | ( | const char * | prog, |
const struct cmdinfo * | cmdinfos | ||
) |
void dpkg_options_parse | ( | const char *const ** | argvp, |
const struct cmdinfo * | cmdinfos, | ||
const char * | help_str | ||
) |
References _, cmdinfo::arg_int, badusage(), cmdinfo::call, cmdinfo::iassignto, cmdinfo::olong, cmdinfo::oshort, cmdinfo::sassignto, and cmdinfo::takesvalue.
Referenced by commandfd(), and main().
long dpkg_options_parse_arg_int | ( | const struct cmdinfo * | cmd, |
const char * | str | ||
) |
References _, badusage(), cmdinfo::olong, and cmdinfo::oshort.
Referenced by commandfd().
Parse an argument as a package name.
The string is parsed as a singleton package name, and a pkginfo instance is returned.
cmd | The command information structure currently parsed. |
name | The package name argument |
References _, badusage(), pkg_spec_parse_pkg(), dpkg_error::str, and dpkg_error::type.
Referenced by verify().
void set_admindir | ( | const struct cmdinfo * | cip, |
const char * | value | ||
) |
void set_instdir | ( | const struct cmdinfo * | cip, |
const char * | value | ||
) |
void set_root | ( | const struct cmdinfo * | cip, |
const char * | value | ||
) |
References dpkg_db_set_dir(), dpkg_fsys_get_path(), and dpkg_fsys_set_dir().
void setaction | ( | const struct cmdinfo * | cip, |
const char * | value | ||
) |
References _, badusage(), cipaction, cmdinfo::olong, cmdinfo::oshort, cmdinfo::sassignto, and cmdinfo::takesvalue.
Referenced by commandfd(), and main().
void setobsolete | ( | const struct cmdinfo * | cip, |
const char * | value | ||
) |
|
extern |
Current cmdinfo action.
Referenced by archivefiles(), assert_feature(), clearselections(), cmpversions(), commandfd(), deferred_remove(), do_build(), do_contents(), do_control(), do_ctrltarfile(), do_extract(), do_fsystarfile(), do_info(), do_join(), do_queue(), do_raw_extract(), execbackend(), forgetold(), main(), ok_prermdeconfigure(), packages(), predeppackage(), print_error_perarchive(), print_error_perpackage(), print_foreign_arches(), printarch(), process_archive(), process_queue(), setaction(), setselections(), unpackchk(), updateavailable(), validate_archname(), validate_pkgname(), validate_trigname(), validate_version(), and verify().