📄 hr_other.c
字号:
/* * Host Resources MIB - other device implementation - hr_other.c * */#include <net-snmp/net-snmp-config.h>#include "host_res.h"#include "hr_other.h"#if HAVE_UNISTD_H#include <unistd.h>#endifvoid Init_HR_CoProc(void);int Get_Next_HR_CoProc(void);const char *describe_coproc(int);voidinit_hr_other(void){ init_device[HRDEV_COPROC] = Init_HR_CoProc; next_device[HRDEV_COPROC] = Get_Next_HR_CoProc; device_descr[HRDEV_COPROC] = describe_coproc;}static int done_coProc;voidInit_HR_CoProc(void){#ifdef solaris2 /* * Sun didn't sell many Windows Co-processor boards * somebody who has one will have to figure out how to discover it * so assume there are none */ done_coProc = 1;#else done_coProc = 0;#endif}intGet_Next_HR_CoProc(void){ /* * How to identify the presence of a co-processor ? */ if (done_coProc != 1) { done_coProc = 1; return (HRDEV_COPROC << HRDEV_TYPE_SHIFT); } else return -1;}const char *describe_coproc(int idx){ return ("Guessing that there's a floating point co-processor");}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -