rbd: add doc comment for GetSnapshotNames function

This function also happens to be mis-named.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2020-02-25 14:46:24 -05:00 committed by John Mulligan
parent 644b7939d0
commit 53fd07425a
1 changed files with 5 additions and 2 deletions

View File

@ -878,8 +878,11 @@ func (image *Image) Flush() error {
return getError(C.rbd_flush(image.image))
}
// int rbd_snap_list(rbd_image_t image, rbd_snap_info_t *snaps, int *max_snaps);
// void rbd_snap_list_end(rbd_snap_info_t *snaps);
// GetSnapshotNames returns more than just the names of snapshots
// associated with the rbd image.
//
// Implements:
// int rbd_snap_list(rbd_image_t image, rbd_snap_info_t *snaps, int *max_snaps);
func (image *Image) GetSnapshotNames() (snaps []SnapInfo, err error) {
if err := image.validate(imageIsOpen); err != nil {
return nil, err