Test errno against EEXIST as well.

MFC after:	3 days
This commit is contained in:
Xin LI 2014-11-11 16:49:33 +00:00
parent 96699e86a3
commit 2582ba5ec3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274383

View File

@ -285,7 +285,7 @@ kvp_file_init(void)
int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK;
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");
exit(EXIT_FAILURE);
}