libhibr(3)

πŸ“¦ in opensuse-leap 16.0

✨ libhibr(3) ✨

okay so bestie, welcome to the libhibr glow-up πŸ’… β€” this is page 3 of the library functions manual, and it's literally all about the Library to access the Windows Hibernation File (hiberfil.sys) format. yes, that hiberfil.sys. the big sleepy boi. let's get into it πŸ¦‹


🌸 NAME 🌸

libhibr.h β€” the Library to access the Windows Hibernation File (hiberfil.sys) format. it's giving "let me peek inside your hibernation file" and honestly? iconic πŸ‘‘


✨ SYNOPSIS ✨

#include <libhibr.h>

πŸ’– Support functions

const char *
libhibr_get_version(void);

int
libhibr_get_access_flags_read(void);

int
libhibr_get_access_flags_read_write(void);

int
libhibr_get_access_flags_write(void);

int
libhibr_get_codepage(int *codepage, libhibr_error_t **error);

int
libhibr_set_codepage(int codepage, libhibr_error_t **error);

int
libhibr_check_file_signature(const char *filename,
    libhibr_error_t **error);

🧚 Available when compiled with wide character string support:

int
libhibr_check_file_signature_wide(const wchar_t *filename,
    libhibr_error_t **error);

πŸ“ Available when compiled with libbfio support:

int
libhibr_check_file_signature_file_io_handle(libbfio_handle_t *bfio_handle,
    libhibr_error_t **error);

πŸŽ€ Notify functions

void
libhibr_notify_set_verbose(int verbose);

int
libhibr_notify_set_stream(FILE *stream, libhibr_error_t **error);

int
libhibr_notify_stream_open(const char *filename,
    libhibr_error_t **error);

int
libhibr_notify_stream_close(libhibr_error_t **error);

πŸ’€ Error functions

void
libhibr_error_free(libhibr_error_t **error);

int
libhibr_error_fprint(libhibr_error_t *error, FILE *stream);

int
libhibr_error_sprint(libhibr_error_t *error, char *string, size_t size);

int
libhibr_error_backtrace_fprint(libhibr_error_t *error, FILE *stream);

int
libhibr_error_backtrace_sprint(libhibr_error_t *error, char *string,
    size_t size);

πŸ¦‹ File functions

int
libhibr_file_initialize(libhibr_file_t **file, libhibr_error_t **error);

int
libhibr_file_free(libhibr_file_t **file, libhibr_error_t **error);

int
libhibr_file_signal_abort(libhibr_file_t *file,
    libhibr_error_t **error);

int
libhibr_file_open(libhibr_file_t *file, const char *filename,
    int access_flags, libhibr_error_t **error);

int
libhibr_file_close(libhibr_file_t *file, libhibr_error_t **error);

ssize_t
libhibr_file_read_buffer(libhibr_file_t *file, void *buffer,
    size_t buffer_size, libhibr_error_t **error);

ssize_t
libhibr_file_read_buffer_at_offset(libhibr_file_t *file, void *buffer,
    size_t buffer_size, off64_t offset, libhibr_error_t **error);

off64_t
libhibr_file_seek_offset(libhibr_file_t *file, off64_t offset,
    int whence, libhibr_error_t **error);

int
libhibr_file_get_offset(libhibr_file_t *file, off64_t *offset,
    libhibr_error_t **error);

int
libhibr_file_get_media_size(libhibr_file_t *file, size64_t *media_size,
    libhibr_error_t **error);

🌈 Available when compiled with wide character string support:

int
libhibr_file_open_wide(libhibr_file_t *file, const wchar_t *filename,
    int access_flags, libhibr_error_t **error);

⭐ Available when compiled with libbfio support:

int
libhibr_file_open_file_io_handle(libhibr_file_t *file,
    libbfio_handle_t *file_io_handle, int access_flags,
    libhibr_error_t **error);

πŸ‘‘ DESCRIPTION πŸ‘‘

so the one function that gets a whole paragraph to itself: libhibr_get_version() β€” use it to retrieve the library version. that's it, that's the description. it's a little diva like that πŸ’…


πŸ’œ RETURN VALUES πŸ’œ

Most of the functions return NULL or -1 on error, dependent on the return type. ngl bestie, the actual return values live in "libhibr.h", so go look there for the specifics β€” that's where the receipts are πŸ”₯


🌸 ENVIRONMENT 🌸

None

like literally nothing. empty. the environment said "no thoughts, head empty" πŸ™ˆ


πŸŽ€ FILES πŸŽ€

None


🧚 NOTES 🧚

libhibr can be compiled with wide character support (wchar_t). pretty slay of it honestly ✨

To compile libhibr with wide character support use:

./configure --enable-wide-character-type=yes

or define:

_UNICODE

or:

UNICODE

during compilation.

LIBHIBR_WIDE_CHARACTER_TYPE in libhibr/features.h can be used to determine if libhibr was compiled with wide character support. iykyk β€” that's your vibe check for wide char mode πŸ¦‹


πŸ’€ BUGS πŸ’€

Please report bugs of any kind on the project issue tracker: https://github.com/libyal/libhibr/issues

fr fr, any kind. don't be shy about it 🫢


🌈 AUTHOR 🌈

These man pages are generated from "libhibr.h". so like, the header wrote its own autobiography. main character energy πŸ“–βœ¨


Copyright (C) 2012-2021, Joachim Metz <joachim.metz@gmail.com>.

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

that "NO warranty" is in all caps in the original bestie, so please take it seriously β€” no cap, there is genuinely no warranty 😭

πŸ”₯ SEE ALSO πŸ”₯

the libhibr.h include file β€” go read it, it's the whole personality of this library πŸ’–


and that's the page! brought to you by libhibr, dated September 20, 2019, straight out of the Library Functions Manual. mwah πŸ’‹πŸ¦‹πŸ’