uname: fix the 6809 sysinfo problem
authorAlan Cox <alan@linux.intel.com>
Thu, 1 Sep 2016 21:16:00 +0000 (22:16 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 1 Sep 2016 21:16:00 +0000 (22:16 +0100)
Kernel/Makefile
Kernel/include/kernel.h
Kernel/start.c
Kernel/syscall_fs3.c

index 43dcee6..05ea937 100644 (file)
@@ -170,8 +170,10 @@ $(CS5OBJS): %$(BINEXT): %.c
 $(AOBJS): %$(BINEXT): %$(ASMEXT)
        $(CROSS_AS) $(ASOPTS) -o $*$(BINEXT) $<
 
-version.c: makeversion
-       ./makeversion $(VERSION) $(SUBVERSION) $(TARGET)
+version.c: tools/makeversion
+       tools/makeversion $(VERSION) $(SUBVERSION) $(TARGET)
+
+tools/makeversion: tools/makeversion.c
 
 tools/filesizes: tools/filesizes.c
 
index a2cf72f..6b8e9ee 100644 (file)
@@ -648,22 +648,7 @@ struct s_argblk {
 /*
  *     System info shared with user space
  */
-struct sysinfoblk {
-  uint8_t infosize;            /* For expandability */
-  uint8_t banks;               /* Banks in our 64K (and thus pagesize) */
-  uint8_t max_open;
-  uint8_t nproc;               /* Number of processes */
-  uint16_t ticks;              /* Tick rate in HZ */
-  uint16_t memk;               /* Memory in KB */
-  uint16_t usedk;              /* Used memory in KB */
-  uint16_t config;             /* Config flag mask */
-#define CONF_PROFIL            1
-#define CONF_NET               2       /* Hah.. 8) */
-#define CONF_LEVEL_2           4
-  uint16_t loadavg[3];
-  uint32_t spare2;
-                               /* Followed by uname strings */
-};
+#include <sysinfoblk.h>
 
 /* Select: if we do the map optimisation trick then we will want one bit free
    for optimising, so ideal PTABSIZE will become 1 below a multiple of 8 */
index 41dab58..6545ceb 100644 (file)
@@ -322,7 +322,7 @@ void fuzix_main(void)
                        "Copyright (c) 1997-2001 by Arcady Schekochikhin, Adriano C. R. da Cunha\n"
                        "Copyright (c) 2013-2015 Will Sowerbutts <will@sowerbutts.com>\n"
                        "Copyright (c) 2014-2015 Alan Cox <alan@etchedpixels.co.uk>\nDevboot\n",
-                       uname_str);
+                       sysinfo.uname);
 
 #ifndef SWAPDEV
 #ifdef PROC_SIZE
index 1473f17..634c9c6 100644 (file)
@@ -294,7 +294,7 @@ with node name. Rest is up to the libc.
 
 arg_t _uname(void)
 {
-        uint16_t size = sizeof(sysinfo) + uname_len;
+        uint16_t size = sizeof(sysinfo);
         if (size > len)
                 size = len;
        sysinfo.memk = procmem;