Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2301_76519099
rt-thread
提交
d0d239cd
R
rt-thread
项目概览
2301_76519099
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
3
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d0d239cd
编写于
3月 10, 2014
作者:
B
Bernard Xiong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[DFS] fix compiling warning for NFS file system
上级
306e1ac4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
23 addition
and
61 deletion
+23
-61
components/dfs/filesystems/nfs/mount.h
components/dfs/filesystems/nfs/mount.h
+2
-2
components/dfs/filesystems/nfs/mount_xdr.c
components/dfs/filesystems/nfs/mount_xdr.c
+2
-2
components/dfs/filesystems/nfs/nfs.h
components/dfs/filesystems/nfs/nfs.h
+3
-3
components/dfs/filesystems/nfs/nfs_xdr.c
components/dfs/filesystems/nfs/nfs_xdr.c
+3
-3
components/dfs/filesystems/nfs/rpc/xdr.c
components/dfs/filesystems/nfs/rpc/xdr.c
+13
-51
未找到文件。
components/dfs/filesystems/nfs/mount.h
浏览文件 @
d0d239cd
...
...
@@ -20,7 +20,7 @@ extern "C" {
#define FHSIZE3 64
typedef
struct
{
u
_
int
fhandle3_len
;
u
nsigned
int
fhandle3_len
;
char
*
fhandle3_val
;
}
fhandle3
;
...
...
@@ -51,7 +51,7 @@ typedef enum mountstat3 mountstat3;
struct
mountres3_ok
{
fhandle3
fhandle
;
struct
{
u
_
int
auth_flavors_len
;
u
nsigned
int
auth_flavors_len
;
int
*
auth_flavors_val
;
}
auth_flavors
;
};
...
...
components/dfs/filesystems/nfs/mount_xdr.c
浏览文件 @
d0d239cd
...
...
@@ -18,7 +18,7 @@ xdr_fhandle3(register XDR *xdrs, fhandle3 *objp)
register
long
*
buf
;
#endif
if
(
!
xdr_bytes
(
xdrs
,
(
char
**
)
&
objp
->
fhandle3_val
,
(
u
_
int
*
)
&
objp
->
fhandle3_len
,
FHSIZE3
))
if
(
!
xdr_bytes
(
xdrs
,
(
char
**
)
&
objp
->
fhandle3_val
,
(
u
nsigned
int
*
)
&
objp
->
fhandle3_len
,
FHSIZE3
))
return
(
FALSE
);
return
(
TRUE
);
}
...
...
@@ -132,7 +132,7 @@ xdr_mountres3_ok(register XDR *xdrs, mountres3_ok *objp)
if
(
!
xdr_fhandle3
(
xdrs
,
&
objp
->
fhandle
))
return
(
FALSE
);
if
(
!
xdr_array
(
xdrs
,
(
char
**
)
&
objp
->
auth_flavors
.
auth_flavors_val
,
(
u
_
int
*
)
&
objp
->
auth_flavors
.
auth_flavors_len
,
~
0
,
if
(
!
xdr_array
(
xdrs
,
(
char
**
)
&
objp
->
auth_flavors
.
auth_flavors_val
,
(
u
nsigned
int
*
)
&
objp
->
auth_flavors
.
auth_flavors_len
,
~
0
,
sizeof
(
int
),
(
xdrproc_t
)
xdr_int
))
return
(
FALSE
);
return
(
TRUE
);
...
...
components/dfs/filesystems/nfs/nfs.h
浏览文件 @
d0d239cd
...
...
@@ -130,7 +130,7 @@ typedef struct specdata3 specdata3;
struct
nfs_fh3
{
struct
{
u
_
int
data_len
;
u
nsigned
int
data_len
;
char
*
data_val
;
}
data
;
};
...
...
@@ -408,7 +408,7 @@ struct READ3resok {
count3
count
;
bool_t
eof
;
struct
{
u
_
int
data_len
;
u
nsigned
int
data_len
;
char
*
data_val
;
}
data
;
};
...
...
@@ -434,7 +434,7 @@ struct WRITE3args {
count3
count
;
stable_how
stable
;
struct
{
u
_
int
data_len
;
u
nsigned
int
data_len
;
char
*
data_val
;
}
data
;
};
...
...
components/dfs/filesystems/nfs/nfs_xdr.c
浏览文件 @
d0d239cd
...
...
@@ -213,7 +213,7 @@ xdr_specdata3(register XDR *xdrs, specdata3 *objp)
bool_t
xdr_nfs_fh3
(
register
XDR
*
xdrs
,
nfs_fh3
*
objp
)
{
if
(
!
xdr_bytes
(
xdrs
,
(
char
**
)
&
objp
->
data
.
data_val
,
(
u
_
int
*
)
&
objp
->
data
.
data_len
,
NFS3_FHSIZE
))
if
(
!
xdr_bytes
(
xdrs
,
(
char
**
)
&
objp
->
data
.
data_val
,
(
u
nsigned
int
*
)
&
objp
->
data
.
data_len
,
NFS3_FHSIZE
))
return
(
FALSE
);
return
(
TRUE
);
}
...
...
@@ -713,7 +713,7 @@ xdr_READ3resok(register XDR *xdrs, READ3resok *objp)
return
(
FALSE
);
if
(
!
xdr_bool
(
xdrs
,
&
objp
->
eof
))
return
(
FALSE
);
if
(
!
xdr_bytes
(
xdrs
,
(
char
**
)
&
objp
->
data
.
data_val
,
(
u
_
int
*
)
&
objp
->
data
.
data_len
,
~
0
))
if
(
!
xdr_bytes
(
xdrs
,
(
char
**
)
&
objp
->
data
.
data_val
,
(
u
nsigned
int
*
)
&
objp
->
data
.
data_len
,
~
0
))
return
(
FALSE
);
return
(
TRUE
);
}
...
...
@@ -755,7 +755,7 @@ xdr_WRITE3args(register XDR *xdrs, WRITE3args *objp)
return
(
FALSE
);
if
(
!
xdr_stable_how
(
xdrs
,
&
objp
->
stable
))
return
(
FALSE
);
if
(
!
xdr_bytes
(
xdrs
,
(
char
**
)
&
objp
->
data
.
data_val
,
(
u
_
int
*
)
&
objp
->
data
.
data_len
,
~
0
))
if
(
!
xdr_bytes
(
xdrs
,
(
char
**
)
&
objp
->
data
.
data_val
,
(
u
nsigned
int
*
)
&
objp
->
data
.
data_len
,
~
0
))
return
(
FALSE
);
return
(
TRUE
);
}
...
...
components/dfs/filesystems/nfs/rpc/xdr.c
浏览文件 @
d0d239cd
...
...
@@ -50,8 +50,8 @@ static char sccsid[] = "@(#)xdr.c 1.35 87/08/12";
/*
* constants specific to the xdr "protocol"
*/
#define XDR_FALSE ((long) 0)
#define XDR_TRUE ((long) 1)
#define XDR_FALSE
((long) 0)
#define XDR_TRUE
((long) 1)
#define LASTUNSIGNED ((unsigned int) 0-1)
/*
...
...
@@ -327,9 +327,7 @@ bool_t xdr_u_char(XDR* xdrs, unsigned char* cp)
/*
* XDR booleans
*/
bool_t
xdr_bool
(
xdrs
,
bp
)
register
XDR
*
xdrs
;
bool_t
*
bp
;
bool_t
xdr_bool
(
XDR
*
xdrs
,
bool_t
*
bp
)
{
long
lb
;
...
...
@@ -355,9 +353,7 @@ bool_t *bp;
/*
* XDR enumerations
*/
bool_t
xdr_enum
(
xdrs
,
ep
)
XDR
*
xdrs
;
enum_t
*
ep
;
bool_t
xdr_enum
(
XDR
*
xdrs
,
enum_t
*
ep
)
{
/*
* enums are treated as ints
...
...
@@ -370,10 +366,7 @@ enum_t *ep;
* Allows the specification of a fixed size sequence of opaque bytes.
* cp points to the opaque object and cnt gives the byte length.
*/
bool_t
xdr_opaque
(
xdrs
,
cp
,
cnt
)
register
XDR
*
xdrs
;
char
*
cp
;
register
unsigned
int
cnt
;
bool_t
xdr_opaque
(
XDR
*
xdrs
,
char
*
cp
,
unsigned
int
cnt
)
{
register
unsigned
int
rndup
;
static
char
crud
[
BYTES_PER_XDR_UNIT
];
...
...
@@ -421,11 +414,7 @@ register unsigned int cnt;
* *cpp is a pointer to the bytes, *sizep is the count.
* If *cpp is NULL maxsize bytes are allocated
*/
bool_t
xdr_bytes
(
xdrs
,
cpp
,
sizep
,
maxsize
)
register
XDR
*
xdrs
;
char
**
cpp
;
register
unsigned
int
*
sizep
;
unsigned
int
maxsize
;
bool_t
xdr_bytes
(
XDR
*
xdrs
,
char
**
cpp
,
unsigned
int
*
sizep
,
unsigned
int
maxsize
)
{
register
char
*
sp
=
*
cpp
;
/* sp is the actual string pointer */
register
unsigned
int
nodesize
;
...
...
@@ -475,11 +464,8 @@ unsigned int maxsize;
/*
* Implemented here due to commonality of the object.
*/
bool_t
xdr_netobj
(
xdrs
,
np
)
XDR
*
xdrs
;
struct
netobj
*
np
;
bool_t
xdr_netobj
(
XDR
*
xdrs
,
struct
netobj
*
np
)
{
return
(
xdr_bytes
(
xdrs
,
&
np
->
n_bytes
,
&
np
->
n_len
,
MAX_NETOBJ_SZ
));
}
...
...
@@ -537,10 +523,7 @@ bool_t xdr_union(XDR* xdrs, enum_t* dscmp, char* unp, const struct xdr_discrim*
* storage is allocated. The last parameter is the max allowed length
* of the string as specified by a protocol.
*/
bool_t
xdr_string
(
xdrs
,
cpp
,
maxsize
)
register
XDR
*
xdrs
;
char
**
cpp
;
unsigned
int
maxsize
;
bool_t
xdr_string
(
XDR
*
xdrs
,
char
**
cpp
,
unsigned
int
maxsize
)
{
register
char
*
sp
=
*
cpp
;
/* sp is the actual string pointer */
unsigned
int
size
;
...
...
@@ -600,9 +583,7 @@ unsigned int maxsize;
* Wrapper for xdr_string that can be called directly from
* routines like clnt_call
*/
bool_t
xdr_wrapstring
(
xdrs
,
cpp
)
XDR
*
xdrs
;
char
**
cpp
;
bool_t
xdr_wrapstring
(
XDR
*
xdrs
,
char
**
cpp
)
{
if
(
xdr_string
(
xdrs
,
cpp
,
LASTUNSIGNED
))
{
return
(
TRUE
);
...
...
@@ -617,13 +598,7 @@ char **cpp;
* elsize is the size (in bytes) of each element, and elproc is the
* xdr procedure to call to handle each element of the array.
*/
bool_t
xdr_array
(
xdrs
,
addrp
,
sizep
,
maxsize
,
elsize
,
elproc
)
register
XDR
*
xdrs
;
char
*
*
addrp
;
/* array pointer */
unsigned
int
*
sizep
;
/* number of elements */
unsigned
int
maxsize
;
/* max numberof elements */
unsigned
int
elsize
;
/* size in bytes of each element */
xdrproc_t
elproc
;
/* xdr routine to handle each element */
bool_t
xdr_array
(
XDR
*
xdrs
,
char
**
addrp
,
unsigned
int
*
sizep
,
unsigned
int
maxsize
,
unsigned
int
elsize
,
xdrproc_t
elproc
)
{
register
unsigned
int
i
;
register
char
*
target
=
*
addrp
;
...
...
@@ -700,12 +675,7 @@ xdrproc_t elproc; /* xdr routine to handle each element */
* > elemsize: size of each element
* > xdr_elem: routine to XDR each element
*/
bool_t
xdr_vector
(
xdrs
,
basep
,
nelem
,
elemsize
,
xdr_elem
)
register
XDR
*
xdrs
;
register
char
*
basep
;
register
unsigned
int
nelem
;
register
unsigned
int
elemsize
;
register
xdrproc_t
xdr_elem
;
bool_t
xdr_vector
(
XDR
*
xdrs
,
char
*
basep
,
unsigned
int
nelem
,
unsigned
int
elemsize
,
xdrproc_t
xdr_elem
)
{
register
unsigned
int
i
;
register
char
*
elptr
;
...
...
@@ -730,11 +700,7 @@ register xdrproc_t xdr_elem;
* size is the sizeof the referneced structure.
* proc is the routine to handle the referenced structure.
*/
bool_t
xdr_reference
(
xdrs
,
pp
,
size
,
proc
)
register
XDR
*
xdrs
;
char
*
*
pp
;
/* the pointer to work on */
unsigned
int
size
;
/* size of the object pointed to */
xdrproc_t
proc
;
/* xdr routine to handle the object */
bool_t
xdr_reference
(
XDR
*
xdrs
,
char
**
pp
,
unsigned
int
size
,
xdrproc_t
proc
)
{
register
char
*
loc
=
*
pp
;
register
bool_t
stat
;
...
...
@@ -783,11 +749,7 @@ xdrproc_t proc; /* xdr routine to handle the object */
* > xdr_obj: routine to XDR an object.
*
*/
bool_t
xdr_pointer
(
xdrs
,
objpp
,
obj_size
,
xdr_obj
)
register
XDR
*
xdrs
;
char
**
objpp
;
unsigned
int
obj_size
;
xdrproc_t
xdr_obj
;
bool_t
xdr_pointer
(
XDR
*
xdrs
,
char
**
objpp
,
unsigned
int
obj_size
,
xdrproc_t
xdr_obj
)
{
bool_t
more_data
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录