Be more verbose if the uid file could not be mapped.
authorAndre Noll <maan@systemlinux.org>
Fri, 30 May 2008 13:26:15 +0000 (15:26 +0200)
committerAndre Noll <maan@systemlinux.org>
Fri, 30 May 2008 13:26:15 +0000 (15:26 +0200)
adu.c

diff --git a/adu.c b/adu.c
index d43f5fe..8f5ff8d 100644 (file)
--- a/adu.c
+++ b/adu.c
@@ -962,10 +962,14 @@ static int read_uid_file(void)
        char *filename = get_uid_list_name(), *map;
        int ret = mmap_full_file(filename, O_RDONLY, (void **)&map, &size, NULL);
 
-       free(filename);
-       if (ret < 0)
+       if (ret < 0) {
+               INFO_LOG("failed to map %s\n", filename);
+               free(filename);
                return ret;
+       }
        num_uids = size / 4;
+       INFO_LOG("found %u uids in %s\n", (unsigned)num_uids, filename);
+       free(filename);
        /* hash table size should be a power of two and larger than the number of uids */
        uid_hash_table_size = 4;
        while (uid_hash_table_size < num_uids)