Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
a167ba50
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a167ba50
编写于
11月 29, 2009
作者:
A
Aurelien Jarno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add support for GNU/kFreeBSD
Signed-off-by:
N
Aurelien Jarno
<
aurelien@aurel32.net
>
上级
3098b9fd
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
39 addition
and
42 deletion
+39
-42
block/raw-posix.c
block/raw-posix.c
+8
-8
configure
configure
+5
-1
exec.c
exec.c
+1
-1
fpu/softfloat-native.c
fpu/softfloat-native.c
+1
-1
fpu/softfloat-native.h
fpu/softfloat-native.h
+4
-2
net.c
net.c
+1
-4
net/tap-bsd.c
net/tap-bsd.c
+2
-5
qemu-char.c
qemu-char.c
+11
-8
savevm.c
savevm.c
+1
-4
usb-bsd.c
usb-bsd.c
+2
-2
vl.c
vl.c
+3
-6
未找到文件。
block/raw-posix.c
浏览文件 @
a167ba50
...
...
@@ -51,7 +51,7 @@
#include <linux/cdrom.h>
#include <linux/fd.h>
#endif
#if
def __FreeBSD__
#if
defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
#include <signal.h>
#include <sys/disk.h>
#include <sys/cdio.h>
...
...
@@ -124,7 +124,7 @@ typedef struct BDRVRawState {
static
int
fd_open
(
BlockDriverState
*
bs
);
static
int64_t
raw_getlength
(
BlockDriverState
*
bs
);
#if defined(__FreeBSD__)
#if defined(__FreeBSD__)
|| defined(__FreeBSD_kernel__)
static
int
cdrom_reopen
(
BlockDriverState
*
bs
);
#endif
...
...
@@ -636,7 +636,7 @@ static int64_t raw_getlength(BlockDriverState *bs)
int64_t
size
;
#ifdef CONFIG_BSD
struct
stat
sb
;
#if
def __FreeBSD__
#if
defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
int
reopened
=
0
;
#endif
#endif
...
...
@@ -651,7 +651,7 @@ static int64_t raw_getlength(BlockDriverState *bs)
return
ret
;
#ifdef CONFIG_BSD
#if
def __FreeBSD__
#if
defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
again:
#endif
if
(
!
fstat
(
fd
,
&
sb
)
&&
(
S_IFCHR
&
sb
.
st_mode
))
{
...
...
@@ -672,7 +672,7 @@ again:
#else
size
=
lseek
(
fd
,
0LL
,
SEEK_END
);
#endif
#if
def __FreeBSD__
#if
defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
switch
(
s
->
type
)
{
case
FTYPE_CD
:
/* XXX FreeBSD acd returns UINT_MAX sectors for an empty drive */
...
...
@@ -957,7 +957,7 @@ static BlockDriverAIOCB *hdev_aio_ioctl(BlockDriverState *bs,
return
paio_ioctl
(
bs
,
s
->
fd
,
req
,
buf
,
cb
,
opaque
);
}
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__)
|| defined(__FreeBSD_kernel__)
static
int
fd_open
(
BlockDriverState
*
bs
)
{
BDRVRawState
*
s
=
bs
->
opaque
;
...
...
@@ -1213,7 +1213,7 @@ static BlockDriver bdrv_host_cdrom = {
};
#endif
/* __linux__ */
#if
def __FreeBSD__
#if
defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
static
int
cdrom_open
(
BlockDriverState
*
bs
,
const
char
*
filename
,
int
flags
)
{
BDRVRawState
*
s
=
bs
->
opaque
;
...
...
@@ -1342,7 +1342,7 @@ static void bdrv_raw_init(void)
bdrv_register
(
&
bdrv_host_floppy
);
bdrv_register
(
&
bdrv_host_cdrom
);
#endif
#if
def __FreeBSD__
#if
defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
bdrv_register
(
&
bdrv_host_cdrom
);
#endif
}
...
...
configure
浏览文件 @
a167ba50
...
...
@@ -255,27 +255,32 @@ MINGW32*)
audio_drv_list
=
"winwave"
;;
GNU/kFreeBSD
)
bsd
=
"yes"
audio_drv_list
=
"oss"
audio_possible_drivers
=
"oss sdl esd pa"
;;
FreeBSD
)
bsd
=
"yes"
make
=
"gmake"
audio_drv_list
=
"oss"
audio_possible_drivers
=
"oss sdl esd pa"
;;
DragonFly
)
bsd
=
"yes"
make
=
"gmake"
audio_drv_list
=
"oss"
audio_possible_drivers
=
"oss sdl esd pa"
;;
NetBSD
)
bsd
=
"yes"
make
=
"gmake"
audio_drv_list
=
"oss"
audio_possible_drivers
=
"oss sdl esd"
oss_lib
=
"-lossaudio"
;;
OpenBSD
)
bsd
=
"yes"
make
=
"gmake"
audio_drv_list
=
"oss"
audio_possible_drivers
=
"oss sdl esd"
oss_lib
=
"-lossaudio"
...
...
@@ -360,7 +365,6 @@ esac
if
[
"
$bsd
"
=
"yes"
]
;
then
if
[
"
$darwin
"
!=
"yes"
]
;
then
make
=
"gmake"
usb
=
"bsd"
fi
bsd_user
=
"yes"
...
...
exec.c
浏览文件 @
a167ba50
...
...
@@ -463,7 +463,7 @@ static void code_gen_alloc(unsigned long tb_size)
exit
(
1
);
}
}
#elif defined(__FreeBSD__) || defined(__DragonFly__)
#elif defined(__FreeBSD__) || defined(__
FreeBSD_kernel__) || defined(__
DragonFly__)
{
int
flags
;
void
*
addr
=
NULL
;
...
...
fpu/softfloat-native.c
浏览文件 @
a167ba50
...
...
@@ -9,7 +9,7 @@
void
set_float_rounding_mode
(
int
val
STATUS_PARAM
)
{
STATUS
(
float_rounding_mode
)
=
val
;
#if
defined(CONFIG_BSD) && !defined(__APPLE__) ||
\
#if
(defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)) ||
\
(defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10)
fpsetround
(
val
);
#elif defined(__arm__)
...
...
fpu/softfloat-native.h
浏览文件 @
a167ba50
/* Native implementation of soft float functions */
#include <math.h>
#if (defined(CONFIG_BSD) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS)
#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)) \
|| defined(CONFIG_SOLARIS)
#include <ieeefp.h>
#define fabsf(f) ((float)fabs(f))
#else
...
...
@@ -112,7 +113,8 @@ typedef union {
/*----------------------------------------------------------------------------
| Software IEC/IEEE floating-point rounding mode.
*----------------------------------------------------------------------------*/
#if (defined(CONFIG_BSD) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS)
#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)) \
|| defined(CONFIG_SOLARIS)
#if defined(__OpenBSD__)
#define FE_RM FP_RM
#define FE_RP FP_RP
...
...
net.c
浏览文件 @
a167ba50
...
...
@@ -48,14 +48,11 @@
#include <sys/select.h>
#ifdef CONFIG_BSD
#include <sys/stat.h>
#if defined(__FreeBSD__) || defined(__DragonFly__)
#if defined(__FreeBSD__) || defined(__
FreeBSD_kernel__) || defined(__
DragonFly__)
#include <libutil.h>
#else
#include <util.h>
#endif
#elif defined (__GLIBC__) && defined (__FreeBSD_kernel__)
#include <freebsd/stdlib.h>
#else
#ifdef __linux__
#include <pty.h>
#include <malloc.h>
...
...
net/tap-bsd.c
浏览文件 @
a167ba50
...
...
@@ -30,14 +30,11 @@
#include <net/if_tap.h>
#endif
#if defined(__FreeBSD__) || defined(__DragonFly__)
#if defined(__FreeBSD__) || defined(__
FreeBSD_kernel__) || defined(__
DragonFly__)
#include <libutil.h>
#else
#include <util.h>
#endif
#if defined (__GLIBC__) && defined (__FreeBSD_kernel__)
#include <freebsd/stdlib.h>
#endif
#if defined(__OpenBSD__)
#include <util.h>
...
...
@@ -49,7 +46,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required
char
*
dev
;
struct
stat
s
;
#if
def __FreeBSD__
#if
defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
/* if no ifname is given, always start the search from tap0. */
int
i
;
char
dname
[
100
];
...
...
qemu-char.c
浏览文件 @
a167ba50
...
...
@@ -57,10 +57,13 @@
#include <sys/select.h>
#ifdef CONFIG_BSD
#include <sys/stat.h>
#if
def __FreeBSD__
#if
defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include <libutil.h>
#include <dev/ppbus/ppi.h>
#include <dev/ppbus/ppbconf.h>
#if defined(__GLIBC__)
#include <pty.h>
#endif
#elif defined(__DragonFly__)
#include <libutil.h>
#include <dev/misc/ppi/ppi.h>
...
...
@@ -68,9 +71,6 @@
#else
#include <util.h>
#endif
#elif defined (__GLIBC__) && defined (__FreeBSD_kernel__)
#include <freebsd/stdlib.h>
#else
#ifdef __linux__
#include <pty.h>
...
...
@@ -820,7 +820,8 @@ static void cfmakeraw (struct termios *termios_p)
#endif
#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
|| defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|| defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \
|| defined(__GLIBC__)
typedef
struct
{
int
fd
;
...
...
@@ -1336,7 +1337,7 @@ static CharDriverState *qemu_chr_open_pp(QemuOpts *opts)
}
#endif
/* __linux__ */
#if defined(__FreeBSD__) || defined(__DragonFly__)
#if defined(__FreeBSD__) || defined(__
FreeBSD_kernel__) || defined(__
DragonFly__)
static
int
pp_ioctl
(
CharDriverState
*
chr
,
int
cmd
,
void
*
arg
)
{
int
fd
=
(
int
)
chr
->
opaque
;
...
...
@@ -2380,10 +2381,12 @@ static const struct {
{
.
name
=
"braille"
,
.
open
=
chr_baum_init
},
#endif
#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
|| defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|| defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \
|| defined(__FreeBSD_kernel__)
{
.
name
=
"tty"
,
.
open
=
qemu_chr_open_tty
},
#endif
#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) \
|| defined(__FreeBSD_kernel__)
{
.
name
=
"parport"
,
.
open
=
qemu_chr_open_pp
},
#endif
};
...
...
savevm.c
浏览文件 @
a167ba50
...
...
@@ -48,14 +48,11 @@
#include <sys/select.h>
#ifdef CONFIG_BSD
#include <sys/stat.h>
#if defined(__FreeBSD__) || defined(__DragonFly__)
#if defined(__FreeBSD__) || defined(__
FreeBSD_kernel__) || defined(__
DragonFly__)
#include <libutil.h>
#else
#include <util.h>
#endif
#elif defined (__GLIBC__) && defined (__FreeBSD_kernel__)
#include <freebsd/stdlib.h>
#else
#ifdef __linux__
#include <pty.h>
#include <malloc.h>
...
...
usb-bsd.c
浏览文件 @
a167ba50
...
...
@@ -335,7 +335,7 @@ USBDevice *usb_host_device_open(const char *devname)
return
NULL
;
}
#if defined(__FreeBSD__) || defined(__DragonFly__)
#if defined(__FreeBSD__) || defined(__
FreeBSD_kernel__) || defined(__
DragonFly__)
snprintf
(
ctlpath
,
PATH_MAX
,
"/dev/%s"
,
bus_info
.
udi_devnames
[
0
]);
#else
snprintf
(
ctlpath
,
PATH_MAX
,
"/dev/%s.00"
,
bus_info
.
udi_devnames
[
0
]);
...
...
@@ -437,7 +437,7 @@ static int usb_host_scan(void *opaque, USBScanFunc *func)
if
(
strncmp
(
bus_info
.
udi_devnames
[
0
],
"ugen"
,
4
)
!=
0
)
continue
;
#if defined(__FreeBSD__) || defined(__DragonFly__)
#if defined(__FreeBSD__) || defined(__
FreeBSD_kernel__) || defined(__
DragonFly__)
snprintf
(
devbuf
,
sizeof
(
devbuf
)
-
1
,
"/dev/%s"
,
bus_info
.
udi_devnames
[
0
]);
#else
snprintf
(
devbuf
,
sizeof
(
devbuf
)
-
1
,
"/dev/%s.00"
,
bus_info
.
udi_devnames
[
0
]);
...
...
vl.c
浏览文件 @
a167ba50
...
...
@@ -50,14 +50,11 @@
#include <sys/select.h>
#ifdef CONFIG_BSD
#include <sys/stat.h>
#if defined(__FreeBSD__) || defined(__DragonFly__)
#if defined(__FreeBSD__) || defined(__
FreeBSD_kernel__) || defined(__
DragonFly__)
#include <libutil.h>
#else
#include <util.h>
#endif
#elif defined (__GLIBC__) && defined (__FreeBSD_kernel__)
#include <freebsd/stdlib.h>
#else
#ifdef __linux__
#include <pty.h>
#include <malloc.h>
...
...
@@ -569,7 +566,7 @@ static void init_get_clock(void)
{
use_rt_clock
=
0
;
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000) \
|| defined(__DragonFly__)
|| defined(__DragonFly__)
|| defined(__FreeBSD_kernel__)
{
struct
timespec
ts
;
if
(
clock_gettime
(
CLOCK_MONOTONIC
,
&
ts
)
==
0
)
{
...
...
@@ -582,7 +579,7 @@ static void init_get_clock(void)
static
int64_t
get_clock
(
void
)
{
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000) \
|| defined(__DragonFly__)
|| defined(__DragonFly__)
|| defined(__FreeBSD_kernel__)
if
(
use_rt_clock
)
{
struct
timespec
ts
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
ts
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录