From: Alan Cox Date: Sun, 28 Dec 2014 23:52:26 +0000 (+0000) Subject: syscall: update makeversion to build sysinfo properly, and add num procs X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=03870ef8beb6287df6f20d07dcabb19f5f37f23e;p=FUZIX.git syscall: update makeversion to build sysinfo properly, and add num procs Also add a geometry ioctl for hd drivers (not yet wired up) --- diff --git a/Kernel/include/kernel.h b/Kernel/include/kernel.h index ba689119..ae572790 100644 --- a/Kernel/include/kernel.h +++ b/Kernel/include/kernel.h @@ -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 */ diff --git a/Kernel/makeversion b/Kernel/makeversion index 2a1bc590..356753f1 100755 --- a/Kernel/makeversion +++ b/Kernel/makeversion @@ -9,6 +9,7 @@ struct sysinfoblk sysinfo = { sizeof(struct sysinfoblk), CONFIG_BANKS, UFTSIZE, + PTABSIZE, TICKSPERSEC, 0, 0,