Add license and copyright statement to -v/--version and usage message

This commit is contained in:
Julien BLACHE 2009-09-21 19:52:05 +02:00
parent 11909725e2
commit aa52f1d30b

View File

@ -60,11 +60,21 @@
struct event_base *evbase_main;
static int main_exit;
static void
version(void)
{
fprintf(stdout, "Forked Media Server: Version %s\n", VERSION);
fprintf(stdout, "Copyright (C) 2009 Julien BLACHE <jb@jblache.org>\n");
fprintf(stdout, "Based on mt-daapd, Copyright (C) 2003-2007 Ron Pedde <ron@pedde.com>\n");
fprintf(stdout, "Released under the GNU General Public License version 2 or later\n");
}
static void
usage(char *program)
{
printf("Usage: %s [options]\n\n",program);
version();
printf("\n");
printf("Usage: %s [options]\n\n", program);
printf("Options:\n");
printf(" -d <number> Log level (0-5)\n");
printf(" -D <dom,dom..> Log domains\n");
@ -407,7 +417,7 @@ main(int argc, char **argv)
break;
case 'v':
fprintf(stdout, "Forked Media Server: Version %s\n",VERSION);
version();
return EXIT_SUCCESS;
break;