summaryrefslogtreecommitdiff
path: root/libgphoto2/gphoto2-setting.c
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2015-03-27 07:09:02 +0000
committerMarcus Meissner <marcus@jet.franken.de>2015-03-27 07:09:02 +0000
commit7f1f20a964881bf235196b7113affeab941bf087 (patch)
tree19dc72ee4dc54c95f1db6e29ed27adeb119c0c3f /libgphoto2/gphoto2-setting.c
parent0f63051f5bcbbcfabc05001f94a7f52bb8eba120 (diff)
downloadlibgphoto2-7f1f20a964881bf235196b7113affeab941bf087.tar.gz
From: Axel Waggershauser <awagger@web.de>
3) I got heaps of error messages from a failed attempt to read the settings file. The code in gphoto_settings.c could need some proper cleanup but I only improved the logging messages a bit and made the usage of the log-level consistent (report the unproblematic failed read as a DEBUG level message consistently). git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15405 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2/gphoto2-setting.c')
-rw-r--r--libgphoto2/gphoto2-setting.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgphoto2/gphoto2-setting.c b/libgphoto2/gphoto2-setting.c
index d2e815e92..df3b2b0e8 100644
--- a/libgphoto2/gphoto2-setting.c
+++ b/libgphoto2/gphoto2-setting.c
@@ -133,7 +133,7 @@ verify_settings (char *settings_file)
unsigned int x, equals;
if ((f=fopen(settings_file, "r"))==NULL) {
- GP_LOG_E ("Can't open settings file for reading.");
+ GP_LOG_D ("Can't open settings file '%s' for reading.", settings_file);
return(0);
}
@@ -169,13 +169,13 @@ load_settings (void)
char buf[1024], *id, *key, *value;
/* Make sure the directories are created */
- GP_LOG_D ("Creating $HOME/.gphoto");
#ifdef WIN32
GetWindowsDirectory (buf, sizeof(buf));
strcat (buf, "\\gphoto");
#else
snprintf (buf, sizeof(buf), "%s/.gphoto", getenv ("HOME"));
#endif
+ GP_LOG_D ("Creating gphoto config directory ('%s')", buf);
(void)gp_system_mkdir (buf);
glob_setting_count = 0;
@@ -192,7 +192,7 @@ load_settings (void)
GP_LOG_D ("Loading settings from file '%s'.", buf);
if ((f=fopen(buf, "r"))==NULL) {
- GP_LOG_D ("Can't open settings file for reading.");
+ GP_LOG_D ("Can't open settings file '%s' for reading.", buf);
return(GP_ERROR);
}