diff --git a/include/swupd.h b/include/swupd.h index d038489..b45f46e 100644 --- a/include/swupd.h +++ b/include/swupd.h @@ -13,7 +13,6 @@ // SWUPD_NUM_PACKS is also "PREV_CHECK" in releas tool swupd_bb.py (change both) #define SWUPD_NUM_PACKS 4 #define SWUPD_NUM_MANIFEST_DELTAS 25 -#define SWUPD_DEFAULT_FORMAT 3 #define SWUPD_SERVER_STATE_DIR "/var/lib/update" diff --git a/src/globals.c b/src/globals.c index 214c4d8..587419b 100644 --- a/src/globals.c +++ b/src/globals.c @@ -79,7 +79,8 @@ bool set_state_dir(char *dir) bool init_globals(void) { if (format == -1) { - format = SWUPD_DEFAULT_FORMAT; + printf("Error: Missing format parameter. Please specify a format with -F.\n"); + return false; } if (!init_state_globals()) { diff --git a/src/main.c b/src/main.c index a23a05e..b479fc2 100644 --- a/src/main.c +++ b/src/main.c @@ -69,7 +69,7 @@ static void print_help(const char *name) printf("Application Options:\n"); printf(" -o, --osversion The OS version for which to create an update\n"); printf(" -m, --minversion Optional minimum file version to write into manifests per file\n"); - printf(" -F, --format Optional format string [ default:=%d ]\n", SWUPD_DEFAULT_FORMAT); + printf(" -F, --format Format number for the update\n"); printf(" -g, --getformat Print current format string and exit\n"); printf(" -S, --statedir Optional directory to use for state [ default:=%s ]\n", SWUPD_SERVER_STATE_DIR); printf(" -s, --signcontent Enables cryptographic signing of update content\n"); @@ -118,7 +118,7 @@ static bool parse_options(int argc, char **argv) break; case 'g': if (format == -1) { - printf("%d\n", SWUPD_DEFAULT_FORMAT); + printf("No format specified\n"); } else { printf("%llu\n", format); free_globals();