diff options
author | Guillem Jover <guillem@debian.org> | 2014-05-28 01:24:22 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2014-05-28 01:24:22 +0200 |
commit | cb6a7683285dd7af9074cce1c6503a61d65feff1 (patch) | |
tree | f4d81b6aa59f45d17a7267c37c8782f3c6b9928a /src | |
parent | 2c1c66b8bd3399505c52e2e393b768e05b622818 (diff) | |
download | dpkg-cb6a7683285dd7af9074cce1c6503a61d65feff1.tar.gz |
dpkg: Uppercase pkg_infodb_format enum values
Diffstat (limited to 'src')
-rw-r--r-- | src/infodb-access.c | 4 | ||||
-rw-r--r-- | src/infodb-format.c | 12 | ||||
-rw-r--r-- | src/infodb-upgrade.c | 4 | ||||
-rw-r--r-- | src/infodb.h | 10 |
4 files changed, 15 insertions, 15 deletions
diff --git a/src/infodb-access.c b/src/infodb-access.c index 1de2fca48..7679312ea 100644 --- a/src/infodb-access.c +++ b/src/infodb-access.c @@ -3,7 +3,7 @@ * infodb.c - package control information database * * Copyright © 1995 Ian Jackson <ian@chiark.greenend.org.uk> - * Copyright © 2011 Guillem Jover <guillem@debian.org> + * Copyright © 2011-2014 Guillem Jover <guillem@debian.org> * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -68,7 +68,7 @@ pkg_infodb_foreach(struct pkginfo *pkg, struct pkgbin *pkgbin, db_format = pkg_infodb_get_format(); if (pkgbin->multiarch == multiarch_same && - db_format == pkg_infodb_format_multiarch) + db_format == PKG_INFODB_FORMAT_MULTIARCH) pkgname = pkgbin_name(pkg, pkgbin, pnaw_always); else pkgname = pkgbin_name(pkg, pkgbin, pnaw_never); diff --git a/src/infodb-format.c b/src/infodb-format.c index 41e8d96f1..6f3851359 100644 --- a/src/infodb-format.c +++ b/src/infodb-format.c @@ -2,7 +2,7 @@ * dpkg - main program for package management * infodb-format.c - package control information database format * - * Copyright © 2011 Guillem Jover <guillem@debian.org> + * Copyright © 2011-2014 Guillem Jover <guillem@debian.org> * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,7 +35,7 @@ #include "infodb.h" -static enum pkg_infodb_format db_format = pkg_infodb_format_unknown; +static enum pkg_infodb_format db_format = PKG_INFODB_FORMAT_UNKNOWN; static bool db_upgrading; static enum pkg_infodb_format @@ -48,7 +48,7 @@ pkg_infodb_parse_format(const char *file) if (fp == NULL) { /* A missing format file means legacy format (0). */ if (errno == ENOENT) - return pkg_infodb_format_legacy; + return PKG_INFODB_FORMAT_LEGACY; ohshite(_("error trying to open %.250s"), file); } @@ -84,7 +84,7 @@ pkg_infodb_read_format(void) atomic_file_free(file); free(filename); - if (db_format < 0 || db_format >= pkg_infodb_format_last) + if (db_format < 0 || db_format >= PKG_INFODB_FORMAT_LAST) ohshit(_("info database format (%d) is bogus or too new; " "try getting a newer dpkg"), db_format); @@ -94,7 +94,7 @@ pkg_infodb_read_format(void) enum pkg_infodb_format pkg_infodb_get_format(void) { - if (db_format > pkg_infodb_format_unknown) + if (db_format > PKG_INFODB_FORMAT_UNKNOWN) return db_format; else return pkg_infodb_read_format(); @@ -141,7 +141,7 @@ pkg_infodb_get_file(struct pkginfo *pkg, struct pkgbin *pkgbin, varbuf_add_char(&vb, '/'); varbuf_add_str(&vb, pkg->set->name); if (pkgbin->multiarch == multiarch_same && - format == pkg_infodb_format_multiarch) + format == PKG_INFODB_FORMAT_MULTIARCH) varbuf_add_archqual(&vb, pkgbin->arch); varbuf_add_char(&vb, '.'); varbuf_add_str(&vb, filetype); diff --git a/src/infodb-upgrade.c b/src/infodb-upgrade.c index 21cbafabd..88ba4311e 100644 --- a/src/infodb-upgrade.c +++ b/src/infodb-upgrade.c @@ -3,7 +3,7 @@ * infodb-upgrade.c - package control information database format upgrade * * Copyright © 1995 Ian Jackson <ian@chiark.greenend.org.uk> - * Copyright © 2011 Guillem Jover <guillem@debian.org> + * Copyright © 2011-2014 Guillem Jover <guillem@debian.org> * Copyright © 2011 Linaro Limited * Copyright © 2011 Raphaël Hertzog <hertzog@debian.org> * @@ -246,7 +246,7 @@ pkg_infodb_upgrade(void) if (modstatdb_get_status() < msdbrw_write) return; - if (db_format < pkg_infodb_format_multiarch || + if (db_format < PKG_INFODB_FORMAT_MULTIARCH || pkg_infodb_is_upgrading()) pkg_infodb_upgrade_to_multiarch(); } diff --git a/src/infodb.h b/src/infodb.h index fa9405fd2..472011cc3 100644 --- a/src/infodb.h +++ b/src/infodb.h @@ -2,7 +2,7 @@ * dpkg - main program for package management * infodb.h - package control information database * - * Copyright © 2011 Guillem Jover <guillem@debian.org> + * Copyright © 2011-2014 Guillem Jover <guillem@debian.org> * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,10 +26,10 @@ #include <dpkg/dpkg-db.h> enum pkg_infodb_format { - pkg_infodb_format_unknown = -1, - pkg_infodb_format_legacy = 0, - pkg_infodb_format_multiarch = 1, - pkg_infodb_format_last, + PKG_INFODB_FORMAT_UNKNOWN = -1, + PKG_INFODB_FORMAT_LEGACY = 0, + PKG_INFODB_FORMAT_MULTIARCH = 1, + PKG_INFODB_FORMAT_LAST, }; enum pkg_infodb_format pkg_infodb_get_format(void); |