Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
d9ec9c69
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d9ec9c69
编写于
4月 02, 2009
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix mingw32 portability
上级
07229259
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
3 deletion
+19
-3
ChangeLog
ChangeLog
+7
-0
configure.in
configure.in
+2
-2
src/util.c
src/util.c
+10
-1
未找到文件。
ChangeLog
浏览文件 @
d9ec9c69
Thu Apr 2 19:41:00 BST 2009 Daniel P. Berrange <berrange@redhat.com>
Mingw portability fixes
* src/util.c: Fix virFileResolveLink for Win32 platform.
Fix offset usage in safezero for mmap() and write() impls
* configure.in: Add check for readlink()
Thu Apr 2 15:18:00 CEST 2009 Daniel Veillard <veillard@redhat.com>
* docs/schemas/domain.rng: some missing disk bus values and cleanups
...
...
configure.in
浏览文件 @
d9ec9c69
...
...
@@ -72,7 +72,7 @@ dnl Use --disable-largefile if you don't want this.
AC_SYS_LARGEFILE
dnl Availability of various common functions (non-fatal if missing).
AC_CHECK_FUNCS([cfmakeraw regexec uname sched_getaffinity getuid getgid posix_fallocate mmap])
AC_CHECK_FUNCS([cfmakeraw regexec uname sched_getaffinity getuid getgid posix_fallocate mmap
readlink
])
dnl Availability of various not common threadsafe functions
AC_CHECK_FUNCS([strerror_r strtok_r getmntent_r getgrnam_r getpwuid_r])
...
...
@@ -937,8 +937,8 @@ if test "$with_storage_scsi" = "check"; then
AC_DEFINE_UNQUOTED([WITH_STORAGE_SCSI], 1,
[whether SCSI backend for storage driver is enabled])
AM_CONDITIONAL([WITH_STORAGE_SCSI], [test "$with_storage_scsi" = "yes"])
fi
AM_CONDITIONAL([WITH_STORAGE_SCSI], [test "$with_storage_scsi" = "yes"])
LIBPARTED_CFLAGS=
...
...
src/util.c
浏览文件 @
d9ec9c69
...
...
@@ -136,7 +136,7 @@ int safezero(int fd, int flags ATTRIBUTE_UNUSED, off_t offset, off_t len)
/* memset wants the mmap'ed file to be present on disk so create a
* sparse file
*/
r
=
ftruncate
(
fd
,
len
);
r
=
ftruncate
(
fd
,
offset
+
len
);
if
(
r
<
0
)
return
-
errno
;
...
...
@@ -158,6 +158,9 @@ int safezero(int fd, int flags ATTRIBUTE_UNUSED, off_t offset, off_t len)
char
*
buf
;
unsigned
long
long
remain
,
bytes
;
if
(
lseek
(
fd
,
offset
,
SEEK_SET
)
<
0
)
return
errno
;
/* Split up the write in small chunks so as not to allocate lots of RAM */
remain
=
len
;
bytes
=
1024
*
1024
;
...
...
@@ -949,6 +952,7 @@ int virFileLinkPointsTo(const char *checkLink,
int
virFileResolveLink
(
const
char
*
linkpath
,
char
**
resultpath
)
{
#ifdef HAVE_READLINK
struct
stat
st
;
char
*
buf
;
int
n
;
...
...
@@ -981,6 +985,11 @@ int virFileResolveLink(const char *linkpath,
*
resultpath
=
buf
;
return
0
;
#else
if
(
!
(
*
resultpath
=
strdup
(
linkpath
)))
return
-
ENOMEM
;
return
0
;
#endif
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录