diff options
author | Guillem Jover <guillem@debian.org> | 2014-05-28 00:49:11 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2014-05-28 00:49:11 +0200 |
commit | d3d70a975903a567c799b3f05f2cc4521a497dbf (patch) | |
tree | 16010ed1fe6b22f701a10dcaacea948efd2781f0 /src | |
parent | 90d16af0604d35ca7d90921f5d59d685d3f2c560 (diff) | |
download | dpkg-d3d70a975903a567c799b3f05f2cc4521a497dbf.tar.gz |
libdpkg: Uppercase and namespace dpkg_arch_type enum values
Diffstat (limited to 'src')
-rw-r--r-- | src/divertcmd.c | 4 | ||||
-rw-r--r-- | src/enquiry.c | 10 | ||||
-rw-r--r-- | src/main.c | 8 | ||||
-rw-r--r-- | src/unpack.c | 11 |
4 files changed, 17 insertions, 16 deletions
diff --git a/src/divertcmd.c b/src/divertcmd.c index 0acb2e14b..f4a268c89 100644 --- a/src/divertcmd.c +++ b/src/divertcmd.c @@ -3,7 +3,7 @@ * * Copyright © 1995 Ian Jackson * Copyright © 2000, 2001 Wichert Akkerman - * Copyright © 2006-2012 Guillem Jover <guillem@debian.org> + * Copyright © 2006-2014 Guillem Jover <guillem@debian.org> * Copyright © 2011 Linaro Limited * Copyright © 2011 Raphaël Hertzog <hertzog@debian.org> * @@ -528,7 +528,7 @@ diversion_is_shared(struct pkgset *set, struct filenamenode *namenode) archname = getenv("DPKG_MAINTSCRIPT_ARCH"); arch = dpkg_arch_find(archname); - if (arch->type == arch_none || arch->type == arch_empty) + if (arch->type == DPKG_ARCH_NONE || arch->type == DPKG_ARCH_EMPTY) return false; for (pkg = &set->pkg; pkg; pkg = pkg->arch_next) diff --git a/src/enquiry.c b/src/enquiry.c index d8369c56a..b157bafb7 100644 --- a/src/enquiry.c +++ b/src/enquiry.c @@ -143,15 +143,15 @@ static const struct audit_problem audit_problems[] = { "database, they need to be reinstalled:\n") }, { .check = audit_arch, - .value.number = arch_none, + .value.number = DPKG_ARCH_NONE, .explanation = N_("The following packages do not have an architecture:\n") }, { .check = audit_arch, - .value.number = arch_illegal, + .value.number = DPKG_ARCH_ILLEGAL, .explanation = N_("The following packages have an illegal architecture:\n") }, { .check = audit_arch, - .value.number = arch_unknown, + .value.number = DPKG_ARCH_UNKNOWN, .explanation = N_( "The following packages have an unknown foreign architecture, which will\n" "cause dependency issues on front-ends. This can be fixed by registering\n" @@ -552,7 +552,7 @@ printarch(const char *const *argv) if (*argv) badusage(_("--%s takes no arguments"), cipaction->olong); - printf("%s\n", dpkg_arch_get(arch_native)->name); + printf("%s\n", dpkg_arch_get(DPKG_ARCH_NATIVE)->name); m_output(stdout, _("<standard output>")); @@ -578,7 +578,7 @@ print_foreign_arches(const char *const *argv) dpkg_arch_load_list(); for (arch = dpkg_arch_get_list(); arch; arch = arch->next) { - if (arch->type != arch_foreign) + if (arch->type != DPKG_ARCH_FOREIGN) continue; printf("%s\n", arch->name); diff --git a/src/main.c b/src/main.c index 82dd64d9f..48ede3598 100644 --- a/src/main.c +++ b/src/main.c @@ -505,10 +505,10 @@ arch_add(const char *const *argv) arch = dpkg_arch_add(archname); switch (arch->type) { - case arch_native: - case arch_foreign: + case DPKG_ARCH_NATIVE: + case DPKG_ARCH_FOREIGN: break; - case arch_illegal: + case DPKG_ARCH_ILLEGAL: ohshit(_("architecture '%s' is illegal: %s"), archname, dpkg_arch_name_is_illegal(archname)); default: @@ -534,7 +534,7 @@ arch_remove(const char *const *argv) modstatdb_open(msdbrw_readonly); arch = dpkg_arch_find(archname); - if (arch->type != arch_foreign) { + if (arch->type != DPKG_ARCH_FOREIGN) { warning(_("cannot remove non-foreign architecture '%s'"), arch->name); return 0; } diff --git a/src/unpack.c b/src/unpack.c index eb9d5fd1a..07f0d0d24 100644 --- a/src/unpack.c +++ b/src/unpack.c @@ -3,7 +3,7 @@ * unpack.c - the huge function process_archive * * Copyright © 1995 Ian Jackson <ian@chiark.greenend.org.uk> - * Copyright © 2006-2012 Guillem Jover <guillem@debian.org> + * Copyright © 2006-2014 Guillem Jover <guillem@debian.org> * Copyright © 2011 Linaro Limited * Copyright © 2011 Raphaël Hertzog <hertzog@debian.org> * @@ -506,12 +506,13 @@ void process_archive(const char *filename) { return; } - if (pkg->available.arch->type != arch_all && - pkg->available.arch->type != arch_native && - pkg->available.arch->type != arch_foreign) + if (pkg->available.arch->type != DPKG_ARCH_ALL && + pkg->available.arch->type != DPKG_ARCH_NATIVE && + pkg->available.arch->type != DPKG_ARCH_FOREIGN) forcibleerr(fc_architecture, _("package architecture (%s) does not match system (%s)"), - pkg->available.arch->name, dpkg_arch_get(arch_native)->name); + pkg->available.arch->name, + dpkg_arch_get(DPKG_ARCH_NATIVE)->name); clear_deconfigure_queue(); clear_istobes(); |