Test errno against EEXIST as well.
MFC after: 3 days
This commit is contained in:
parent
96699e86a3
commit
2582ba5ec3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274383
@ -285,7 +285,7 @@ kvp_file_init(void)
|
|||||||
int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK;
|
int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK;
|
||||||
|
|
||||||
if (mkdir("/var/db/hyperv/pool", S_IRUSR | S_IWUSR | S_IROTH) < 0 &&
|
if (mkdir("/var/db/hyperv/pool", S_IRUSR | S_IWUSR | S_IROTH) < 0 &&
|
||||||
errno != EISDIR) {
|
(errno != EEXIST && errno != EISDIR)) {
|
||||||
KVP_LOG(LOG_ERR, " Failed to create /var/db/hyperv/pool\n");
|
KVP_LOG(LOG_ERR, " Failed to create /var/db/hyperv/pool\n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user