Commit Graph

10 Commits

Author SHA1 Message Date
Pedro F. Giffuni
6460ee789a Appease gcc-4.2
It needs to die, but it resists mipsteriously.

Submitted by:	Oliver Pinter
2015-08-20 21:49:59 +00:00
Xin LI
2582ba5ec3 Test errno against EEXIST as well.
MFC after:	3 days
2014-11-11 16:49:33 +00:00
Xin LI
a31070e90d Rename variable name from 'index' to 'idx' to avoid shadowing index(3).
Noticed by:	dim
MFC after:	2 weeks
2014-11-11 05:49:57 +00:00
Xin LI
1545452c54 Remove an extra copy of hv_kvp_daemon(8) [1].
While I'm there also correct typos in OptionalObsoleteFiles and add
information of the command line options for hv_kvp_daemon(8).

Reported by:	jmg [1]
Reviewed by:	jmg
MFC after:	2 weeks
2014-10-27 21:29:42 +00:00
Xin LI
97d15a9372 Use a char * as iterator over a bounded string.
MFC after:	1 week
2014-09-25 22:22:57 +00:00
Xin LI
a6733ed126 Use strlcpy(). I don't believe these are real problems but it's better
to use a safe idiom.

Reported by:	Coverity
CID:		1238914
MFC after:	1 week
2014-09-25 22:22:54 +00:00
Xin LI
a2cf0c3c61 Refactor the code a little bit to avoid NULL deference when
allocation was failed.

Reported by:	Coverity
CID:		1238915
MFC after:	1 week
2014-09-25 22:22:51 +00:00
Xin LI
0a8534f083 Plug a file descriptor leak.
Reported by:	Coverity
CID:		1238916
MFC after:	1 week
2014-09-25 22:22:48 +00:00
Xin LI
be930504be Being able to access a path do not necessarily mean we have access
to a directory. So instead of doing this, we just call mkdir(2)
directly and test if the returned value is 0 or errno is EISDIR.

Reported by:	Coverity
CID:		1238925
MFC after:	1 week
2014-09-25 22:22:43 +00:00
Xin LI
e72055b7fe Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,
many thanks for their continued support of FreeBSD.

While I'm there, also implement a new build knob, WITHOUT_HYPERV to
disable building and installing of the HyperV utilities when necessary.

The HyperV utilities are only built for i386 and amd64 targets.

This is a stable/10 candidate for inclusion with 10.1-RELEASE.

Submitted by:	Wei Hu <weh microsoft com>
MFC after:	1 week
2014-09-13 02:15:31 +00:00