From f9cd9cb1baad90590cebab27bb7f08ae521619da Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Mon, 18 Mar 1996 20:34:15 +0000 Subject: Formerly nfs.c.~14~ --- nfs/nfs.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'nfs/nfs.c') diff --git a/nfs/nfs.c b/nfs/nfs.c index 2b1a6741..d6cf6864 100644 --- a/nfs/nfs.c +++ b/nfs/nfs.c @@ -167,7 +167,7 @@ int * xdr_encode_create_state (int *p, mode_t mode) { - *p++ = mode; + *p++ = htonl (hurd_mode_to_nfs_mode (mode)); *p++ = -1; /* uid */ *p++ = -1; /* gid */ *p++ = 0; /* size */ @@ -178,6 +178,20 @@ xdr_encode_create_state (int *p, return p; } +int * +xdr_encode_sattr_stat (int *p, + struct stat *st) +{ + *p++ = htonl (st->st_mode); + *p++ = htonl (st->st_uid); + *p++ = htonl (st->st_gid); + *p++ = htonl (st->st_size); + *p++ = htonl (st->st_atime); + *p++ = htonl (st->st_atime_usec); + *p++ = htonl (st->st_mtime); + *p++ = htonl (st->st_mtime_usec); + return p; +} /* Decode *P into a stat structure; return the address of the following data. */ @@ -205,11 +219,6 @@ xdr_decode_fattr (int *p, struct stat *st) st->st_ctime = ntohl (*p++); st->st_ctime_usec = ntohl (*p++); - st->st_fstype = FSTYPE_NFS; - st->st_gen = 0; /* ??? */ - st->st_author = st->st_uid; /* ??? */ - st->st_flags = 0; /* ??? */ - return p; } -- cgit v1.2.3