lsm_string_list_delete(3)

πŸ“¦
version 1.10.3 Β· 3 versions
, in fedora 43, fedora 44

πŸ’– lsm_string_list_delete β€” a libstoragemgmt C API moment πŸ’–

okay bestie, welcome to the Libstoragemgmt C API Manual page for lsm_string_list_delete(3) β€” yes it's a mouthful, no we're not shortening it, it's iconic like that ✨


🌸 NAME 🌸

lsm_string_list_delete β€” deletes a specified element from an lsm_string_list. that's it. that's the whole job. she's a specialist πŸ’…


✨ SYNOPSIS ✨

int lsm_string_list_delete (lsm_string_list *sl, uint32_t index);

πŸŽ€ ARGUMENTS πŸŽ€

  • sl β€” an lsm_string_list. it's a pointer to the lsm_string_list you wanna update, so like… hand her the list, she's gonna touch it 🫢
  • index β€” a uint32_t. the element index. and listen, it starts from 0. zero. not one. zero. counting from zero is the vibe, iykyk 🌈

πŸ¦‹ VERSION πŸ¦‹

1.0 β€” vintage but make it timeless πŸ’œ


πŸ’€ DESCRIPTION πŸ’€

okay so here's the tea: lsm_string_list_delete deletes the specified element from your lsm_string_list. the string of that element gets freed β€” gone, ghosted, no coming back 😭

and because she's thorough, the pointer you got from lsm_string_list_elem_get will be invalid after this. like, do NOT touch it. that pointer is ex-communicated fr fr πŸ’€

also, the element right after the deleted one moves down to fill the gap β€” classic little shift-down moment, very main character energy πŸ‘‘

⚠️ so if you were planning to iterate over the list deleting each element one by one, you gotta do it in reverse order. yes, backwards. no cap. if you go forward you will skip elements and you will be sad about it πŸ™ˆ

πŸ‘‘ RETURN πŸ‘‘

returns an error code, as enumerated by 'lsm_error_number':

  • LSM_ERR_OK β€” on success. slay! we ate! πŸŽ‰
  • LSM_ERR_INVALID_ARGUMENT β€” when any argument is NULL, or it's just not a valid lsm_string_list pointer. bestie, that's not a list, that's a problem 😭

and that's the whole page, no notes πŸ’…

kisses and clean memory management, this was the lsm_string_list_delete(3) page, dropping from the Libstoragemgmt C API Manual in February 2026 β€” go forth and delete responsibly, bestie πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from