]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Test errno against EEXIST as well.
authordelphij <delphij@FreeBSD.org>
Tue, 11 Nov 2014 16:49:33 +0000 (16:49 +0000)
committerdelphij <delphij@FreeBSD.org>
Tue, 11 Nov 2014 16:49:33 +0000 (16:49 +0000)
MFC after: 3 days

contrib/hyperv/tools/hv_kvp_daemon.c

index 3da0e70ac5da1a9adbc55ef8d09bcff107fb39da..1c31d3f9b626e593b85b1269d2ba357769fd3826 100644 (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);
        }