Now prints version number at startup
This commit is contained in:
parent
f42264d3c3
commit
1e98b16602
|
@ -70,4 +70,7 @@ void Config_init(void)
|
|||
CONFIG.sonic_id3 = 0;
|
||||
|
||||
CONFIG.sonic_insecure = 0;
|
||||
|
||||
/*---------- Print version number -----------*/
|
||||
print_version();
|
||||
}
|
||||
|
|
13
src/log.c
13
src/log.c
|
@ -3,6 +3,8 @@
|
|||
#include "config.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -53,4 +55,15 @@ log_printf(LogType type, const char *file, const char *func, int line,
|
|||
exit_failure();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void print_version()
|
||||
{
|
||||
/* FUSE prints its help to stderr */
|
||||
lprintf(info, "HTTPDirFS version " VERSION "\n");
|
||||
/*
|
||||
* --------- Print off SSL engine version ---------
|
||||
*/
|
||||
curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
|
||||
lprintf(info, "libcurl SSL engine: %s\n", data->ssl_version);
|
||||
}
|
|
@ -39,3 +39,8 @@ void log_printf(LogType type, const char *file, const char *func, int line,
|
|||
#define lprintf(type, ...) \
|
||||
log_printf(type, __FILE__, __func__, __LINE__, __VA_ARGS__);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Print the version information for HTTPDirFS
|
||||
*/
|
||||
void print_version();
|
12
src/main.c
12
src/main.c
|
@ -10,7 +10,6 @@
|
|||
|
||||
void add_arg(char ***fuse_argv_ptr, int *fuse_argc, char *opt_string);
|
||||
static void print_help(char *program_name, int long_help);
|
||||
static void print_version();
|
||||
static void print_long_help();
|
||||
static int
|
||||
parse_arg_list(int argc, char **argv, char ***fuse_argv, int *fuse_argc);
|
||||
|
@ -331,17 +330,6 @@ static void print_help(char *program_name, int long_help)
|
|||
}
|
||||
}
|
||||
|
||||
static void print_version()
|
||||
{
|
||||
/* FUSE prints its help to stderr */
|
||||
fprintf(stderr, "HTTPDirFS version " VERSION "\n");
|
||||
/*
|
||||
* --------- Print off SSL engine version ---------
|
||||
*/
|
||||
curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
|
||||
fprintf(stderr, "libcurl SSL engine: %s\n", data->ssl_version);
|
||||
}
|
||||
|
||||
static void print_long_help()
|
||||
{
|
||||
/* FUSE prints its help to stderr */
|
||||
|
|
Loading…
Reference in New Issue