aboutsummaryrefslogtreecommitdiffstats
path: root/fbiconfig.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2016-04-01 14:01:41 +0200
committerGerd Hoffmann <kraxel@redhat.com>2016-04-01 14:01:41 +0200
commitc6b3c5e1e868f86e32b47e3c41d09b795b60bb0c (patch)
treebb77ff443e7ba03203d6e1e3df9ffa3104cfbef4 /fbiconfig.c
parent483b8019a23f46b60c444d07c74968c7aa057f65 (diff)
downloadfbida-c6b3c5e1e868f86e32b47e3c41d09b795b60bb0c.tar.gz
separate cfg files for fbi/fbpdf
Diffstat (limited to 'fbiconfig.c')
-rw-r--r--fbiconfig.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fbiconfig.c b/fbiconfig.c
index 565a21b..6c2a4bc 100644
--- a/fbiconfig.c
+++ b/fbiconfig.c
@@ -259,7 +259,7 @@ struct cfg_cmdline fbpdf_cfg[] = {
static char *fbi_config = NULL;
-static void init_config(void)
+static void init_config(const char *name)
{
char *home;
@@ -267,13 +267,13 @@ static void init_config(void)
if (NULL == home)
return;
- fbi_config = malloc(strlen(home) + 16);
- sprintf(fbi_config,"%s/.fbirc", home);
+ fbi_config = malloc(strlen(home) + strlen(name) + 2);
+ sprintf(fbi_config,"%s/%s", home, name);
}
-void fbi_read_config(void)
+void fbi_read_config(const char *name)
{
- init_config();
+ init_config(name);
if (fbi_config)
cfg_parse_file("config", fbi_config);
}