/[hurd]/hurd/nfs/ops.c
ViewVC logotype

Diff of /hurd/nfs/ops.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.41 by marcus, Tue Jan 30 00:38:45 2001 UTC revision 1.42 by roland, Wed May 8 10:11:55 2002 UTC
# Line 1  Line 1 
1  /* Libnetfs callbacks for node operations in NFS client  /* Libnetfs callbacks for node operations in NFS client
2     Copyright (C) 1994, 1995, 1996, 1997, 1999 Free Software Foundation     Copyright (C) 1994,95,96,97,99,2002 Free Software Foundation, Inc.
3    
4     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
5     modify it under the terms of the GNU General Public License as     modify it under the terms of the GNU General Public License as
# Line 21  Line 21 
21  #include <string.h>  #include <string.h>
22  #include <fcntl.h>  #include <fcntl.h>
23  #include <stdio.h>  #include <stdio.h>
24    #include <stddef.h>
25  #include <dirent.h>  #include <dirent.h>
26  #include <unistd.h>  #include <unistd.h>
27  #include <maptime.h>  #include <maptime.h>
# Line 88  process_returned_stat (struct node *np, Line 89  process_returned_stat (struct node *np,
89    else    else
90      {      {
91        int attrs_exist;        int attrs_exist;
92          
93        attrs_exist = ntohl (*p++);        attrs_exist = ntohl (*p++);
94        if (attrs_exist)        if (attrs_exist)
95          p = register_fresh_stat (np, p);          p = register_fresh_stat (np, p);
# Line 290  netfs_attempt_utimes (struct iouser *cre Line 291  netfs_attempt_utimes (struct iouser *cre
291    error_t err;    error_t err;
292    struct timeval tv;    struct timeval tv;
293    struct timespec current;    struct timespec current;
294        
295    /* XXX For version 3 we can actually do this right, but we don't    /* XXX For version 3 we can actually do this right, but we don't
296       just yet. */       just yet. */
297    if (!atime || !mtime)    if (!atime || !mtime)
# Line 306  netfs_attempt_utimes (struct iouser *cre Line 307  netfs_attempt_utimes (struct iouser *cre
307      return errno;      return errno;
308    
309    p = xdr_encode_fhandle (p, &np->nn->handle);    p = xdr_encode_fhandle (p, &np->nn->handle);
310    p = xdr_encode_sattr_times (p,    p = xdr_encode_sattr_times (p,
311                                atime ?: &current,                                atime ?: &current,
312                                mtime ?: &current);                                mtime ?: &current);
313    if (protocol_version == 3)    if (protocol_version == 3)
314      *p++ = 0;                   /* guard check == 0 */      *p++ = 0;                   /* guard check == 0 */
# Line 1222  netfs_attempt_unlink (struct iouser *cre Line 1223  netfs_attempt_unlink (struct iouser *cre
1223       away entirely. */       away entirely. */
1224    if (np->references > 1)    if (np->references > 1)
1225      {      {
1226        char *newname;        char *newname = 0;
1227        int n = 0;        int n = 0;
1228    
1229        mutex_unlock (&dir->lock);        mutex_unlock (&dir->lock);
# Line 1237  netfs_attempt_unlink (struct iouser *cre Line 1238  netfs_attempt_unlink (struct iouser *cre
1238    
1239        do        do
1240          {          {
1241            sprintf (newname, ".nfs%xgnu.%d", (int) np, n++);            sprintf (newname, ".nfs%txgnu.%d", (ptrdiff_t) np, n++);
1242            err = netfs_attempt_link (cred, dir, np, newname, 1);            err = netfs_attempt_link (cred, dir, np, newname, 1);
1243          }          }
1244        while (err == EEXIST);        while (err == EEXIST);

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26