return (char *) dp - (char *) buf;
return (char *) dp - buf;
__getdirentries (fd, buf, nbytes, basep)     int fd;     char *buf;     size_t nbytes;     off_t *basep;{  off_t base = __lseek (fd, (off_t) 0, SEEK_CUR);  size_t red_nbytes;  struct kernel_dirent *kdp;  struct dirent *dp;  int retval;  red_nbytes = nbytes - (nbytes / (offsetof (struct dirent, d_name) + 3));  dp = (struct dirent *) buf;  kdp = (struct kernel_dirent *) (buf + (nbytes - red_nbytes));  retval = __getdents (fd, (char *) kdp, red_nbytes);  while ((char *) kdp < buf + (nbytes - red_nbytes) + retval)    {      dp->d_ino = kdp->d_ino;      dp->d_off = kdp->d_off;      dp->d_reclen = (kdp->d_reclen		      + (offsetof (struct dirent, d_name)			 - offsetof (struct kernel_dirent, d_name)));      dp->d_type = DT_UNKNOWN;      memmove (dp->d_name, kdp->d_name,	       kdp->d_reclen - offsetof (struct kernel_dirent, d_name));      dp = (struct dirent *) (((char *) dp) + dp->d_reclen);      kdp = (struct kernel_dirent *) (((char *) kdp) + kdp->d_reclen);      if ((char *) dp >= (char *) kdp)	{	  /* Our heuristic failed.  We read too many entries.  Reset	     the stream.  */	  off_t used = ((char *) kdp - (char *) buf) - (nbytes - red_nbytes);	  base = __lseek (fd, retval - used, SEEK_CUR);	}    }  if (basep)    *basep = base;  return (char *) dp - (char *) buf;}