summaryrefslogtreecommitdiff
path: root/src/app_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app_cache.c')
-rw-r--r--src/app_cache.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/app_cache.c b/src/app_cache.c
index 8f38807..f4dd951 100644
--- a/src/app_cache.c
+++ b/src/app_cache.c
@@ -28,15 +28,11 @@ struct cache_ctx {
unsigned short solver_flags;
};
-enum {
- OPT_CACHE_latest,
- OPT_CACHE_upgrade,
-};
+#define CACHE_OPTIONS(OPT) \
+ OPT(OPT_CACHE_latest, APK_OPT_SH("l") "latest") \
+ OPT(OPT_CACHE_upgrade, APK_OPT_SH("u") "upgrade")
-static const char option_desc[] =
- APK_OPTAPPLET
- APK_OPT2n("latest", "l")
- APK_OPT2n("upgrade", "u");
+APK_OPT_APPLET(option_desc, CACHE_OPTIONS);
static int option_parse_applet(void *ctx, struct apk_db_options *dbopts, int opt, const char *optarg)
{