Scroll to navigation

lsm_string_list_delete(3) Libstoragemgmt C API Manual lsm_string_list_delete(3)

NAME

lsm_string_list_delete - Deletes specified element from lsm_string_list.

SYNOPSIS

int lsm_string_list_delete (lsm_string_list *sl, uint32_t index);

ARGUMENTS

lsm_string_list. Pointer of lsm_string_list to update.
uint32_t. The element index. Start from 0.

VERSION

1.0

DESCRIPTION

Deletes the specified element from lsm_string_list. The string of that element will be freed. The pointer retrieved by lsm_string_list_elem_get will be invalid. The element after this one will moved down, thus if you wanted to iterate over the list deleting each element one by one you need to do in reverse order.

RETURN

Error code as enumerated by 'lsm_error_number':
* LSM_ERR_OK
On success.
* LSM_ERR_INVALID_ARGUMENT
When any argument is NULL or not a valid lsm_string_list
pointer.

lsm_string_list_delete May 2019