From: Andre Noll Date: Mon, 13 Nov 2017 16:46:57 +0000 (+0100) Subject: Merge branch 'refs/heads/t/configtest' X-Git-Tag: v1.0.0~18 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=a4544b07746d58815d78c4f1213ccdb96d256919;hp=-c;p=dss.git Merge branch 'refs/heads/t/configtest' 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. --- a4544b07746d58815d78c4f1213ccdb96d256919 diff --combined NEWS index de1dca6,755cad2..1dfffd0 --- a/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 ecd6ac3,f80fd39..57abf02 --- a/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); }