AUPARSE_GET_NUM_FIELDS(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

✨ AUPARSE_GET_NUM_FIELDS ✨

okay bestie, welcome to the Linux Audit API corner of the manual β€” this is page 3 of the auparse saga, and today's main character is auparse_get_num_fields. πŸŽ€


🌸 NAME 🌸

auparse_get_num_fields β€” get the number of fields, fr fr πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <auparse.h>

unsigned int auparse_get_num_fields(const auparse_state_t *au);"

πŸ’– DESCRIPTION πŸ’–

so like. auparse_get_num_fields gets the number of fields in the current record of the current event. that's it, that's the whole vibe. it's giving "count the things, hand you the number" and honestly? iconic. 🫢

no cap, that's literally the entire job. you hand it your auparse state, it tells you how many fields are sitting in the record you're currently parked on. lowkey the most useful little helper ever. ✨


🌈 RETURN VALUE 🌈

  • Returns 0 if an error occurs 😭
  • otherwise, it returns the number of fields πŸ‘‘

so yeah β€” if you get 0 back, that's not "zero fields bestie, slay", that's an error. keep that in mind. πŸ’€


πŸŽ€ SEE ALSO πŸŽ€


⭐ AUTHOR ⭐

Steve Grubb πŸ‘‘ (we love a legend)


shoutout to Red Hat for putting this out there, and this lil page is dated Feb 2007 β€” vintage but still eating. πŸ“

mwah, go count some fields bestie πŸ’…βœ¨