AUSEARCH_SET_STOP(3)

πŸ“¦
version 4.2.1 Β· 3 versions
, in alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, fedora 43, fedora 44, nixpkgs unstable, ubuntu resolute, ubuntu stonking

✨ AUSEARCH_SET_STOP β€” the "where do we stop tho" function ✨

okay bestie, gather round, because this one is literally just about vibes and destinations πŸŽ€ it's ausearch_set_stop, a little function from the Linux Audit API (that's the <auparse.h> girlies), and what it does is decide where your internal cursor lands once a search condition hits. that's it. that's the whole job. but she does it so well πŸ’…


🌸 SYNOPSIS 🌸

#include <auparse.h>

int ausearch_set_stop(auparse_state_t *au,austop_t"where);"
yes the header include is <auparse.h>, do not come for me, that's just how it is 🫢

πŸ’– DESCRIPTION πŸ’–

so like. ausearch_set_stop is the one that decides where the internal cursor stops when a search condition gets met. and babes, you have options β€” three of them, and they're all giving very different energy:

  • AUSEARCH_STOP_EVENT β€” this one repositions the cursors all the way back to the first field of the first record of the event that contains the items you were searching for. like, rewinding to the very beginning of the whole saga 🌈
  • AUSEARCH_STOP_RECORD β€” this one repositions the cursors to the first field of the record containing the items searched for. so like, the start of the chapter, not the whole book πŸ“–
  • AUSEARCH_STOP_FIELD β€” this one is the no-nonsense queen πŸ‘‘ she simply stops on the current field the moment the evaluation of the rules becomes true. right here, right now, no rewind, periodt.

⭐ RETURN VALUE ⭐

  • returns -1 if an error occurs 😭
  • otherwise 0 for success ✨

that's it. binary. iconic.


πŸ¦‹ SEE ALSO πŸ¦‹

go read those next, bestie, they're the rest of the friend group πŸ’œ


πŸŽ€ AUTHOR πŸŽ€

Steve Grubb β€” yes, that Steve Grubb. the legend. the main character. we love him, no cap 🫢


and that's the whole page!! this one came to you from Red Hat, dated Feb 2007, and it's still out here doing its thing πŸ’– mwah, go set some stops, ily ✨