Module: LinuxStat::Uname
- Defined in:
- ext/utsname/utsname.c
Class Method Summary collapse
-
.machine ⇒ Object
Function to return the machine type, or nil if uname fails.
-
.nodename ⇒ Object
Function to return the nodename, or nil if uname fails.
-
.release ⇒ Object
Function to return the release, or nil if uname fails.
-
.sysname ⇒ Object
Function to return the sysname, or nil if uname fails.
-
.version ⇒ Object
Function to return the version, or nil if uname fails.
Class Method Details
.machine ⇒ Object
Function to return the machine type, or nil if uname fails
41 42 43 44 45 46 47 |
# File 'ext/utsname/utsname.c', line 41 static VALUE getMachine(VALUE obj) { struct utsname buf; if (uname(&buf) == -1) return Qnil; return rb_str_new_cstr(buf.machine); } |
.nodename ⇒ Object
Function to return the nodename, or nil if uname fails
14 15 16 17 18 19 20 |
# File 'ext/utsname/utsname.c', line 14 static VALUE getNodename(VALUE obj) { struct utsname buf; if (uname(&buf) == -1) return Qnil; return rb_str_new_cstr(buf.nodename); } |
.release ⇒ Object
Function to return the release, or nil if uname fails
23 24 25 26 27 28 29 |
# File 'ext/utsname/utsname.c', line 23 static VALUE getRelease(VALUE obj) { struct utsname buf; if (uname(&buf) == -1) return Qnil; return rb_str_new_cstr(buf.release); } |
.sysname ⇒ Object
Function to return the sysname, or nil if uname fails
5 6 7 8 9 10 11 |
# File 'ext/utsname/utsname.c', line 5 static VALUE getSysname(VALUE obj) { struct utsname buf; if (uname(&buf) == -1) return Qnil; return rb_str_new_cstr(buf.sysname); } |
.version ⇒ Object
Function to return the version, or nil if uname fails
32 33 34 35 36 37 38 |
# File 'ext/utsname/utsname.c', line 32 static VALUE getVersion(VALUE obj) { struct utsname buf; if (uname(&buf) == -1) return Qnil; return rb_str_new_cstr(buf.version); } |