bug-inetutils
[Top][All Lists]
Advanced

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

Re: [bug-inetutils] dnsdomainname, domainname, nisdomainname, ypdomainna


From: Alfred M. Szmidt
Subject: Re: [bug-inetutils] dnsdomainname, domainname, nisdomainname, ypdomainname
Date: Sat, 10 Mar 2012 09:24:44 -0500

   After looking at Debian's 'dnsdomainname' tool and reading its man
   page, I believe that sharing code with InetUtils hostname.c make no
   sense.  None of the other parameters applies to that tool, and they
   would only be confusing.  Thus here is a completely new tool.  What
   do you think?  Please review and we can hopefully work towards
   pushing this eventually.

Regarding the option names, is there anything similar on BSD?  Are the
option names different there?

   One thing that strikes me is that possibly the tool should fail rather
   than printing "(none)".

What happens on Debian?

   Another idea is that it should use getaddrinfo
   instead of gethostbyname.  Thoughts?

No strong opinion, Mats has been replacing gethostbyname usage with
getaddrinfo anyway.  Using the same type of code all over the place
makes sense.

Maybe a small test case?

   --- /dev/null
   +++ b/src/dnsdomainname.c
   @@ -0,0 +1,75 @@
...
   +  ht = gethostbyname (host_name);
   +  if (ht == NULL)
   +    {
   +      puts ("(none)");
   +      return EXIT_SUCCESS;

exit (EXIT_SUCCESS); please.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]