Scroll to navigation

lsm_string_list_elem_set(3) Libstoragemgmt C API Manual lsm_string_list_elem_set(3)

NAME

lsm_string_list_elem_set - Sets the specified element of lsm_string_list.

SYNOPSIS

int lsm_string_list_elem_set (lsm_string_list *sl, uint32_t index, const char *value);

ARGUMENTS

Pointer of lsm_string_list to update.
The element index, starting from 0.
The string to store in lsm_string_list.

VERSION

1.0

DESCRIPTION

Sets the specified element of lsm_string_list. The string will be copied and managed by lsm_string_list. The memory of old string will be freed. If specified index is larger than lsm_string_list size, the lsm_string_list will be automatically grow and padding with NULL.

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_ERR_NO_MEMORY
When no enough memory.

lsm_string_list_elem_set April 2023