2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-30 22:05:11 +00:00

Refactor the configuration file path.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4704 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2007-08-26 08:42:20 +00:00
parent b8b417c51e
commit ec8ba95b53

View File

@@ -38,7 +38,7 @@
#define PROGRAM "sensors"
#define VERSION LM_VERSION
#define DEFAULT_CONFIG_FILE_NAME "sensors.conf"
#define DEFAULT_CONFIG_FILE ETCDIR "/sensors.conf"
FILE *config_file;
@@ -63,7 +63,8 @@ void print_short_help(void)
void print_long_help(void)
{
printf("Usage: %s [OPTION]... [CHIP]...\n",PROGRAM);
printf(" -c, --config-file Specify a config file (default: " ETCDIR "/" DEFAULT_CONFIG_FILE_NAME ")\n");
printf(" -c, --config-file Specify a config file (default: %s)\n",
DEFAULT_CONFIG_FILE);
printf(" -h, --help Display this help text\n");
printf(" -s, --set Execute `set' statements too (root only)\n");
printf(" -f, --fahrenheit Show temperatures in degrees fahrenheit\n");
@@ -144,7 +145,7 @@ static void set_degstr(void)
int main (int argc, char *argv[])
{
int c,res,i,error;
const char *config_file_name = ETCDIR "/" DEFAULT_CONFIG_FILE_NAME;
const char *config_file_name = DEFAULT_CONFIG_FILE;
struct option long_opts[] = {
{ "help", no_argument, NULL, 'h' },