Skip to content

Commit 41a177c

Browse files
liuwbryteise
authored andcommitted
ch: add scaffolding for host devices management
They are left empty for now. Make sure CH driver still builds. Content will be filled in later. Signed-off-by: Wei Liu <[email protected]>
1 parent f15e426 commit 41a177c

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

src/ch/ch_hostdev.c

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* ch_hostdev.c: Cloud Hypervisor hostdev management
3+
*
4+
* Copyright (C) 2021 Wei Liu <[email protected]>
5+
*
6+
* This library is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 2.1 of the License, or (at your option) any later version.
10+
*
11+
* This library is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public
17+
* License along with this library. If not, see
18+
* <http://www.gnu.org/licenses/>.
19+
*/
20+
21+
#include <config.h>
22+
23+
#include <fcntl.h>
24+
#include <sys/ioctl.h>
25+
26+
#include "ch_hostdev.h"
27+
#include "ch_domain.h"
28+
#include "virlog.h"
29+
#include "virerror.h"
30+
#include "viralloc.h"
31+
#include "virpci.h"
32+
#include "virusb.h"
33+
#include "virscsi.h"
34+
#include "virnetdev.h"
35+
#include "virfile.h"
36+
#include "virhostdev.h"
37+
#include "virutil.h"
38+
39+
#define VIR_FROM_THIS VIR_FROM_CH
40+
41+
VIR_LOG_INIT("ch.ch_hostdev");

src/ch/ch_hostdev.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* ch_hostdev.h: Cloud Hypervisor hostdev management
3+
*
4+
* Copyright (C) 2021 Wei Liu <[email protected]>
5+
*
6+
* This library is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 2.1 of the License, or (at your option) any later version.
10+
*
11+
* This library is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public
17+
* License along with this library. If not, see
18+
* <http://www.gnu.org/licenses/>.
19+
*/
20+
21+
#pragma once
22+
23+
#include "ch_conf.h"
24+
#include "domain_conf.h"

src/ch/meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ ch_driver_sources = [
1313
'ch_process.h',
1414
'ch_interface.c',
1515
'ch_interface.h',
16+
'ch_hostdev.c',
17+
'ch_hostdev.h',
1618
]
1719

1820
driver_source_files += files(ch_driver_sources)

0 commit comments

Comments
 (0)