KDK_GET_DISKLISK(3)

NAME
kdk_get_disklist - 获取磁盘列表信息

SYNOPSIS
#include <libkydiskinfo.h>

extern char** kdk_get_disklist();

Link with -lkydiskinfo.

Detailed Description
The kdk_get_disklist() function obtains disk list information during the call process.

RETURN VALUE
The return value is a char** type, with each string representing the absolute path of a disk and ending with a NULL character.

After completion, kdk_free_disklist() function releases a list of disk information.

EXAMPLES
    #include "libkydiskinfo.h"
    #include <stdio.h>
    int main()
    {
        char **disklist = kdk_get_disklist();
        for (int i = 0; disklist[i]; i ++)
        {
            printf("%s, disklist[i]);
        }
        kdk_free_disklist(disklist);
        return 0;
    }

CONFORMING TO
These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: kdk_get_diskinfo(), kdk_get_hard_disk(), and kdk_get_hard_disk_size().

SEE ALSO
kdk_free_disklist(3), kdk_get_diskinfo(3), kdk_free_diskinfo(3)