.TH "KDK_FAN_GET_INFORMATION" 3 "Fri Aug 25 2023" "Linux Programmer's Manual" \" .SH NAME kdk_fan_get_information - 获取风扇的信息 .SH SYNOPSIS .nf .B #include .sp .BI "extern char** kdk_fan_get_information();" .sp Link with \fI\-lkyfan\fP. .SH "Detailed Description" The main function of the interface is to obtain the fan information. .SH "RETURN VALUE" On success, returns a list of fan information of type char*, including name and speed, ending with a .BR NULL string; Generated by .I alloc and needs to be recycled by .BR kdk_fan_freeall .PP On error, return .BR NULL. .SH EXAMPLES .EX #include "libkyfan.h" #include #include int main() { char **fan = kdk_fan_get_information(); int index = 0; while (fan[index]) { printf("%s\n", fan[index]); index++; } kdk_fan_freeall(fan); return 0; } .SH "CONFORMING TO" These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: .BR kdk_fan_freeall (). .SH "SEE ALSO" .BR kdk_fan_freeall (3).