Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
clh: virtiofsd: check path is not empty
Browse files Browse the repository at this point in the history
Check if path is not empty this makes, this help
unit test know why the function failed.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
  • Loading branch information
jcvenegas committed Dec 20, 2019
1 parent af5c9c2 commit 2a085ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions virtcontainers/clh.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,10 @@ func (clh *cloudHypervisor) generateSocket(id string, useVsock bool) (interface{

func (clh *cloudHypervisor) setupVirtiofsd(timeout int) (remain int, err error) {

if clh.config.VirtioFSDaemon == "" {
return timeout, errors.New("Virtiofsd path is empty")
}

sockPath, perr := clh.virtioFsSocketPath(clh.id)
if perr != nil {
return 0, perr
Expand Down

0 comments on commit 2a085ee

Please sign in to comment.