From 66dc72e7781e232e7fd166a0d420eb586250a4ea Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 30 May 2008 15:26:15 +0200 Subject: [PATCH] Be more verbose if the uid file could not be mapped. --- adu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/adu.c b/adu.c index d43f5fe..8f5ff8d 100644 --- 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) -- 2.39.2