Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
53740f90
T
Third Party Musl
项目概览
OpenHarmony
/
Third Party Musl
大约 1 年 前同步成功
通知
37
Star
125
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Musl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
53740f90
编写于
8月 11, 2021
作者:
O
openharmony_ci
提交者:
Gitee
8月 11, 2021
浏览文件
操作
浏览文件
下载
差异文件
!72 fix fstatfs api
Merge pull request !72 from wcc/fstatfs
上级
7bced872
4d5e0a5d
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
0 addition
and
82 deletion
+0
-82
porting/liteos_a/user/src/stat/statvfs.c
porting/liteos_a/user/src/stat/statvfs.c
+0
-68
porting/liteos_a/user/src/unistd/renameat.c
porting/liteos_a/user/src/unistd/renameat.c
+0
-14
未找到文件。
porting/liteos_a/user/src/stat/statvfs.c
已删除
100644 → 0
浏览文件 @
7bced872
#include <sys/statvfs.h>
#include <sys/statfs.h>
#include <unsupported_api.h>
#include "syscall.h"
static
int
__statfs
(
const
char
*
path
,
struct
statfs
*
buf
)
{
*
buf
=
(
struct
statfs
){
0
};
#ifdef SYS_statfs64
return
syscall
(
SYS_statfs64
,
path
,
sizeof
*
buf
,
buf
);
#else
return
syscall
(
SYS_statfs
,
path
,
buf
);
#endif
}
static
int
__fstatfs
(
int
fd
,
struct
statfs
*
buf
)
{
unsupported_api
(
__FUNCTION__
);
*
buf
=
(
struct
statfs
){
0
};
#ifdef SYS_fstatfs64
return
syscall
(
SYS_fstatfs64
,
fd
,
sizeof
*
buf
,
buf
);
#else
return
syscall
(
SYS_fstatfs
,
fd
,
buf
);
#endif
}
weak_alias
(
__statfs
,
statfs
);
weak_alias
(
__fstatfs
,
fstatfs
);
static
void
fixup
(
struct
statvfs
*
out
,
const
struct
statfs
*
in
)
{
*
out
=
(
struct
statvfs
){
0
};
out
->
f_bsize
=
in
->
f_bsize
;
out
->
f_frsize
=
in
->
f_frsize
?
in
->
f_frsize
:
in
->
f_bsize
;
out
->
f_blocks
=
in
->
f_blocks
;
out
->
f_bfree
=
in
->
f_bfree
;
out
->
f_bavail
=
in
->
f_bavail
;
out
->
f_files
=
in
->
f_files
;
out
->
f_ffree
=
in
->
f_ffree
;
out
->
f_favail
=
in
->
f_ffree
;
out
->
f_fsid
=
in
->
f_fsid
.
__val
[
0
];
out
->
f_flag
=
in
->
f_flags
;
out
->
f_namemax
=
in
->
f_namelen
;
}
int
statvfs
(
const
char
*
restrict
path
,
struct
statvfs
*
restrict
buf
)
{
struct
statfs
kbuf
;
if
(
__statfs
(
path
,
&
kbuf
)
<
0
)
return
-
1
;
fixup
(
buf
,
&
kbuf
);
return
0
;
}
int
fstatvfs
(
int
fd
,
struct
statvfs
*
buf
)
{
struct
statfs
kbuf
;
unsupported_api
(
__FUNCTION__
);
if
(
__fstatfs
(
fd
,
&
kbuf
)
<
0
)
return
-
1
;
fixup
(
buf
,
&
kbuf
);
return
0
;
}
weak_alias
(
statvfs
,
statvfs64
);
weak_alias
(
statfs
,
statfs64
);
weak_alias
(
fstatvfs
,
fstatvfs64
);
weak_alias
(
fstatfs
,
fstatfs64
);
porting/liteos_a/user/src/unistd/renameat.c
已删除
100644 → 0
浏览文件 @
7bced872
#include <stdio.h>
#include <unsupported_api.h>
#include "syscall.h"
int
renameat
(
int
oldfd
,
const
char
*
old
,
int
newfd
,
const
char
*
new
)
{
unsupported_api
(
__FUNCTION__
);
#ifdef SYS_renameat
return
syscall
(
SYS_renameat
,
oldfd
,
old
,
newfd
,
new
);
#else
return
syscall
(
SYS_renameat2
,
oldfd
,
old
,
newfd
,
new
,
0
);
#endif
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录