File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 2121#pragma once
2222
2323#include "virdomainobjlist.h"
24+ #include "virhostdev.h"
2425#include "virthread.h"
2526#include "virebtables.h"
2627
@@ -80,6 +81,9 @@ struct _virCHDriver
8081
8182 /* pid file FD, ensures two copies of the driver can't use the same root */
8283 int lockFD ;
84+
85+ /* Immutable pointer to host device manager */
86+ virHostdevManagerPtr hostdevMgr ;
8387};
8488
8589virCapsPtr virCHDriverCapsInit (void );
Original file line number Diff line number Diff line change @@ -906,6 +906,7 @@ static int chStateCleanup(void)
906906 virObjectUnref (ch_driver -> xmlopt );
907907 virObjectUnref (ch_driver -> caps );
908908 virObjectUnref (ch_driver -> config );
909+ virObjectUnref (ch_driver -> hostdevMgr );
909910 virMutexDestroy (& ch_driver -> lock );
910911 VIR_FREE (ch_driver );
911912
@@ -949,6 +950,9 @@ static int chStateInitialize(bool privileged,
949950 if (!(ch_driver -> config = virCHDriverConfigNew ()))
950951 goto cleanup ;
951952
953+ if (!(ch_driver -> hostdevMgr = virHostdevManagerGetDefault ()))
954+ goto cleanup ;
955+
952956 if (chExtractVersion (ch_driver ) < 0 )
953957 goto cleanup ;
954958
You can’t perform that action at this time.
0 commit comments