summaryrefslogtreecommitdiffstats
path: root/luni/src/main/java/android/system/StructUtsname.java
diff options
context:
space:
mode:
Diffstat (limited to 'luni/src/main/java/android/system/StructUtsname.java')
-rw-r--r--luni/src/main/java/android/system/StructUtsname.java40
1 files changed, 23 insertions, 17 deletions
diff --git a/luni/src/main/java/android/system/StructUtsname.java b/luni/src/main/java/android/system/StructUtsname.java
index 21e08bb..2b7937c 100644
--- a/luni/src/main/java/android/system/StructUtsname.java
+++ b/luni/src/main/java/android/system/StructUtsname.java
@@ -16,6 +16,8 @@
package android.system;
+import libcore.util.Objects;
+
/**
* Information returned by uname(2). Corresponds to C's
* {@code struct utsname} from
@@ -24,26 +26,30 @@ package android.system;
* @hide
*/
public final class StructUtsname {
- /** The OS name, such as "Linux". */
- public final String sysname;
+ /** The OS name, such as "Linux". */
+ public final String sysname;
+
+ /** The machine's unqualified name on some implementation-defined network. */
+ public final String nodename;
- /** The machine's unqualified name on some implementation-defined network. */
- public final String nodename;
+ /** The OS release, such as "2.6.35-27-generic". */
+ public final String release;
- /** The OS release, such as "2.6.35-27-generic". */
- public final String release;
+ /** The OS version, such as "#48-Ubuntu SMP Tue Feb 22 20:25:29 UTC 2011". */
+ public final String version;
- /** The OS version, such as "#48-Ubuntu SMP Tue Feb 22 20:25:29 UTC 2011". */
- public final String version;
+ /** The machine architecture, such as "armv7l" or "x86_64". */
+ public final String machine;
- /** The machine architecture, such as "armv7l" or "x86_64". */
- public final String machine;
+ public StructUtsname(String sysname, String nodename, String release, String version, String machine) {
+ this.sysname = sysname;
+ this.nodename = nodename;
+ this.release = release;
+ this.version = version;
+ this.machine = machine;
+ }
- public StructUtsname(String sysname, String nodename, String release, String version, String machine) {
- this.sysname = sysname;
- this.nodename = nodename;
- this.release = release;
- this.version = version;
- this.machine = machine;
- }
+ @Override public String toString() {
+ return Objects.toString(this);
+ }
}