---
name: "kdk_resolving_freeall"
section: "3"
platform: "linux"
package: "libkysdk-system"
version: "3.0.1.4-1"
release: "Arch Linux 2026-11-07"
platforms: ["linux"]
url: "https://carta.tech/man/kdk_resolving_freeall"
---

# kdk\_resolving\_freeall(3)

用于回收字符串列表

## NAME

kdk\_resolving\_freeall - 用于回收字符串列表

## SYNOPSIS

```
#include <libkysysinfo.h>

extern inline void kdk_resolving_freeall(char **ptr);

Link with -lkysysinfo.
```

## Detailed Description

The main function of the interface is to recycle a list of strings of type char \*\*.

The argument *ptr* is a list of strings of type char \*\*.

## RETURN VALUE

No return value

## EXAMPLES

```
#include <libkysysinfo.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
    char *res = kdk_system_get_architecture();
    printf("架构：%s0, res);
    free(res);
    res = kdk_system_get_systemName();
    printf("系统名称：%s0, res);
    free(res);
    res = kdk_system_get_version(0);
    printf("系统简略版本：%s0, res);
    free(res);
    res = kdk_system_get_version(1);
    printf("系统详细版本：%s0, res);
    free(res);
    res = kdk_system_get_kernelVersion();
    printf("内核版本：%s0, res);
    free(res);
    res = kdk_system_get_serialNumber();
    printf("序列号：%s0, res);
    free(res);
    int p;
    int d;
    int act = kdk_system_get_activationStatus(&p,&d);
    printf("--------------0);
    printf("激活状态码：%d0,act);
    printf("激活状态：%s0, act == 1 ? "已激活" : act == 0 ? "未激活" : "已过期");
    res = kdk_system_get_eUser();
    printf("当前用户：%s0, res);
    // free(res);
    res = kdk_system_get_eUser_login_time();
    printf("登录时间：%s0, res);
    res = kdk_system_get_projectName();
    printf("项目编号名：%s0, res);
    free(res);
    int zyj = kdk_system_is_zyj();
    printf("专用机：%s0, zyj == 0 ? "非专用机":"专用机");
    res = kdk_system_get_hostVirtType();
    printf("虚拟机类型：%s0, res);
    free(res);
    res = kdk_system_get_hostCloudPlatform();
    printf("云平台类型：%s0, res);
    free(res);
    version_t test = kdk_system_get_version_detaile( );
    printf("test.os_version = %s0,test.os_version);
    printf("test.update_version = %s0,test.update_version);
    char** name = kdk_system_get_resolving_power();
    // printf("name = %s0, name);
    size_t count = 0;
    while (name[count])
    {
        printf("No. %d  %s0, count + 1, name[count]);
        count ++;
    }
    kdk_resolving_freeall(name);
    char *ver = kdk_system_get_systemCategory();
    printf("系统硬件版本类别 = %s0, ver);
    free(ver);
    // ver = kdk_system_get_cloudPlatformType();
    // printf("云平台类型 = %s0, ver);
    // free(ver);
    char **ud_time = kdk_system_get_startup_time();
    count = 0;
    while (ud_time[count])
    {
        printf("开机时间 = %s0, ud_time[count]);
        count++;
    }
    kdk_resolving_freeall(ud_time);
    ud_time = kdk_system_get_shutdown_time();
    count = 0;
    while (ud_time[count])
    {
        printf("关机时间 = %s0, ud_time[count]);
        count++;
    }
    kdk_resolving_freeall(ud_time);
    res = kdk_get_host_vendor();
    printf("整机制造商 = %s0, res);
    free(res);
    res = kdk_get_host_product();
    printf("整机型号 = %s0, res);
    free(res);
    res = kdk_get_host_serial();
    printf("整机序列号 = %s0, res);
    free(res);
    res = kdk_system_get_buildTime();
    printf("构建时间：%s0, res);
    free(res);
    res = kdk_system_get_hostName();
    printf("主机名：%s0, res);
    free(res);
    printf("系统位数：%d0, kdk_system_get_word());
    struct KPci *pci = kdk_hw_get_pci_info();
    struct KPci *tmp = pci;
    while (tmp)
    {
        printf("slot path : %s0, tmp->slot_path);
        printf(" class name :%s0, tmp->class_name);
        printf(" product name :%s0, tmp->product_name);
        printf(" rev :%02x0, tmp->rev);
        printf(" subsystem name :%s0, tmp->ss_name);
        printf(" driver user :%s0, tmp->driver_use);
        printf(" modules :");
        for(int i = 0; i < tmp->module_count; i++)
        {
            printf(" %s", tmp->modules[i]);
        }
        printf("0);
        tmp = tmp->next;
    }
    kdk_hw_free_pci_info(pci);
    res = kdk_system_get_appScene();
    printf("应用场景：%s0, res);
    free(res);
    return 0;
}
```

