Changeset View
Changeset View
Standalone View
Standalone View
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
Show First 20 Lines • Show All 1,091 Lines • ▼ Show 20 Lines | if (error != 0) { | ||||
return (error); | return (error); | ||||
} | } | ||||
entry.d_fileno = id; | entry.d_fileno = id; | ||||
entry.d_type = DT_DIR; | entry.d_type = DT_DIR; | ||||
strcpy(entry.d_name, snapname); | strcpy(entry.d_name, snapname); | ||||
entry.d_namlen = strlen(entry.d_name); | entry.d_namlen = strlen(entry.d_name); | ||||
entry.d_reclen = sizeof(entry); | entry.d_reclen = sizeof(entry); | ||||
/* NOTE: d_off is the offset for the *next* entry. */ | |||||
entry.d_off = cookie + dots_offset; | |||||
error = vfs_read_dirent(ap, &entry, uio->uio_offset); | error = vfs_read_dirent(ap, &entry, uio->uio_offset); | ||||
if (error != 0) { | if (error != 0) { | ||||
if (error == ENAMETOOLONG) | if (error == ENAMETOOLONG) | ||||
error = 0; | error = 0; | ||||
ZFS_EXIT(zfsvfs); | ZFS_EXIT(zfsvfs); | ||||
return (SET_ERROR(error)); | return (SET_ERROR(error)); | ||||
} | } | ||||
uio->uio_offset = cookie + dots_offset; | uio->uio_offset = cookie + dots_offset; | ||||
▲ Show 20 Lines • Show All 251 Lines • Show Last 20 Lines |