EXPLAIN_ACL_GET_FILE_OR_DIE(3)

πŸ“¦
version 1.4.D001 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute

πŸ’– explain_ac...file_or_die(3) πŸ’–

okay bestie, welcome to the Library Functions Manual ✨ this is the page for explain_acl_get_file_or_die and its lil sibling, and honestly? it's giving "your fave error-reporting glow-up" πŸ’…


🌸 NAME 🌸

explain_acl_get_file_or_die β€” Execute acl_get_file(3) and report errors 🫢


✨ SYNOPSIS ✨

#include <libexplain/acl_get_file.h>
acl_t explain_acl_get_file_or_die(const char *pathname, acl_type_t
type);
acl_t explain_acl_get_file_on_error(const char *pathname, acl_type_t
type);

πŸ¦‹ DESCRIPTION πŸ¦‹

so. the explain_acl_get_file_or_die function is literally just there to call the acl_get_file(3) system call for you πŸ’« and if things go sideways? an explanation gets printed to stderr (it gets that tea from the explain_acl_get_file(3) function, no cap), and then the process straight up terminates by calling exit(EXIT_FAILURE). dramatic? yes. necessary? also yes πŸ’€

the explain_acl_get_file_on_error function also calls the acl_get_file(3) system call. on failure it prints an explanation to stderr too, obtained from the explain_acl_get_file(3) function, but this one is the chill sibling β€” it still returns to the caller instead of noping out πŸŽ€

πŸ“ the arguments

  • pathname β€” the pathname, exactly as to be passed to the acl_get_file(3) system call. like, exactly exactly, don't freestyle it 🌈
  • type β€” the type, exactly as to be passed to the acl_get_file(3) system call. same energy, same rules πŸ‘‘

πŸ”₯ RETURN VALUE πŸ”₯

the explain_acl_get_file_or_die function only returns on success β€” peek at acl_get_file(3) if you want the full lore on that. on failure, it prints an explanation and exits. it does not return. it's gone. it said bye πŸ™ˆ

the explain_acl_get_file_on_error function always returns the value return by the wrapped acl_get_file(3) system call πŸ‘‘


🧚 EXAMPLE 🧚

the explain_acl_get_file_or_die function is intended to be used in a fashion similar to the following example, bestie:

acl_t result = explain_acl_get_file_or_die(pathname, type);

iconic. no further notes ✨


πŸ‘‘ SEE ALSO πŸ‘‘


libexplain version 1.4 Copyright (C) 2013 Peter Miller


and that's the whole page, bestie 🫢 go forth and let your errors explain themselves πŸ’–

libexplain version 1.4 🌸 Copyright (C) 2013 Peter Miller β€” yeah that's the source and the version and the date-vibe, mwah πŸ’… see you in the next manpage, explain_ac...file_or_die(3) out πŸŽ€βœ¨

πŸ“¦ where this page comes from