]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge topic branch t/ls-l into pu
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 8 May 2024 17:59:37 +0000 (19:59 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 8 May 2024 17:59:37 +0000 (19:59 +0200)
Started on 2024-03-17

A single commit which deprecates the chunk table and mbox listing
modes. The chunk table can still be listed with para_afh(1), and the
mbox format was never really useful to begin with. The idea is to
remove support after 0.8.0 has been released.

<!--
- The chunk table and mbox listing modes of the ls server command
have been deprecated. They still work, but a warning is issued to
inform the user about the deprecated option.
-->

* refs/heads/t/ls-l:
  server: Deprecate -l=c and -l=m of com_ls().

aft.c

diff --git a/aft.c b/aft.c
index f1aca7fb8ccc3e31575303a4762d6a7ea35a054f..2fab49b5c627b65635a02259df144e7ac9ade0c6 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -1475,11 +1475,15 @@ static int com_ls(struct command_context *cc, struct lls_parse_result *lpr)
                        opts->mode = LS_MODE_SHORT;
                else if (!strcmp(val, "v") || !strcmp(val, "verbose"))
                        opts->mode = LS_MODE_VERBOSE;
-               else if (!strcmp(val, "m") || !strcmp(val, "mbox"))
+               else if (!strcmp(val, "m") || !strcmp(val, "mbox")) {
+                       send_sb_va(&cc->scc, SBD_WARNING_LOG,
+                               "Warning: mbox listing mode is deprecated\n");
                        opts->mode = LS_MODE_MBOX;
-               else if (!strcmp(val, "c") || !strcmp(val, "chunk-table"))
+               } else if (!strcmp(val, "c") || !strcmp(val, "chunk-table")) {
+                       send_sb_va(&cc->scc, SBD_WARNING_LOG,
+                               "Warning: chunk table listing mode is deprecated\n");
                        opts->mode = LS_MODE_CHUNKS;
-               else if (!strcmp(val, "p") || !strcmp(val, "parser-friendly"))
+               else if (!strcmp(val, "p") || !strcmp(val, "parser-friendly"))
                        opts->mode = LS_MODE_PARSER;
                else {
                        ret = -ERRNO_TO_PARA_ERROR(EINVAL);