syscall: update makeversion to build sysinfo properly, and add num procs
authorAlan Cox <alan@linux.intel.com>
Sun, 28 Dec 2014 23:52:26 +0000 (23:52 +0000)
committerAlan Cox <alan@linux.intel.com>
Sun, 28 Dec 2014 23:52:26 +0000 (23:52 +0000)
Also add a geometry ioctl for hd drivers (not yet wired up)

Kernel/include/kernel.h
Kernel/makeversion

index ba68911..ae57279 100644 (file)
@@ -137,6 +137,18 @@ struct  stat    /* Really only used by libc */
        uint32_t  st_ctime;
 };
 
+/* We use the Linux one for compatibility. There's no real Unix 'standard'
+   for such things */
+
+struct hd_geometry {
+       uint8_t heads;
+       uint8_t sectors;
+       uint16_t cylinders;
+       uint32_t start;
+};
+#define HDIO_GETGEO            0x0101
+#define HDIO_GET_IDENTITY      0x0102  /* Not yet implemented anywhere */
+
 /* Bit masks for i_mode and st_mode */
 
 #define OTH_EX  0001
@@ -492,7 +504,7 @@ struct sysinfoblk {
   uint8_t infosize;            /* For expandability */
   uint8_t banks;               /* Banks in our 64K (and thus pagesize) */
   uint8_t max_open;
-  uint8_t spare;
+  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 */
index 2a1bc59..356753f 100755 (executable)
@@ -9,6 +9,7 @@ struct sysinfoblk sysinfo = {
        sizeof(struct sysinfoblk),
        CONFIG_BANKS,
        UFTSIZE,
+       PTABSIZE,
        TICKSPERSEC,
        0,
        0,