svn commit: r274383 - head/contrib/hyperv/tools

Xin LI delphij at FreeBSD.org
Tue Nov 11 16:49:34 UTC 2014


Author: delphij
Date: Tue Nov 11 16:49:33 2014
New Revision: 274383
URL: https://svnweb.freebsd.org/changeset/base/274383

Log:
  Test errno against EEXIST as well.
  
  MFC after:	3 days

Modified:
  head/contrib/hyperv/tools/hv_kvp_daemon.c

Modified: head/contrib/hyperv/tools/hv_kvp_daemon.c
==============================================================================
--- head/contrib/hyperv/tools/hv_kvp_daemon.c	Tue Nov 11 14:59:46 2014	(r274382)
+++ head/contrib/hyperv/tools/hv_kvp_daemon.c	Tue Nov 11 16:49:33 2014	(r274383)
@@ -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);
 	}


More information about the svn-src-all mailing list