⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 version.c

📁 openmosix使用工具.mtop, mosmon, mps等。用于控制openmosix。openmosix 使用工具.mtop, mosmon, mps等。用于控制openmosix。openm
💻 C
字号:
/* Suite version information for procps utilities * Copyright (c) 1995 Martin Schulze <joey@infodrom.north.de> * Ammended by cblake to only export the function symbol. * Redistributable under the terms of the * GNU Library General Public License; see ../COPYING.LIB */#include <stdio.h>#include <stdlib.h>#if 0#ifdef MINORVERSIONchar procps_version[] = "procps version " VERSION "." SUBVERSION "." MINORVERSION;#elsechar procps_version[] = "procps version " VERSION "." SUBVERSION;#endif#elsechar procps_version[] = "procps version 1.2.9";#endifvoid display_version(void) {    fprintf(stdout, "%s\n", procps_version);}/* Linux kernel version information for procps utilities * Copyright (c) 1996 Charles Blake <cblake@bbn.com> */#include <sys/utsname.h>#define LINUX_VERSION(x,y,z)   (0x10000*(x) + 0x100*(y) + z)int linux_version_code = 0;void set_linux_version(void) {    static struct utsname uts;    int x = 0, y = 0, z = 0;	/* cleared in case sscanf() < 3 */        if (linux_version_code) return;    if (uname(&uts) == -1)	/* failure most likely implies impending death */	exit(1);    if (sscanf(uts.release, "%d.%d.%d", &x, &y, &z) < 3)	fprintf(stderr,		/* *very* unlikely to happen by accident */		"Non-standard uts for running kernel:\n"		"release %s=%d.%d.%d gives version code %d\n",		uts.release, x, y, z, LINUX_VERSION(x,y,z));    linux_version_code = LINUX_VERSION(x, y, z);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -