Fix SVACE Issue 85/301985/1 accepted/tizen/unified/20231130.180918 accepted/tizen/unified/riscv/20231226.210845
authorAnjali Nijhara <a.nijhara@samsung.com>
Wed, 29 Nov 2023 05:34:06 +0000 (11:04 +0530)
committerAnjali Nijhara <a.nijhara@samsung.com>
Wed, 29 Nov 2023 05:34:06 +0000 (11:04 +0530)
WGID : 554015

Change-Id: Ic703a5cbc2c9c7eb4cea47a58e697bb5fc2ebf25

plugin/online-monitor/online-monitor.c

index 6f5b10d..d015956 100755 (executable)
@@ -238,12 +238,13 @@ static void start_monitoring(void)
        int rv = 0, key;
        long long value = 0;
        char bpf_file[256];
+       char error_buf[MAX_SIZE_ERROR_BUFFER] = {0, };
 
        bpf_info.map_fd = bpf_map_create(BPF_MAP_TYPE_ARRAY,"count_map", sizeof(key), sizeof(value),
                                256, NULL);
 
        if (bpf_info.map_fd < 0) {
-               DBG("failed to create map %s", strerror(errno));
+               DBG("failed to create map %s", strerror_r(errno, error_buf, MAX_SIZE_ERROR_BUFFER));
                return;
        }