repositories
/
deb_libnfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
183451c
)
Set IFREG from file type, dont assume mode bits contain it
author
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Mon, 5 Dec 2011 02:54:21 +0000
(13:54 +1100)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Mon, 5 Dec 2011 02:54:21 +0000
(13:54 +1100)
Needed for HaneWin which does not set S_IFMT in the modebits returned
lib/libnfs.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/libnfs.c
b/lib/libnfs.c
index 1f78ca8b8fe9dacc3cc108556271e1ed9f2ad933..6fcd48ae193706ba44c83d9442aec71f18fd9ace 100644
(file)
--- a/
lib/libnfs.c
+++ b/
lib/libnfs.c
@@
-686,6
+686,9
@@
static void nfs_stat_1_cb(struct rpc_context *rpc _U_, int status, void *command
if (res->GETATTR3res_u.resok.obj_attributes.type == NF3DIR) {
st.st_mode |= S_IFDIR ;
}
+ if (res->GETATTR3res_u.resok.obj_attributes.type == NF3REG) {
+ st.st_mode |= S_IFREG ;
+ }
st.st_nlink = res->GETATTR3res_u.resok.obj_attributes.nlink;
st.st_uid = res->GETATTR3res_u.resok.obj_attributes.uid;
st.st_gid = res->GETATTR3res_u.resok.obj_attributes.gid;