summaryrefslogtreecommitdiff
path: root/nfsd/ops.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1996-08-13 20:09:00 +0000
committerThomas Bushnell <thomas@gnu.org>1996-08-13 20:09:00 +0000
commit7f95a8a4c1a999bee77a323489341505abe2d3db (patch)
treeb75b85bc8d298d7b0b015d2a9b7400310515f793 /nfsd/ops.c
parentb615272fa6dc79bd23eba5fe889733773076779d (diff)
*** empty log message ***
Diffstat (limited to 'nfsd/ops.c')
-rw-r--r--nfsd/ops.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/nfsd/ops.c b/nfsd/ops.c
index cbcfb409..4319d226 100644
--- a/nfsd/ops.c
+++ b/nfsd/ops.c
@@ -120,14 +120,21 @@ op_setattr (struct cache_handle *c,
{
error_t err = 0;
mode_t mode;
+ struct stat st;
mode = ntohl (*p++);
if (mode != -1)
err = file_chmod (c->port, mode);
+
+ if (!err)
+ err = complete_setattr (c->port, p);
+ if (!err)
+ err = io_stat (c->port, &st);
if (err)
return err;
- return complete_setattr (c->port, p);
+ *reply = encode_fattr (*reply, &st);
+ return 0;
}
static error_t
@@ -290,7 +297,7 @@ op_create (struct cache_handle *c,
p = decode_name (p, &name);
mode = ntohl (*p++);
- err = dir_lookup (c->port, name, O_NOTRANS | O_CREAT | O_EXCL, mode,
+ err = dir_lookup (c->port, name, O_NOTRANS | O_CREAT | O_TRUNC, mode,
&do_retry, retry_name, &newport);
if (!err
&& (do_retry != FS_RETRY_NORMAL