Code

collectd: Make `mkdir' error messages more identifiable.
authorFlorian Forster <octo@huhu.verplant.org>
Tue, 11 Sep 2007 09:11:25 +0000 (11:11 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Tue, 11 Sep 2007 09:11:25 +0000 (11:11 +0200)
src/collectd.c
src/common.c

index 4fbd5c0923193bdd95832278a84f467941bca77b..4e18fd6e2280edcce9b1190777c846bdfa11dd3f 100644 (file)
@@ -114,7 +114,7 @@ static int change_basedir (const char *orig_dir)
                        if (mkdir (orig_dir, 0755) == -1)
                        {
                                char errbuf[1024];
-                               ERROR ("mkdir (%s): %s", orig_dir,
+                               ERROR ("change_basedir: mkdir (%s): %s", orig_dir,
                                                sstrerror (errno, errbuf,
                                                        sizeof (errbuf)));
                                return (-1);
index 951bae306e834d15f3b7d1e66fb217740bedaff0..974a29eac035afca6a158deafbe4e56bfae2be52 100644 (file)
@@ -421,7 +421,7 @@ int check_create_dir (const char *file_orig)
                                if (mkdir (dir, 0755) == -1)
                                {
                                        char errbuf[1024];
-                                       ERROR ("mkdir (%s): %s", dir,
+                                       ERROR ("check_create_dir: mkdir (%s): %s", dir,
                                                        sstrerror (errno,
                                                                errbuf, sizeof (errbuf)));
                                        return (-1);
@@ -444,7 +444,7 @@ int check_create_dir (const char *file_orig)
        }
 
        return (0);
-}
+} /* check_create_dir */
 
 #ifdef HAVE_LIBKSTAT
 int get_kstat (kstat_t **ksp_ptr, char *module, int instance, char *name)