libvsgpt(3)

πŸ’– libvsgpt β€” bestie's guide to the GUID Partition Table (GPT) volume system format πŸ’–

okay so this is the manual for libvsgpt.h, aka the Library Functions Manual page libvsgpt(3). she's a library that lets you access the GUID Partition Table (GPT) volume system format, and honestly? she ate. let's get into it 🫢


✨ SYNOPSIS ✨

#include <libvsgpt.h>

🌸 Support functions 🌸

const char *
libvsgpt_get_version(void);

int
libvsgpt_get_access_flags_read(void);

int
libvsgpt_get_access_flags_read_write(void);

int
libvsgpt_get_access_flags_write(void);

int
libvsgpt_get_codepage(int *codepage, libvsgpt_error_t **error);

int
libvsgpt_set_codepage(int codepage, libvsgpt_error_t **error);

int
libvsgpt_check_volume_signature(const char *filename,
    libvsgpt_error_t **error);

Available when compiled with wide character string support:

int
libvsgpt_check_volume_signature_wide(const wchar_t *filename,
    libvsgpt_error_t **error);

Available when compiled with libbfio support:

int
libvsgpt_check_volume_signature_file_io_handle(libbfio_handle_t *file_io_handle,
    libvsgpt_error_t **error);

🌈 Notify functions 🌈

void
libvsgpt_notify_set_verbose(int verbose);

int
libvsgpt_notify_set_stream(FILE *stream, libvsgpt_error_t **error);

int
libvsgpt_notify_stream_open(const char *filename,
    libvsgpt_error_t **error);

int
libvsgpt_notify_stream_close(libvsgpt_error_t **error);

πŸ’€ Error functions πŸ’€

void
libvsgpt_error_free(libvsgpt_error_t **error);

int
libvsgpt_error_fprint(libvsgpt_error_t *error, FILE *stream);

int
libvsgpt_error_sprint(libvsgpt_error_t *error, char *string,
    size_t size);

int
libvsgpt_error_backtrace_fprint(libvsgpt_error_t *error, FILE *stream);

int
libvsgpt_error_backtrace_sprint(libvsgpt_error_t *error, char *string,
    size_t size);

πŸ‘‘ Volume functions πŸ‘‘

int
libvsgpt_volume_initialize(libvsgpt_volume_t **volume,
    libvsgpt_error_t **error);

int
libvsgpt_volume_free(libvsgpt_volume_t **volume,
    libvsgpt_error_t **error);

int
libvsgpt_volume_signal_abort(libvsgpt_volume_t *volume,
    libvsgpt_error_t **error);

int
libvsgpt_volume_open(libvsgpt_volume_t *volume, const char *filename,
    int access_flags, libvsgpt_error_t **error);

int
libvsgpt_volume_close(libvsgpt_volume_t *volume,
    libvsgpt_error_t **error);

int
libvsgpt_volume_get_bytes_per_sector(libvsgpt_volume_t *volume,
    uint32_t *bytes_per_sector, libvsgpt_error_t **error);

int
libvsgpt_volume_get_disk_identifier(libvsgpt_volume_t *volume,
    uint8_t *guid_data, size_t guid_data_size,
    libvsgpt_error_t **error);

int
libvsgpt_volume_get_number_of_partitions(libvsgpt_volume_t *volume,
    int *number_of_partitions, libvsgpt_error_t **error);

int
libvsgpt_volume_get_partition_by_index(libvsgpt_volume_t *volume,
    int partition_index, libvsgpt_partition_t **partition,
    libvsgpt_error_t **error);

int
libvsgpt_volume_has_partition_with_identifier(libvsgpt_volume_t *volume,
    uint32_t entry_index, libvsgpt_error_t **error);

int
libvsgpt_volume_get_partition_by_identifier(libvsgpt_volume_t *volume,
    uint32_t entry_index, libvsgpt_partition_t **partition,
    libvsgpt_error_t **error);

Available when compiled with wide character string support:

