On 03/07/13 17:08, Guannan Ren wrote:
manpage: "If no matching record was found, these functions return 0 and store NULL in *result. In case of error, an error number is returned, and NULL is stored in *result." So we can distinguish function error from "no found" cases based on the return value. --- src/util/virutil.c | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-)
NACK, we already tried that, but getpwnam_r sucks and there's no reasonable replacement.
See http://www.redhat.com/archives/libvir-list/2012-December/msg00207.html for the full reasons we stick with the ugly code. Peter -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list