Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
6cab3b7d
R
rt-thread
项目概览
BaiXuePrincess
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
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看板
提交
6cab3b7d
编写于
3月 10, 2014
作者:
B
bernard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[DFS] fix compiling warning in NFS
上级
d0d239cd
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
39 addition
and
138 deletion
+39
-138
components/dfs/filesystems/nfs/mount_xdr.c
components/dfs/filesystems/nfs/mount_xdr.c
+1
-84
components/dfs/filesystems/nfs/nfs_xdr.c
components/dfs/filesystems/nfs/nfs_xdr.c
+5
-5
components/dfs/filesystems/nfs/rpc/auth_none.c
components/dfs/filesystems/nfs/rpc/auth_none.c
+2
-3
components/dfs/filesystems/nfs/rpc/clnt_udp.c
components/dfs/filesystems/nfs/rpc/clnt_udp.c
+17
-6
components/dfs/filesystems/nfs/rpc/pmap.c
components/dfs/filesystems/nfs/rpc/pmap.c
+2
-8
components/dfs/filesystems/nfs/rpc/rpc_prot.c
components/dfs/filesystems/nfs/rpc/rpc_prot.c
+11
-29
components/dfs/filesystems/nfs/rpc/xdr_mem.c
components/dfs/filesystems/nfs/rpc/xdr_mem.c
+1
-3
未找到文件。
components/dfs/filesystems/nfs/mount_xdr.c
浏览文件 @
6cab3b7d
...
...
@@ -11,13 +11,6 @@
bool_t
xdr_fhandle3
(
register
XDR
*
xdrs
,
fhandle3
*
objp
)
{
#if defined(_LP64) || defined(_KERNEL)
register
int
*
buf
;
#else
register
long
*
buf
;
#endif
if
(
!
xdr_bytes
(
xdrs
,
(
char
**
)
&
objp
->
fhandle3_val
,
(
unsigned
int
*
)
&
objp
->
fhandle3_len
,
FHSIZE3
))
return
(
FALSE
);
return
(
TRUE
);
...
...
@@ -26,13 +19,6 @@ xdr_fhandle3(register XDR *xdrs, fhandle3 *objp)
bool_t
xdr_dirpath
(
register
XDR
*
xdrs
,
dirpath
*
objp
)
{
#if defined(_LP64) || defined(_KERNEL)
register
int
*
buf
;
#else
register
long
*
buf
;
#endif
if
(
!
xdr_string
(
xdrs
,
objp
,
MNTPATHLEN
))
return
(
FALSE
);
return
(
TRUE
);
...
...
@@ -41,13 +27,6 @@ xdr_dirpath(register XDR *xdrs, dirpath *objp)
bool_t
xdr_name
(
register
XDR
*
xdrs
,
name
*
objp
)
{
#if defined(_LP64) || defined(_KERNEL)
register
int
*
buf
;
#else
register
long
*
buf
;
#endif
if
(
!
xdr_string
(
xdrs
,
objp
,
MNTNAMLEN
))
return
(
FALSE
);
return
(
TRUE
);
...
...
@@ -56,13 +35,6 @@ xdr_name(register XDR *xdrs, name *objp)
bool_t
xdr_exports
(
register
XDR
*
xdrs
,
exports
*
objp
)
{
#if defined(_LP64) || defined(_KERNEL)
register
int
*
buf
;
#else
register
long
*
buf
;
#endif
if
(
!
xdr_pointer
(
xdrs
,
(
char
**
)
objp
,
sizeof
(
struct
exportnode
),
(
xdrproc_t
)
xdr_exportnode
))
return
(
FALSE
);
return
(
TRUE
);
...
...
@@ -71,13 +43,6 @@ xdr_exports(register XDR *xdrs, exports *objp)
bool_t
xdr_groups
(
register
XDR
*
xdrs
,
groups
*
objp
)
{
#if defined(_LP64) || defined(_KERNEL)
register
int
*
buf
;
#else
register
long
*
buf
;
#endif
if
(
!
xdr_pointer
(
xdrs
,
(
char
**
)
objp
,
sizeof
(
struct
groupnode
),
(
xdrproc_t
)
xdr_groupnode
))
return
(
FALSE
);
return
(
TRUE
);
...
...
@@ -86,13 +51,6 @@ xdr_groups(register XDR *xdrs, groups *objp)
bool_t
xdr_mountlist
(
register
XDR
*
xdrs
,
mountlist
*
objp
)
{
#if defined(_LP64) || defined(_KERNEL)
register
int
*
buf
;
#else
register
long
*
buf
;
#endif
if
(
!
xdr_pointer
(
xdrs
,
(
char
**
)
objp
,
sizeof
(
struct
mountbody
),
(
xdrproc_t
)
xdr_mountbody
))
return
(
FALSE
);
return
(
TRUE
);
...
...
@@ -103,17 +61,11 @@ xdr_mountstat3(register XDR *xdrs, mountstat3 *objp)
{
int
enum_objp
;
#if defined(_LP64) || defined(_KERNEL)
register
int
*
buf
;
#else
register
long
*
buf
;
#endif
enum_objp
=
*
objp
;
if
(
!
xdr_enum
(
xdrs
,
(
enum_t
*
)
&
enum_objp
))
{
*
objp
=
enum_objp
;
*
objp
=
(
mountstat3
)
enum_objp
;
return
(
FALSE
);
}
...
...
@@ -123,13 +75,6 @@ xdr_mountstat3(register XDR *xdrs, mountstat3 *objp)
bool_t
xdr_mountres3_ok
(
register
XDR
*
xdrs
,
mountres3_ok
*
objp
)
{
#if defined(_LP64) || defined(_KERNEL)
register
int
*
buf
;
#else
register
long
*
buf
;
#endif
if
(
!
xdr_fhandle3
(
xdrs
,
&
objp
->
fhandle
))
return
(
FALSE
);
if
(
!
xdr_array
(
xdrs
,
(
char
**
)
&
objp
->
auth_flavors
.
auth_flavors_val
,
(
unsigned
int
*
)
&
objp
->
auth_flavors
.
auth_flavors_len
,
~
0
,
...
...
@@ -141,13 +86,6 @@ xdr_mountres3_ok(register XDR *xdrs, mountres3_ok *objp)
bool_t
xdr_mountres3
(
register
XDR
*
xdrs
,
mountres3
*
objp
)
{
#if defined(_LP64) || defined(_KERNEL)
register
int
*
buf
;
#else
register
long
*
buf
;
#endif
if
(
!
xdr_mountstat3
(
xdrs
,
&
objp
->
fhs_status
))
return
(
FALSE
);
switch
(
objp
->
fhs_status
)
{
...
...
@@ -162,13 +100,6 @@ xdr_mountres3(register XDR *xdrs, mountres3 *objp)
bool_t
xdr_mountbody
(
register
XDR
*
xdrs
,
mountbody
*
objp
)
{
#if defined(_LP64) || defined(_KERNEL)
register
int
*
buf
;
#else
register
long
*
buf
;
#endif
if
(
!
xdr_name
(
xdrs
,
&
objp
->
ml_hostname
))
return
(
FALSE
);
if
(
!
xdr_dirpath
(
xdrs
,
&
objp
->
ml_directory
))
...
...
@@ -181,13 +112,6 @@ xdr_mountbody(register XDR *xdrs, mountbody *objp)
bool_t
xdr_groupnode
(
register
XDR
*
xdrs
,
groupnode
*
objp
)
{
#if defined(_LP64) || defined(_KERNEL)
register
int
*
buf
;
#else
register
long
*
buf
;
#endif
if
(
!
xdr_name
(
xdrs
,
&
objp
->
gr_name
))
return
(
FALSE
);
if
(
!
xdr_groups
(
xdrs
,
&
objp
->
gr_next
))
...
...
@@ -198,13 +122,6 @@ xdr_groupnode(register XDR *xdrs, groupnode *objp)
bool_t
xdr_exportnode
(
register
XDR
*
xdrs
,
exportnode
*
objp
)
{
#if defined(_LP64) || defined(_KERNEL)
register
int
*
buf
;
#else
register
long
*
buf
;
#endif
if
(
!
xdr_dirpath
(
xdrs
,
&
objp
->
ex_dir
))
return
(
FALSE
);
if
(
!
xdr_groups
(
xdrs
,
&
objp
->
ex_groups
))
...
...
components/dfs/filesystems/nfs/nfs_xdr.c
浏览文件 @
6cab3b7d
...
...
@@ -151,7 +151,7 @@ xdr_nfsstat3(register XDR *xdrs, nfsstat3 *objp)
enum_objp
=
*
objp
;
if
(
!
xdr_enum
(
xdrs
,
(
enum_t
*
)
objp
))
{
*
objp
=
enum_objp
;
*
objp
=
(
nfsstat3
)
enum_objp
;
return
(
FALSE
);
}
...
...
@@ -165,7 +165,7 @@ xdr_ftype3(register XDR *xdrs, ftype3 *objp)
enum_objp
=
*
objp
;
if
(
!
xdr_enum
(
xdrs
,
(
enum_t
*
)
objp
))
{
*
objp
=
enum_objp
;
*
objp
=
(
ftype3
)
enum_objp
;
return
(
FALSE
);
}
...
...
@@ -179,7 +179,7 @@ xdr_stable_how(register XDR *xdrs, stable_how *objp)
enum_objp
=
*
objp
;
if
(
!
xdr_enum
(
xdrs
,
(
enum_t
*
)
objp
))
{
*
objp
=
enum_objp
;
*
objp
=
(
stable_how
)
enum_objp
;
return
(
FALSE
);
}
...
...
@@ -193,7 +193,7 @@ xdr_createmode3(register XDR *xdrs, createmode3 *objp)
enum_objp
=
*
objp
;
if
(
!
xdr_enum
(
xdrs
,
(
enum_t
*
)
objp
))
{
*
objp
=
enum_objp
;
*
objp
=
(
createmode3
)
enum_objp
;
return
(
FALSE
);
}
...
...
@@ -343,7 +343,7 @@ xdr_time_how(register XDR *xdrs, time_how *objp)
enum_objp
=
*
objp
;
if
(
!
xdr_enum
(
xdrs
,
(
enum_t
*
)
objp
))
{
*
objp
=
enum_objp
;
*
objp
=
(
time_how
)
enum_objp
;
return
(
FALSE
);
}
...
...
components/dfs/filesystems/nfs/rpc/auth_none.c
浏览文件 @
6cab3b7d
...
...
@@ -73,6 +73,7 @@ AUTH *authnone_create()
register
struct
authnone_private
*
ap
=
authnone_private
;
XDR
xdr_stream
;
register
XDR
*
xdrs
;
extern
bool_t
xdr_opaque_auth
(
XDR
*
xdrs
,
struct
opaque_auth
*
ap
);
if
(
ap
==
0
)
{
ap
=
(
struct
authnone_private
*
)
rt_malloc
(
sizeof
(
*
ap
));
...
...
@@ -95,9 +96,7 @@ AUTH *authnone_create()
}
/*ARGSUSED*/
static
bool_t
authnone_marshal
(
client
,
xdrs
)
AUTH
*
client
;
XDR
*
xdrs
;
static
bool_t
authnone_marshal
(
AUTH
*
client
,
XDR
*
xdrs
)
{
register
struct
authnone_private
*
ap
=
authnone_private
;
...
...
components/dfs/filesystems/nfs/rpc/clnt_udp.c
浏览文件 @
6cab3b7d
...
...
@@ -135,6 +135,10 @@ CLIENT *clntudp_bufcreate(struct sockaddr_in *raddr,
if
(
raddr
->
sin_port
==
0
)
{
unsigned
short
port
;
extern
unsigned
short
pmap_getport
(
struct
sockaddr_in
*
address
,
unsigned
long
program
,
unsigned
long
version
,
unsigned
int
protocol
);
if
((
port
=
pmap_getport
(
raddr
,
program
,
version
,
IPPROTO_UDP
))
==
0
)
{
...
...
@@ -165,8 +169,6 @@ CLIENT *clntudp_bufcreate(struct sockaddr_in *raddr,
cu
->
cu_xdrpos
=
XDR_GETPOS
(
&
(
cu
->
cu_outxdrs
));
if
(
*
sockp
<
0
)
{
int
dontblock
=
1
;
*
sockp
=
socket
(
AF_INET
,
SOCK_DGRAM
,
IPPROTO_UDP
);
if
(
*
sockp
<
0
)
{
...
...
@@ -229,7 +231,10 @@ call_again:
if
((
!
XDR_PUTLONG
(
xdrs
,
(
long
*
)
&
proc
))
||
(
!
AUTH_MARSHALL
(
cl
->
cl_auth
,
xdrs
))
||
(
!
(
*
xargs
)
(
xdrs
,
argsp
)))
return
(
cu
->
cu_error
.
re_status
=
RPC_CANTENCODEARGS
);
{
cu
->
cu_error
.
re_status
=
RPC_CANTENCODEARGS
;
return
RPC_CANTENCODEARGS
;
}
outlen
=
(
int
)
XDR_GETPOS
(
xdrs
);
send_again:
...
...
@@ -238,7 +243,9 @@ send_again:
!=
outlen
)
{
cu
->
cu_error
.
re_errno
=
errno
;
return
(
cu
->
cu_error
.
re_status
=
RPC_CANTSEND
);
cu
->
cu_error
.
re_status
=
RPC_CANTSEND
;
return
RPC_CANTSEND
;
}
/*
...
...
@@ -264,7 +271,9 @@ send_again:
{
rt_kprintf
(
"recv error, len %d
\n
"
,
inlen
);
cu
->
cu_error
.
re_errno
=
errno
;
return
(
cu
->
cu_error
.
re_status
=
RPC_CANTRECV
);
cu
->
cu_error
.
re_status
=
RPC_CANTRECV
;
return
RPC_CANTRECV
;
}
/* see if reply transaction id matches sent id */
...
...
@@ -292,6 +301,8 @@ send_again:
}
if
(
reply_msg
.
acpted_rply
.
ar_verf
.
oa_base
!=
NULL
)
{
extern
bool_t
xdr_opaque_auth
(
XDR
*
xdrs
,
struct
opaque_auth
*
ap
);
xdrs
->
x_op
=
XDR_FREE
;
(
void
)
xdr_opaque_auth
(
xdrs
,
&
(
reply_msg
.
acpted_rply
.
ar_verf
));
}
...
...
@@ -311,7 +322,7 @@ send_again:
cu
->
cu_error
.
re_status
=
RPC_CANTDECODERES
;
}
return
(
cu
->
cu_error
.
re_status
);
return
(
enum
clnt_stat
)(
cu
->
cu_error
.
re_status
);
}
static
void
clntudp_geterr
(
CLIENT
*
cl
,
struct
rpc_err
*
errp
)
...
...
components/dfs/filesystems/nfs/rpc/pmap.c
浏览文件 @
6cab3b7d
...
...
@@ -6,9 +6,7 @@ static struct timeval timeout = { 5, 0 };
static
struct
timeval
tottimeout
=
{
60
,
0
};
bool_t
xdr_pmap
(
xdrs
,
regs
)
XDR
*
xdrs
;
struct
pmap
*
regs
;
bool_t
xdr_pmap
(
XDR
*
xdrs
,
struct
pmap
*
regs
)
{
if
(
xdr_u_long
(
xdrs
,
&
regs
->
pm_prog
)
&&
xdr_u_long
(
xdrs
,
&
regs
->
pm_vers
)
&&
...
...
@@ -22,11 +20,7 @@ struct pmap *regs;
* Calls the pmap service remotely to do the lookup.
* Returns 0 if no map exists.
*/
unsigned
short
pmap_getport
(
address
,
program
,
version
,
protocol
)
struct
sockaddr_in
*
address
;
unsigned
long
program
;
unsigned
long
version
;
unsigned
int
protocol
;
unsigned
short
pmap_getport
(
struct
sockaddr_in
*
address
,
unsigned
long
program
,
unsigned
long
version
,
unsigned
int
protocol
)
{
unsigned
short
port
=
0
;
int
socket
=
-
1
;
...
...
components/dfs/filesystems/nfs/rpc/rpc_prot.c
浏览文件 @
6cab3b7d
...
...
@@ -52,9 +52,7 @@ static char sccsid[] = "@(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";
* XDR an opaque authentication struct
* (see auth.h)
*/
bool_t
xdr_opaque_auth
(
xdrs
,
ap
)
register
XDR
*
xdrs
;
register
struct
opaque_auth
*
ap
;
bool_t
xdr_opaque_auth
(
XDR
*
xdrs
,
struct
opaque_auth
*
ap
)
{
if
(
xdr_enum
(
xdrs
,
&
(
ap
->
oa_flavor
)))
...
...
@@ -66,9 +64,7 @@ register struct opaque_auth *ap;
/*
* XDR a DES block
*/
bool_t
xdr_des_block
(
xdrs
,
blkp
)
register
XDR
*
xdrs
;
register
des_block
*
blkp
;
bool_t
xdr_des_block
(
XDR
*
xdrs
,
des_block
*
blkp
)
{
return
(
xdr_opaque
(
xdrs
,
(
char
*
)
blkp
,
sizeof
(
des_block
)));
}
...
...
@@ -78,9 +74,7 @@ register des_block *blkp;
/*
* XDR the MSG_ACCEPTED part of a reply message union
*/
static
bool_t
xdr_accepted_reply
(
xdrs
,
ar
)
register
XDR
*
xdrs
;
register
struct
accepted_reply
*
ar
;
static
bool_t
xdr_accepted_reply
(
XDR
*
xdrs
,
struct
accepted_reply
*
ar
)
{
/* personalized union, rather than calling xdr_union */
...
...
@@ -104,9 +98,7 @@ register struct accepted_reply *ar;
/*
* XDR the MSG_DENIED part of a reply message union
*/
static
bool_t
xdr_rejected_reply
(
xdrs
,
rr
)
register
XDR
*
xdrs
;
register
struct
rejected_reply
*
rr
;
static
bool_t
xdr_rejected_reply
(
XDR
*
xdrs
,
struct
rejected_reply
*
rr
)
{
/* personalized union, rather than calling xdr_union */
...
...
@@ -134,9 +126,7 @@ static struct xdr_discrim reply_dscrm[3] = {
/*
* XDR a reply message
*/
bool_t
xdr_replymsg
(
xdrs
,
rmsg
)
register
XDR
*
xdrs
;
register
struct
rpc_msg
*
rmsg
;
bool_t
xdr_replymsg
(
XDR
*
xdrs
,
struct
rpc_msg
*
rmsg
)
{
if
(
xdr_u_long
(
xdrs
,
&
(
rmsg
->
rm_xid
))
&&
xdr_enum
(
xdrs
,
(
enum_t
*
)
&
(
rmsg
->
rm_direction
))
&&
...
...
@@ -153,9 +143,7 @@ register struct rpc_msg *rmsg;
* The fields include: rm_xid, rm_direction, rpcvers, prog, and vers.
* The rm_xid is not really static, but the user can easily munge on the fly.
*/
bool_t
xdr_callhdr
(
xdrs
,
cmsg
)
register
XDR
*
xdrs
;
register
struct
rpc_msg
*
cmsg
;
bool_t
xdr_callhdr
(
XDR
*
xdrs
,
struct
rpc_msg
*
cmsg
)
{
cmsg
->
rm_direction
=
CALL
;
...
...
@@ -172,9 +160,7 @@ register struct rpc_msg *cmsg;
/* ************************** Client utility routine ************* */
static
void
accepted
(
acpt_stat
,
error
)
register
enum
accept_stat
acpt_stat
;
register
struct
rpc_err
*
error
;
static
void
accepted
(
enum
accept_stat
acpt_stat
,
struct
rpc_err
*
error
)
{
switch
(
acpt_stat
)
{
...
...
@@ -209,9 +195,7 @@ register struct rpc_err *error;
error
->
re_lb
.
s2
=
(
long
)
acpt_stat
;
}
static
void
rejected
(
rjct_stat
,
error
)
register
enum
reject_stat
rjct_stat
;
register
struct
rpc_err
*
error
;
static
void
rejected
(
enum
reject_stat
rjct_stat
,
struct
rpc_err
*
error
)
{
switch
(
rjct_stat
)
{
...
...
@@ -233,9 +217,7 @@ register struct rpc_err *error;
/*
* given a reply message, fills in the error
*/
void
_seterr_reply
(
msg
,
error
)
register
struct
rpc_msg
*
msg
;
register
struct
rpc_err
*
error
;
void
_seterr_reply
(
struct
rpc_msg
*
msg
,
struct
rpc_err
*
error
)
{
/* optimized for normal, SUCCESSful case */
...
...
@@ -246,11 +228,11 @@ register struct rpc_err *error;
error
->
re_status
=
RPC_SUCCESS
;
return
;
};
accepted
(
msg
->
acpted_rply
.
ar_stat
,
error
);
accepted
(
(
enum
accept_stat
)
msg
->
acpted_rply
.
ar_stat
,
error
);
break
;
case
MSG_DENIED
:
rejected
(
msg
->
rjcted_rply
.
rj_stat
,
error
);
rejected
(
(
enum
reject_stat
)
msg
->
rjcted_rply
.
rj_stat
,
error
);
break
;
default:
...
...
components/dfs/filesystems/nfs/rpc/xdr_mem.c
浏览文件 @
6cab3b7d
...
...
@@ -135,9 +135,7 @@ static unsigned int xdrmem_getpos (const XDR *xdrs)
return
((
unsigned
long
)
xdrs
->
x_private
-
(
unsigned
long
)
xdrs
->
x_base
);
}
static
bool_t
xdrmem_setpos
(
xdrs
,
pos
)
register
XDR
*
xdrs
;
unsigned
int
pos
;
static
bool_t
xdrmem_setpos
(
XDR
*
xdrs
,
unsigned
int
pos
)
{
register
char
*
newaddr
=
xdrs
->
x_base
+
pos
;
register
char
*
lastaddr
=
xdrs
->
x_private
+
xdrs
->
x_handy
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录