Commit Graph

12 Commits

Author SHA1 Message Date
Sepherosa Ziehau
c321779676 hyperv/kvp: Fix pool direcrory and file permission
PR:		209385
MFC after:	2 weeks
Sponsored by:	Microsoft
2017-05-04 01:46:04 +00:00
Sepherosa Ziehau
30c90f019f hyperv/kvp: Don't mix message status codes and function return values.
While I'm here, move message status codes to hv_utilreg.h, since they
will be used by the upcoming VSS stuffs.

Submitted by:	Hongjiang Zhang <honzhan microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8391
2016-11-02 07:18:27 +00:00
Sepherosa Ziehau
868a59a7e2 hyperv/kvp_daemon: Make poll(2) block indefinitely
Submitted by:	Jun Su <junsu microsoft com>
Reviewed by:	Dexuan Cui <decui microsoft com>, me, adrain
Approved by:	adrian
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D4762
2016-01-11 03:30:16 +00:00
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
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