HomeFreeBSD

Clarify zpool_events_next() comment

Description

Clarify zpool_events_next() comment

Due to the very poorly chosen argument name 'cleanup_fd' it was
completely unclear that this file descriptor is used to track the
current cursor location. When the file descriptor is created by
opening ZFS_DEV a private cursor is created in the kernel for the
returned file descriptor. Subsequent calls to zpool_events_next()
and zpool_events_seek() then require the file descriptor as an
argument to reposition the cursor. When the file descriptor is
closed the kernel state tracking the cursor is destroyed.

This patch contains no functional change, it just changes a
few variable names and clarifies the documentation.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
Issue #2

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Nov 23 2013, 12:00 AM
Parents
rG75e3ff58feda: Add zpool_events_seek() functionality
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG9b101a73203f: Clarify zpool_events_next() comment (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Mar 31 2014, 11:11 PM