Re: [PATCH] util: distinguish get{pw|gr}nam_r error from the "not found" cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/08/2013 12:10 AM, Peter Krempa wrote:
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


       Accept the nack :)

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]