From: Andre Noll Date: Fri, 30 May 2008 13:26:15 +0000 (+0200) Subject: Be more verbose if the uid file could not be mapped. X-Git-Tag: v0.0.2~36^2~3 X-Git-Url: http://git.tuebingen.mpg.de/?p=adu.git;a=commitdiff_plain;h=66dc72e7781e232e7fd166a0d420eb586250a4ea Be more verbose if the uid file could not be mapped. --- 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)