third_party/libprocess/include/stout/os.hpp
// Return the OS release numbers.
Return the OS release numbers.
Return the OS release numbers .
inline Try<Release> release()
{
  Try<UTSInfo> info = uname();
  if (info.isError()) {
    return Try<Release>::error(info.error());
  }
  Release r;
  if (::sscanf(info.get().release.c_str(), "%d.%d.%d",
               &r.version, &r.major, &r.minor) != 3) {
    return Try<Release>::error(
        "Parsing release number error: " + info.get().release);
  }
  return r;
}
inline Try < Release > release ( ) { Try < UTSInfo > info = uname ( ) ; if ( info . isError ( ) ) { return Try < Release > :: error ( info . error ( ) ) ; } Release r ; if ( :: sscanf ( info . get ( ) . release . c_str ( ) , " " , & r . version , & r . major , & r . minor ) != 3 ) { return Try < Release > :: error ( " " + info . get ( ) . release ) ; } return r ; }
Return the OS release numbers.
Return the OS release numbers .