[BACK]Return to kernfs_vnops.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / miscfs / kernfs

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/miscfs/kernfs/kernfs_vnops.c between version 1.113 and 1.114

version 1.113, 2005/11/02 12:38:59 version 1.114, 2005/11/23 22:00:32
Line 922  kernfs_read(v)
Line 922  kernfs_read(v)
         struct uio *uio = ap->a_uio;          struct uio *uio = ap->a_uio;
         struct kernfs_node *kfs = VTOKERN(ap->a_vp);          struct kernfs_node *kfs = VTOKERN(ap->a_vp);
         char strbuf[KSTRING], *bf;          char strbuf[KSTRING], *bf;
         off_t off;          int off;
         size_t len;          size_t len;
         int error;          int error;
   
         if (ap->a_vp->v_type == VDIR)          if (ap->a_vp->v_type == VDIR)
                 return (EOPNOTSUPP);                  return (EOPNOTSUPP);
   
           off = (int)uio->uio_offset;
         /* Don't allow negative offsets */          /* Don't allow negative offsets */
         if (uio->uio_offset < 0)          if (off < 0)
                 return EINVAL;                  return EINVAL;
   
         off = uio->uio_offset;  
         bf = strbuf;          bf = strbuf;
         if ((error = kernfs_xread(kfs, off, &bf, sizeof(strbuf), &len)) == 0)          if ((error = kernfs_xread(kfs, off, &bf, sizeof(strbuf), &len)) == 0)
                 error = uiomove(bf, len, uio);                  error = uiomove(bf, len, uio);

Legend:
Removed from v.1.113  
changed lines
  Added in v.1.114

CVSweb <webmaster@jp.NetBSD.org>