libvsapm(3)
π libvsapm β the Apple Partition Map bestie manual π
okay so this is the page for libvsapm(3), from the Library Functions Manual β it's the library that lets you access the Apple Partition Map (APM) volume system format. yes, that APM. the classic Mac one. iconic behavior honestly.
β¨ NAME β¨
libvsapm.h β Library to access the Apple Partition Map (APM) volume system format
basically: you wanna poke at APM volumes? this is the header you include. periodt.
πΈ SYNOPSIS πΈ
#include <libvsapm.h>
π Support functions π
these are the little helper girlies π
const char *
libvsapm_get_version(void);
int
libvsapm_get_access_flags_read(void);
int
libvsapm_get_access_flags_read_write(void);
int
libvsapm_get_access_flags_write(void);
int
libvsapm_get_codepage(int *codepage, libvsapm_error_t **error);
int
libvsapm_set_codepage(int codepage, libvsapm_error_t **error);
int
libvsapm_check_volume_signature(const char *filename,
libvsapm_error_t **error);
Available when compiled with wide character string support:
int
libvsapm_check_volume_signature_wide(const wchar_t *filename,
libvsapm_error_t **error);
Available when compiled with libbfio support:
int
libvsapm_check_volume_signature_file_io_handle(libbfio_handle_t *file_io_handle,
libvsapm_error_t **error);
π¬ Notify functions π¬
so you can actually hear what's going on β¨
void
libvsapm_notify_set_verbose(int verbose);
int
libvsapm_notify_set_stream(FILE *stream, libvsapm_error_t **error);
int
libvsapm_notify_stream_open(const char *filename,
libvsapm_error_t **error);
int
libvsapm_notify_stream_close(libvsapm_error_t **error);
π Error functions π
for when things are Not Going Great (and for reading the receipts)
void
libvsapm_error_free(libvsapm_error_t **error);
int
libvsapm_error_fprint(libvsapm_error_t *error, FILE *stream);
int
libvsapm_error_sprint(libvsapm_error_t *error, char *string,
size_t size);
int
libvsapm_error_backtrace_fprint(libvsapm_error_t *error, FILE *stream);
int
libvsapm_error_backtrace_sprint(libvsapm_error_t *error, char *string,
size_t size);
π Volume functions π
the main character energy of this whole library ngl
int
libvsapm_volume_initialize(libvsapm_volume_t **volume,
libvsapm_error_t **error);
int
libvsapm_volume_free(libvsapm_volume_t **volume,
libvsapm_error_t **error);
int
libvsapm_volume_signal_abort(libvsapm_volume_t *volume,
libvsapm_error_t **error);
int
libvsapm_volume_open(libvsapm_volume_t *volume, const char *filename,
int access_flags, libvsapm_error_t **error);
int
libvsapm_volume_close(libvsapm_volume_t *volume,
libvsapm_error_t **error);
int
libvsapm_volume_get_bytes_per_sector(libvsapm_volume_t *volume,
uint32_t *bytes_per_sector, libvsapm_error_t **error);
int
libvsapm_volume_set_bytes_per_sector(libvsapm_volume_t *volume,
uint32_t bytes_per_sector, libvsapm_error_t **error);
int
libvsapm_volume_get_number_of_partitions(libvsapm_volume_t *volume,
int *number_of_partitions, libvsapm_error_t **error);
int
libvsapm_volume_get_partition_by_index(libvsapm_volume_t *volume,
int partition_index, libvsapm_partition_t **partition,
libvsapm_error_t **error);
Available when compiled with wide character string support:
int
libvsapm_volume_open_wide(libvsapm_volume_t *volume,
const wchar_t *filename, int access_flags,
libvsapm_error_t **error);
Available when compiled with libbfio support:
int
libvsapm_volume_open_file_io_handle(libvsapm_volume_t *volume,
libbfio_handle_t *file_io_handle, int access_flags,
libvsapm_error_t **error);
π¦ Partition functions π¦
the parts inside the volume. the little guys. the sub-plot. π«Ά
int
libvsapm_partition_free(libvsapm_partition_t **partition,
libvsapm_error_t **error);
int
libvsapm_partition_get_name_string(libvsapm_partition_t *partition,
char *string, size_t string_size, libvsapm_error_t **error);
int
libvsapm_partition_get_type_string(libvsapm_partition_t *partition,
char *string, size_t string_size, libvsapm_error_t **error);
int
libvsapm_partition_get_status_flags(libvsapm_partition_t *partition,
uint32_t *status_flags, libvsapm_error_t **error);
int
libvsapm_partition_get_volume_offset(libvsapm_partition_t *partition,
off64_t *volume_offset, libvsapm_error_t **error);
ssize_t
libvsapm_partition_read_buffer(libvsapm_partition_t *partition,
void *buffer, size_t buffer_size, libvsapm_error_t **error);
ssize_t
libvsapm_partition_read_buffer_at_offset(libvsapm_partition_t *partition,
void *buffer, size_t buffer_size, off64_t offset,
libvsapm_error_t **error);
off64_t
libvsapm_partition_seek_offset(libvsapm_partition_t *partition,
off64_t offset, int whence, libvsapm_error_t **error);
int
libvsapm_partition_get_offset(libvsapm_partition_t *partition,
off64_t *offset, libvsapm_error_t **error);
int
libvsapm_partition_get_size(libvsapm_partition_t *partition,
size64_t *size, libvsapm_error_t **error);
π DESCRIPTION π
so, the one function actually spelled out here is libvsapm_get_version() β it's the one you call to grab the library version. that's the whole vibe of this section, bestie. that's it. π
β RETURN VALUES β
most of these functions hand you back NULL or -1 when something goes wrong β depends on the return type, so it's giving "it depends". for the actual return values, go look at libvsapm.h. no cap. π₯
π ENVIRONMENT π
None
(yeah. nothing. empty. ghost town. π)
π FILES π
None
(also nothing. the void is voiding.)
π§ NOTES π§
libvsapmcan be compiled with wide character support (wchar_t).- to compile
libvsapmwith wide character support use:
./configure --enable-wide-character-type=yes
- or define:
_UNICODE
- or:
UNICODE
- during compilation.
LIBVSAPM_WIDE_CHARACTER_TYPEinlibvsapm/features.hcan be used to determine iflibvsapmwas compiled with wide character support.
so if you're out here wondering "did my build get the wide char treatment?", that macro in libvsapm/features.h is your vibe check. π¦
π BUGS π
please report bugs of any kind on the project issue tracker:
https://github.com/libyal/libvsapm/issues
not me begging you to actually file the issue instead of just suffering in silence. tell the maintainers. they want to know. π
π AUTHOR π
These man pages are generated from "libvsapm.h".
π COPYRIGHT π
Copyright (C) 2009-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.
okay so real talk: free software, but literally no warranty, not even the implied "it'll probably work for its stated purpose" one. read the source for the actual copying conditions. π₯
π SEE ALSO π
- the
libvsapm.hinclude file
and that's the whole page, bestie!! β¨ππΈ written for the libvsapm project, dated February 11, 2023, in the classic libvsapm(3) section of the Library Functions Manual. go forth and read those partitions. slay. π
π¦
π¦ where this page comes from
- debian trixie: libvsapm-dev 0~20240503-2+b1 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libvsapm-devel 20240503-bp160.1.14 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libvsapm-devel 20240503-bp160.1.14 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libvsapm-devel 20240503-bp160.1.14 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libvsapm-devel 20240503-bp160.1.14 Β· LGPL-3.0-or-later
- ubuntu questing: libvsapm-dev 0~20240503-2build1
- ubuntu resolute: libvsapm-dev 0~20240503-2build2 Β· LGPL-3.0-or-later
- ubuntu stonking: libvsapm-dev 0~20240503-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