Re: Problem in manpage of uname(2)

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

 



Hi,

> Since we only get a utsname structure back from the kernel, I'm not
> sure why we would need to care about initializing it as shown here.
> Can you say some more please.

I guess it is misguided optimization but I have to stick with it. We have a 
file with a variable:

static struct utsname name = {"", "", "", "", "", ""};

And then functions like this one:

char const * utsys_version(void) {
  if (!*(name.version)) uname(&name);

  return name.version;
}

I guess this approach is taken because the original author worried about 
performance and for example utsys_nodename is called very often.

On the other hand I wonder why there is the need to rename domainname to 
__domainname at all? 

Christoph

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux