Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/fdescfs/fdesc_vnops.c
Show First 20 Lines • Show All 568 Lines • ▼ Show 20 Lines | default: | ||||
break; | break; | ||||
dp->d_namlen = sprintf(dp->d_name, "%d", fcnt); | dp->d_namlen = sprintf(dp->d_name, "%d", fcnt); | ||||
dp->d_reclen = UIO_MX; | dp->d_reclen = UIO_MX; | ||||
dp->d_type = (fmp->flags & FMNT_LINRDLNKF) == 0 ? | dp->d_type = (fmp->flags & FMNT_LINRDLNKF) == 0 ? | ||||
DT_CHR : DT_LNK; | DT_CHR : DT_LNK; | ||||
dp->d_fileno = i + FD_DESC; | dp->d_fileno = i + FD_DESC; | ||||
break; | break; | ||||
} | } | ||||
/* NOTE: d_off is the offset of the *next* entry. */ | |||||
dp->d_off = UIO_MX * (i + 1); | |||||
if (dp->d_namlen != 0) { | if (dp->d_namlen != 0) { | ||||
/* | /* | ||||
* And ship to userland | * And ship to userland | ||||
*/ | */ | ||||
FILEDESC_SUNLOCK(fdp); | FILEDESC_SUNLOCK(fdp); | ||||
error = uiomove(dp, UIO_MX, uio); | error = uiomove(dp, UIO_MX, uio); | ||||
if (error) | if (error) | ||||
goto done; | goto done; | ||||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |