summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/utsname.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-26 19:27:15 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-26 19:27:15 +0000
commit5e9b32b439627068a0292370fe595220dbfc95a0 (patch)
tree3740b62de3aaa10140867de33adad9a1fcc15b26 /cpukit/libcsupport/src/utsname.c
parentfixed Id strings (diff)
downloadrtems-5e9b32b439627068a0292370fe595220dbfc95a0.tar.bz2
posix support initially added
Diffstat (limited to '')
-rw-r--r--cpukit/libcsupport/src/utsname.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/utsname.c b/cpukit/libcsupport/src/utsname.c
new file mode 100644
index 0000000000..15bd2665f6
--- /dev/null
+++ b/cpukit/libcsupport/src/utsname.c
@@ -0,0 +1,60 @@
+/* utsname.c
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#include <sys/utsname.h>
+
+#include <rtems/score/system.h>
+#include <rtems/score/object.h>
+
+/*PAGE
+ *
+ * 4.4.1 Get System Name, P1003.1b-1993, p. 90
+ */
+
+int uname(
+ struct utsname *name
+)
+{
+ /* XXX: Here is what Solaris returns...
+ sysname = SunOS
+ nodename = merlin
+ release = 5.3
+ version = Generic_101318-12
+ machine = sun4m
+ */
+
+ strcpy( name->sysname, "RTEMS" );
+
+ sprintf( name->nodename, "Node %d\n", _Objects_Local_node );
+
+ /* XXX release string is in BAD format for this routine!!! */
+ strcpy( name->release, "3.2.0" );
+
+ /* XXX does this have any meaning for RTEMS */
+
+ strcpy( name->release, "" );
+
+ sprintf( name->machine, "%s/%s", CPU_NAME, CPU_MODEL_NAME );
+
+ return 0;
+}
+
+#ifdef NOT_IMPLEMENTED_YET
+
+/*PAGE
+ *
+ * 4.5.2 Get Process Times, P1003.1b-1993, p. 92
+ */
+
+clock_t times(
+ struct tms *buffer
+)
+{
+ return POSIX_NOT_IMPLEMENTED();
+}
+
+#endif