A few questions, if someone can help. I found a few bugs in nfsd after some rather tedious tail chasing.
I am not sure about a few things though. nfsd failed to create files from remote non-hurd server and was expecting anything but a -1 for an input size. nfsd also failed to correctly write the data. Both appear to be working now. file_set_size seems to be failing on the value of (unsigned)-1 (4 gig). This caused the creation to fail. -1 is used to designate set size unnecessary. (I haven't looked into this further) I don't know (and don't know what reference to use to find) whether with large files, this is an incorrect assumption (using the code of -1). I suspect that with the other dependencies on NFS2 in the code that these aren't issues, until NFS3 support is added to nfsd? 2002-11-24 David Walter <[EMAIL PROTECTED]> * ops.c (op_create): changed size from off_t to loff_t cast size as int (not unsigned) in test (size == -1) (complete_setattr): changed size from off_t to loff_t (op_read): changed size from off_t to loff_t (op_write): changed size from off_t to loff_t, changed assignment from *reply to bp = (char *) p; (where p is in the nfs buffer) cvs server: Diffing . Index: ChangeLog =================================================================== RCS file: /cvsroot/hurd/hurd/nfsd/ChangeLog,v retrieving revision 1.22 diff --unified -w -i -r1.22 ChangeLog --- ChangeLog 29 Sep 2002 15:12:48 -0000 1.22 +++ ChangeLog 24 Nov 2002 07:23:51 -0000 @@ -1,3 +1,14 @@ +2002-11-24 David Walter <[EMAIL PROTECTED]> + + * ops.c (op_create): changed size from off_t to loff_t + cast size as int (not unsigned) in test (size == -1) + (complete_setattr): changed size from off_t to loff_t + (op_read): changed size from off_t to loff_t + (op_write): changed size from off_t to loff_t, + changed assignment from *reply to bp = (char *) p; + (where p is in the nfs buffer) + + 2002-09-29 Marcus Brinkmann <[EMAIL PROTECTED]> * loop.c (server_loop): Use memset instead bzero. Index: Makefile =================================================================== RCS file: /cvsroot/hurd/hurd/nfsd/Makefile,v retrieving revision 1.3 diff --unified -w -i -r1.3 Makefile --- Makefile 17 Sep 1996 16:43:00 -0000 1.3 +++ Makefile 24 Nov 2002 07:23:51 -0000 @@ -22,6 +22,7 @@ makemode := utility SRCS = cache.c loop.c main.c ops.c fsys.c xdr.c +#SRCS = cache.c loop.c main.c ops.c fsys.c xdr.c decode.c OBJS = $(subst .c,.o,$(SRCS)) LCLHDRS = nfsd.h target = nfsd Index: ops.c =================================================================== RCS file: /cvsroot/hurd/hurd/nfsd/ops.c,v retrieving revision 1.8 diff --unified -w -i -r1.8 ops.c --- ops.c 29 Sep 2002 15:12:48 -0000 1.8 +++ ops.c 24 Nov 2002 07:23:51 -0000 @@ -60,7 +60,7 @@ int *p) { uid_t uid, gid; - off_t size; + loff_t size; time_value_t atime, mtime; struct stat st; error_t err; @@ -233,7 +233,7 @@ int **reply, int version) { - off_t offset; + loff_t offset; size_t count; char buf[2048], *bp = buf; mach_msg_type_number_t buflen = sizeof (buf); @@ -272,7 +272,7 @@ int **reply, int version) { - off_t offset; + loff_t offset; size_t count; error_t err; mach_msg_type_number_t amt; @@ -285,7 +285,7 @@ p++; count = ntohl (*p); p++; - bp = (char *) *reply; + bp = (char *) p; while (count) { @@ -323,7 +323,7 @@ struct stat st; mode_t mode; int statchanged = 0; - off_t size; + loff_t size; p = decode_name (p, &name); mode = ntohl (*p); @@ -351,7 +351,7 @@ size = ntohl (*p); p++; - if (size != -1 && size != st.st_size) + if ((int) size != -1 && size != st.st_size) { err = file_set_size (newport, size); statchanged = 1; _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd