Yes right. Sure if required we can made changes on these checks and include appropriate condition for verbose set and rc < 0. Seems fine to me.May be we can use similar checks:Not that it matters much, this logic is slightly different for verbose set and rc < 0. I don't mind going with that, so let me know.
if( verbose)
pr_info("%s: Error walking file tree %s%s\n", prog, ldirname,err_string_ext);
if(rc > 0)
empty_map = 1;
else
ret = 1;