lsm_string_list_elem_set - Man Page

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

sl

Pointer of lsm_string_list to update.

index

The element index, starting from 0.

value

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.

Info

April 2023 Libstoragemgmt C API Manual