]> git.tuebingen.mpg.de Git - dss.git/commitdiff
Merge branch 'refs/heads/t/configtest'
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 13 Nov 2017 16:46:57 +0000 (17:46 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 13 Nov 2017 16:49:32 +0000 (17:49 +0100)
A single patch which adds the new configtest subcommand, plus a fixup
for a formatting issue which was noticed only after the branch had
already been merged to next.

* refs/heads/t/configtest:
  show_subcommand_summary(): Increase column width.
  New subcommand: configtest.

1  2 
NEWS
dss.c

diff --combined NEWS
index de1dca67284ae98c713412eba429af24d45239e3,755cad21834cc7b6d150746e6555544d706802c6..1dfffd0f79ea54502f90c391a8d6bdac30a7d269
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -7,10 -7,10 +7,13 @@@ x.y.z (to be announced
   - The --no-resume option has been removed.
  
   - The gengetopt option parser has been replaced by the
 - [lopsub](http://people.tuebingen.mpg.de/~maan/lopsub) library. Hence
 + [lopsub](http://people.tuebingen.mpg.de/maan/lopsub) library. Hence
   lopsub must be installed to compile this package. Also help2man is
   no longer required since lopsub has built-in roff support.
  
++ - New subcommand "configtest" to check the command line options and
++ the configuration file for syntactic correctness.
++
   - "make install" will install the executable and the man page.
  
   - In run mode, dss no longer exits successfully if another instance
@@@ -21,8 -21,6 +24,8 @@@
   - CFLAGS, CPPFLAGS and LDFLAGS can now be used to override the flags
   of the build system.
  
 + - The dss logo is now created with ImageMagick rather than dia.
 +
  ------------------
  0.1.7 (2017-04-17)
  ------------------
diff --combined dss.c
index ecd6ac35273c5fb04ab55fda8243204094532e86,f80fd39b7b508b7aa37b8a92ed469d2c56ac3f66..57abf0248ad7b493248e7690a3452cc4927a8a1b
--- 1/dss.c
--- 2/dss.c
+++ b/dss.c
@@@ -729,7 -729,6 +729,7 @@@ static int try_to_free_disk_space(void
        if (!low_disk_space)
                goto out;
        DSS_WARNING_LOG(("disk space low and nothing obvious to remove\n"));
 +      why = "oldest";
        victim = find_oldest_removable_snapshot(&sl);
        if (victim)
                goto remove;
@@@ -1697,6 -1696,13 +1697,13 @@@ static int com_ls(void
  }
  EXPORT_CMD_HANDLER(ls);
  
+ static int com_configtest(void)
+ {
+       printf("Syntax Ok\n");
+       return 0;
+ }
+ EXPORT_CMD_HANDLER(configtest);
  static int setup_signal_handling(void)
  {
        int ret;
@@@ -1738,7 -1744,7 +1745,7 @@@ static void show_subcommand_summary(voi
        for (i = 1; (cmd = lls_cmd(i, dss_suite)); i++) {
                const char *name = lls_command_name(cmd);
                const char *purpose = lls_purpose(cmd);
-               printf("%-10s%s\n", name, purpose);
+               printf("%-11s%s\n", name, purpose);
        }
        exit(EXIT_SUCCESS);
  }