[BACK]Return to uname.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / gen

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/gen/uname.c between version 1.11 and 1.12

version 1.11, 2012/03/20 16:36:05 version 1.12, 2014/06/14 13:09:37
Line 80  uname(struct utsname *name)
Line 80  uname(struct utsname *name)
         mib[0] = CTL_KERN;          mib[0] = CTL_KERN;
         mib[1] = KERN_VERSION;          mib[1] = KERN_VERSION;
         len = sizeof(name->version);          len = sizeof(name->version);
         if (sysctl(mib, 2, &name->version, &len, NULL, 0) == -1)          if (sysctl(mib, 2, &name->version, &len, NULL, 0) == -1) {
                 goto error;                  if (errno == ENOMEM) {
                           /*
                            * string is too long for {struct utsname}.version.
                            * Just use the truncated string.
                            * XXX: We could mark the truncation with "..."
                            */
                           name->version[sizeof(name->version) - 1] = '\0';
                   }
                   else goto error;
           }
   
         /* The version may have newlines in it, turn them into spaces. */          /* The version may have newlines in it, turn them into spaces. */
         for (p = name->version; len--; ++p) {          for (p = name->version; len--; ++p) {

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

CVSweb <webmaster@jp.NetBSD.org>