/[hurd]/hurd/libnetfs/io-read.c
ViewVC logotype

Diff of /hurd/libnetfs/io-read.c

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

revision 1.10 by tb, Sun Jul 11 05:30:09 1999 UTC revision 1.11 by marcus, Thu May 23 21:24:18 2002 UTC
# Line 65  netfs_S_io_read (struct protid *user, Line 65  netfs_S_io_read (struct protid *user,
65    
66        if (start + amount > size)        if (start + amount > size)
67          amount = size - start;          amount = size - start;
68          if (amount > size)
69            amount = size;
70    
71        if (start >= size)        if (start >= size)
72          {          {
# Line 74  netfs_S_io_read (struct protid *user, Line 76  netfs_S_io_read (struct protid *user,
76        else if (amount < size || start > 0)        else if (amount < size || start > 0)
77          {          {
78            char *whole_link = alloca (size);            char *whole_link = alloca (size);
79            err = netfs_attempt_readlink (user->user, node, *data);            err = netfs_attempt_readlink (user->user, node, whole_link);
80            if (! err)            if (! err)
81              {              {
82                memcpy (*data, whole_link + start, amount);                memcpy (*data, whole_link + start, amount);
# Line 82  netfs_S_io_read (struct protid *user, Line 84  netfs_S_io_read (struct protid *user,
84              }              }
85          }          }
86        else        else
87          err = netfs_attempt_readlink (user->user, node, *data);          {
88              err = netfs_attempt_readlink (user->user, node, *data);
89              *datalen = amount;
90            }
91      }      }
92    else    else
93      /* Read from a normal file.  */      /* Read from a normal file.  */

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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