index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aaron Griffin <aaron@archlinux.org> | 2007-01-18 16:52:57 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2007-01-18 16:52:57 +0000 |
commit | 86b136bb592bf576a3da950fee153f6d4f5b9d15 (patch) | |
tree | f6289e427de5c5b2cfd3e3d37b75fc9506eb3bdb /src/pacman/pacman.c | |
parent | 46e26ac5c8d15fbb2385ad972f2f69891a0bd8d0 (diff) |
-rw-r--r-- | src/pacman/pacman.c | 17 |
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 54612383..fa3003e2 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -72,15 +72,13 @@ enum { PM_OP_DEPTEST }; -config_t *config = NULL; +config_t *config; pmdb_t *db_local; /* list of (sync_t *) structs for sync locations */ -list_t *pmc_syncs = NULL; +list_t *pmc_syncs; /* list of targets specified on command line */ -list_t *pm_targets = NULL; - -unsigned int maxcols = 80; +static list_t *pm_targets; extern int neednl; @@ -134,8 +132,7 @@ static void usage(int op, char *myname) printf(_(" -l, --list list the contents of the queried package\n")); printf(_(" -m, --foreign list all packages that were not found in the sync db(s)\n")); printf(_(" -o, --owns <file> query the package that owns <file>\n")); - printf(_(" -p, --file pacman will query the package file [package] instead of\n")); - printf(_(" looking in the database\n")); + printf(_(" -p, --file query the package file [package] instead of the database\n")); printf(_(" -s, --search search locally-installed packages for matching strings\n")); } else if(op == PM_OP_SYNC) { printf(_("usage: %s {-S --sync} [options] [package]\n"), myname); @@ -278,7 +275,7 @@ static int parseargs(int argc, char *argv[]) {0, 0, 0, 0} }; char root[PATH_MAX]; - struct stat st = {0}; + struct stat st; while((opt = getopt_long(argc, argv, "ARUFQSTDYr:b:vkhscVfmnoldepiuwyg", opts, &option_index))) { if(opt < 0) { @@ -325,7 +322,7 @@ static int parseargs(int argc, char *argv[]) case 'b': if(stat(optarg, &st) == -1 || !S_ISDIR(st.st_mode)) { pm_fprintf(stderr, NL, _("error: '%s' is not a valid db path\n"), optarg); - exit(1); + exit(EXIT_FAILURE); } alpm_option_set_dbpath(optarg); config->dbpath = alpm_option_get_dbpath(optarg); @@ -481,7 +478,7 @@ int main(int argc, char *argv[]) } else { ERR(NL, _("you cannot perform this operation unless you are root.\n")); config_free(config); - exit(1); + exit(EXIT_FAILURE); } } } |