int
libvsgpt_volume_open_wide(libvsgpt_volume_t *volume,
    const wchar_t *filename, int access_flags,
    libvsgpt_error_t **error);

Available when compiled with libbfio support:

int
libvsgpt_volume_open_file_io_handle(libvsgpt_volume_t *volume,
    libbfio_handle_t *file_io_handle, int access_flags,
    libvsgpt_error_t **error);

πŸ¦‹ Partition functions πŸ¦‹

int
libvsgpt_partition_free(libvsgpt_partition_t **partition,
    libvsgpt_error_t **error);

int
libvsgpt_partition_get_entry_index(libvsgpt_partition_t *partition,
    uint32_t *entry_index, libvsgpt_error_t **error);

int
libvsgpt_partition_get_identifier(libvsgpt_partition_t *partition,
    uint8_t *guid_data, size_t guid_data_size,
    libvsgpt_error_t **error);

int
libvsgpt_partition_get_type_identifier(libvsgpt_partition_t *partition,
    uint8_t *guid_data, size_t guid_data_size,
    libvsgpt_error_t **error);

int
libvsgpt_partition_get_type(libvsgpt_partition_t *partition,
    uint8_t *type, libvsgpt_error_t **error);

int
libvsgpt_partition_get_volume_offset(libvsgpt_partition_t *partition,
    off64_t *volume_offset, libvsgpt_error_t **error);

ssize_t
libvsgpt_partition_read_buffer(libvsgpt_partition_t *partition,
    void *buffer, size_t buffer_size, libvsgpt_error_t **error);

ssize_t
libvsgpt_partition_read_buffer_at_offset(libvsgpt_partition_t *partition,
    void *buffer, size_t buffer_size, off64_t offset,
    libvsgpt_error_t **error);

off64_t
libvsgpt_partition_seek_offset(libvsgpt_partition_t *partition,
    off64_t offset, int whence, libvsgpt_error_t **error);

int
libvsgpt_partition_get_offset(libvsgpt_partition_t *partition,
    off64_t *offset, libvsgpt_error_t **error);

int
libvsgpt_partition_get_size(libvsgpt_partition_t *partition,
    size64_t *size, libvsgpt_error_t **error);

✨ DESCRIPTION ✨

okay so the one function the manpage actually spells out for you:

  • libvsgpt_get_version() β€” you call her when you wanna know the library version. that's it, that's the vibe πŸ’…

✨ RETURN VALUES ✨

so here's the tea: most of these functions return NULL or -1 when something goes wrong β€” which one you get depends on the return type, bestie. for the actual, real, specific return values you gotta go look at "libvsgpt.h" itself. no cap.


✨ ENVIRONMENT ✨

None 🫢 (nothing to configure here, she's low maintenance)


✨ FILES ✨

None πŸŽ€ (also nothing)


✨ NOTES ✨

libvsgpt can be compiled with wide character support (wchar_t). yes, she's bilingual ✨

to compile libvsgpt with wide character support use:

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

or define:

_UNICODE

or

UNICODE

during compilation.

and if you're wondering whether your build has it β€” LIBVSGPT_WIDE_CHARACTER_TYPE in libvsgpt/features.h can be used to determine if libvsgpt was compiled with wide character support. go check her πŸ’œ


✨ BUGS ✨

found a bug? any kind of bug? pls report bugs of any kind on the project issue tracker, she wants to hear from you:

https://github.com/libyal/libvsgpt/issues

✨ AUTHOR ✨

these man pages are generated from "libvsgpt.h". iconic behaviour honestly πŸ’…


Copyright (C) 2019-2024, 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. (fr fr, no warranty, she said what she said 😭)


✨ SEE ALSO ✨

  • the libvsgpt.h include file 🌸

and that's the whole page bestie!! this one's libvsgpt, dated January 21, 2021, and she's page libvsgpt(3) of the manual. mwah, go partition something responsibly πŸ’–βœ¨πŸŽ€