Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
snprintf(key_file, PATH_MAX, "%s%s", node_path, dev_key_dir);
- if (mkdir(key_file, 0755) != 0)
+ if (mkdir(key_file, 0755) != 0 && errno != EEXIST)
l_error("Failed to create dir(%d): %s", errno, key_file);
for (i = 0; i < count; i++) {
iv_index--;
snprintf(src_file, PATH_MAX, "%s%s/%8.8x/%4.4x", node_path, rpl_dir,
iv_index, src);
- if (remove(src_file) < 0)
+ if (remove(src_file) < 0 && errno != ENOENT)
l_error("Failed to remove(%d): %s", errno, src_file);
return result;