From: Ben Gras Date: Fri, 8 Jul 2005 17:24:49 +0000 (+0000) Subject: Added some data for the new log device. X-Git-Tag: v3.1.0~640 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doxygen.log?a=commitdiff_plain;h=dd31785aa69085dc02cc6420db8c4c04b0274baf;p=minix.git Added some data for the new log device. --- diff --git a/include/minix/com.h b/include/minix/com.h index c319ad9b6..bac384167 100755 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -43,13 +43,14 @@ #define USR8139 (PRINTER + ENABLE_RTL8139) /* Realtek RTL8139 */ #define FXP (USR8139 + ENABLE_FXP) /* Intel Pro/100 */ #define DPETH (FXP + ENABLE_DPETH) /* ISA Network task */ -#define INIT_PROC_NR (DPETH + 1) /* init -- goes multiuser */ +#define LOG_PROC_NR (DPETH + ENABLE_LOG) /* log device */ +#define INIT_PROC_NR (LOG_PROC_NR + 1) /* init -- goes multiuser */ /* Number of processes contained in the system image. */ #define IMAGE_SIZE (NR_TASKS + \ 5 + ENABLE_AT_WINI + ENABLE_FLOPPY + \ ENABLE_PRINTER + ENABLE_RTL8139 + ENABLE_FXP + \ - ENABLE_DPETH + 1 ) + ENABLE_DPETH + ENABLE_LOG + 1 ) /*===========================================================================* @@ -139,6 +140,9 @@ #define INET_MAJOR 7 /* major device no. for inet */ +#define LOG_MAJOR 15 /* major device no. for LOG */ +#define IS_KLOG_DEV 0 /* minor device for /dev/klog */ + /* Full device numbers that are special to the boot monitor and FS. */ # define DEV_RAM 0x0100 /* device number of /dev/ram */ # define DEV_BOOT 0x0104 /* device number of /dev/boot */ diff --git a/include/minix/config.h b/include/minix/config.h index 2cb996b18..a43189a2b 100755 --- a/include/minix/config.h +++ b/include/minix/config.h @@ -99,6 +99,8 @@ #define ENABLE_RTL8139 1 /* enable Realtek 8139 (rtl8139) */ #define ENABLE_FXP 1 /* enable Intel Pro/100 (fxp) */ +#define ENABLE_LOG 1 /* /dev/klog */ + /* Include or exclude backwards compatibility code. */ #define ENABLE_BINCOMPAT 0 /* for binaries using obsolete calls */ #define ENABLE_SRCCOMPAT 0 /* for sources using obsolete calls */ @@ -118,6 +120,8 @@ #define ENABLE_USERBIOS 0 /* enable user mode BIOS calls */ #define ENABLE_USERIOPL 0 /* enable CPU's IOPL bits for /dev/(k)mem */ +#define PRINTF_PROC IS_PROC_NR + /* NR_CONS, NR_RS_LINES, and NR_PTYS determine the number of terminals the * system can handle. */ diff --git a/include/sys/select.h b/include/sys/select.h index 96f7cc015..a27ac59f5 100755 --- a/include/sys/select.h +++ b/include/sys/select.h @@ -31,7 +31,7 @@ typedef struct { _PROTOTYPE( int select, (int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout) ); -#define FD_ZERO(s) do { memset((s), sizeof(s), 0); } while(0) +#define FD_ZERO(s) do { int _i; for(_i = 0; _i < _FDSETWORDS; _i++) { (s)->_fdsetval[_i] = 0; } } while(0) #define FD_SET(f, s) do { (s)->_fdsetval[_FD_BITWORD(f)] |= _FD_BITMASK(f); } while(0) #define FD_CLR(f, s) do { (s)->_fdsetval[_FD_BITWORD(f)] &= ~(_FD_BITMASK(f)); } while(0) #define FD_ISSET(f, s) ((s)->_fdsetval[_FD_BITWORD(f)] & _FD_BITMASK(f))