## CONFORMING TO

These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: **kdk\_system\_get\_systemName**(), **kdk\_system\_get\_architecture**(), **kdk\_system\_get\_activationStatus**(), **kdk\_system\_get\_version**(), **kdk\_system\_get\_serialNumber**(), **kdk\_system\_get\_kernelVersion**(), **kdk\_system\_get\_eUser**(), **kdk\_system\_get\_eUser\_login\_time**(), **kdk\_system\_get\_projectName**(), **kdk\_system\_get\_projectSubName**(), **kdk\_system\_get\_productFeatures**(), **kdk\_system\_get\_hostVirtType**(), **kdk\_system\_get\_hostCloudPlatform**(), **kdk\_system\_is\_zyj**(), **kdk\_system\_get\_version\_detaile**(), **kdk\_system\_get\_resolving\_power**(), **kdk\_system\_get\_systemCategory**(), **kdk\_system\_get\_startup\_time**(), **kdk\_system\_get\_shutdown\_time**(), **kdk\_get\_host\_vendor**(), **kdk\_get\_host\_product**(), **kdk\_get\_host\_serial**(), **kdk\_system\_get\_hostName**(), **kdk\_system\_get\_word**(), **kdk\_system\_get\_buildTime**(), **kdk\_hw\_get\_pci\_info**(), **kdk\_hw\_free\_pci\_info**(), and **kdk\_system\_get\_appScene**().

## SEE ALSO

[**kdk\_system\_get\_systemName**(3)](/man/kdk_system_get_systemName/3.md), [**kdk\_system\_get\_architecture**(3)](/man/kdk_system_get_architecture/3.md), [**kdk\_system\_get\_version**(3)](/man/kdk_system_get_version/3.md), [**kdk\_system\_get\_activationStatus**(3)](/man/kdk_system_get_activationStatus/3.md), [**kdk\_system\_get\_serialNumber**(3)](/man/kdk_system_get_serialNumber/3.md), [**kdk\_system\_get\_kernelVersion**(3)](/man/kdk_system_get_kernelVersion/3.md), [**kdk\_system\_get\_eUser**(3)](/man/kdk_system_get_eUser/3.md), [**kdk\_system\_get\_eUser\_login\_time**(3)](/man/kdk_system_get_eUser_login_time/3.md), [**kdk\_system\_get\_projectName**(3)](/man/kdk_system_get_projectName/3.md), [**kdk\_system\_get\_projectSubName**(3)](/man/kdk_system_get_projectSubName/3.md), [**kdk\_system\_get\_productFeatures**(3)](/man/kdk_system_get_productFeatures/3.md), [**kdk\_system\_get\_hostVirtType**(3)](/man/kdk_system_get_hostVirtType/3.md), [**kdk\_system\_get\_hostCloudPlatform**(3)](/man/kdk_system_get_hostCloudPlatform/3.md), [**kdk\_system\_is\_zyj**(3)](/man/kdk_system_is_zyj/3.md), [**kdk\_system\_get\_version\_detaile**(3)](/man/kdk_system_get_version_detaile/3.md), [**kdk\_system\_get\_resolving\_power**(3)](/man/kdk_system_get_resolving_power/3.md), [**kdk\_system\_get\_systemCategory**(3)](/man/kdk_system_get_systemCategory/3.md), [**kdk\_system\_get\_startup\_time**(3)](/man/kdk_system_get_startup_time/3.md), [**kdk\_system\_get\_shutdown\_time**(3)](/man/kdk_system_get_shutdown_time/3.md), [**kdk\_get\_host\_vendor**(3)](/man/kdk_get_host_vendor/3.md), [**kdk\_get\_host\_product**(3)](/man/kdk_get_host_product/3.md), [**kdk\_get\_host\_serial**(3)](/man/kdk_get_host_serial/3.md), [**kdk\_system\_get\_hostName**(3)](/man/kdk_system_get_hostName/3.md), [**kdk\_system\_get\_word**(3)](/man/kdk_system_get_word/3.md), [**kdk\_system\_get\_buildTime**(3)](/man/kdk_system_get_buildTime/3.md), [**kdk\_hw\_get\_pci\_info**(3)](/man/kdk_hw_get_pci_info/3.md), [**kdk\_hw\_free\_pci\_info**(3)](/man/kdk_hw_free_pci_info/3.md), and [**kdk\_system\_get\_appScene**(3)](/man/kdk_system_get_appScene/3.md).
