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 β¨
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.hinclude 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 πβ¨π
π¦ where this page comes from
- debian trixie: libvsgpt-dev 0~20240504-2+b1 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libvsgpt-devel 20240504-bp160.1.13 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libvsgpt-devel 20240504-bp160.1.13 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libvsgpt-devel 20240504-bp160.1.13 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libvsgpt-devel 20240504-bp160.1.13 Β· LGPL-3.0-or-later
- ubuntu questing: libvsgpt-dev 0~20240504-2build1
- ubuntu resolute: libvsgpt-dev 0~20240504-2build2 Β· LGPL-3.0-or-later
- ubuntu stonking: libvsgpt-dev 0~20240504-2build2 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms