log: fix signedness issue
[fio.git] / parse.c
diff --git a/parse.c b/parse.c
index 539c602865fbd3127c7dcdfb3ab06a4e758a50c0..6261fca2599b96e45d7a733587b7ea61884b8cfd 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -36,6 +36,7 @@ static const char *opt_type_names[] = {
        "OPT_FLOAT_LIST",
        "OPT_STR_SET",
        "OPT_DEPRECATED",
+       "OPT_SOFT_DEPRECATED",
        "OPT_UNSUPPORTED",
 };
 
@@ -68,7 +69,7 @@ static void posval_sort(const struct fio_option *o, struct value_pair *vpmap)
 }
 
 static void show_option_range(const struct fio_option *o,
-                             size_t (*logger)(const char *format, ...))
+                             ssize_t (*logger)(const char *format, ...))
 {
        if (o->type == FIO_OPT_FLOAT_LIST) {
                const char *sep = "";
@@ -131,7 +132,7 @@ static void show_option_help(const struct fio_option *o, int is_err)
                "deprecated",
                "unsupported",
        };
-       size_t (*logger)(const char *format, ...);
+       ssize_t (*logger)(const char *format, ...);
 
        if (is_err)
                logger = log_err;
@@ -876,8 +877,9 @@ static int __handle_option(const struct fio_option *o, const char *ptr,
                break;
        }
        case FIO_OPT_DEPRECATED:
-               log_info("Option %s is deprecated\n", o->name);
                ret = 1;
+       case FIO_OPT_SOFT_DEPRECATED:
+               log_info("Option %s is deprecated\n", o->name);
                break;
        default:
                log_err("Bad option type %u\n", o->type);
@@ -1235,7 +1237,8 @@ int show_cmd_help(const struct fio_option *options, const char *name)
        for (o = &options[0]; o->name; o++) {
                int match = 0;
 
-               if (o->type == FIO_OPT_DEPRECATED)
+               if (o->type == FIO_OPT_DEPRECATED ||
+                   o->type == FIO_OPT_SOFT_DEPRECATED)
                        continue;
                if (!exec_profile && o->prof_name)
                        continue;
@@ -1309,7 +1312,8 @@ void fill_default_options(void *data, const struct fio_option *options)
 
 static void option_init(struct fio_option *o)
 {
-       if (o->type == FIO_OPT_DEPRECATED || o->type == FIO_OPT_UNSUPPORTED)
+       if (o->type == FIO_OPT_DEPRECATED || o->type == FIO_OPT_UNSUPPORTED ||
+           o->type == FIO_OPT_SOFT_DEPRECATED)
                return;
        if (o->name && !o->lname)
                log_err("Option %s: missing long option name\n", o->name);