libvsmbr(3)

πŸ“¦ in opensuse-leap 16.0

πŸ’– NAME πŸ’–

okay so bestie, welcome to libvsmbr(3) β€” the manual page for libvsmbr.h, the library to access the Master Boot Record (MBR) volume system format. That's the whole vibe. ✨

πŸŽ€ SYNOPSIS πŸŽ€

First things first, you include it like this:

#include <libvsmbr.h>

Support functions πŸ’…

Here's the support-function lineup, exact names and all:

const char *
libvsmbr_get_version(void);

int
libvsmbr_get_access_flags_read(void);

int
libvsmbr_get_access_flags_read_write(void);

int
libvsmbr_get_access_flags_write(void);

int
libvsmbr_get_codepage(int *codepage, libvsmbr_error_t **error);

int
libvsmbr_set_codepage(int codepage, libvsmbr_error_t **error);

int
libvsmbr_check_volume_signature(const char *filename,
    libvsmbr_error_t **error);

Available when compiled with wide character string support:

int
libvsmbr_check_volume_signature_wide(const wchar_t *filename,
    libvsmbr_error_t **error);

Available when compiled with libbfio support:

int
libvsmbr_check_volume_signature_file_io_handle(libbfio_handle_t *file_io_handle,
    libvsmbr_error_t **error);

Notify functions πŸŽ€

void
libvsmbr_notify_set_verbose(int verbose);

int
libvsmbr_notify_set_stream(FILE *stream, libvsmbr_error_t **error);

int
libvsmbr_notify_stream_open(const char *filename,
    libvsmbr_error_t **error);

int
libvsmbr_notify_stream_close(libvsmbr_error_t **error);

Error functions 🫢

void
libvsmbr_error_free(libvsmbr_error_t **error);

int
libvsmbr_error_fprint(libvsmbr_error_t *error, FILE *stream);

int
libvsmbr_error_sprint(libvsmbr_error_t *error, char *string,
    size_t size);

int
libvsmbr_error_backtrace_fprint(libvsmbr_error_t *error, FILE *stream);

int
libvsmbr_error_backtrace_sprint(libvsmbr_error_t *error, char *string,
    size_t size);

Volume functions πŸ¦‹

int
libvsmbr_volume_initialize(libvsmbr_volume_t **volume,
    libvsmbr_error_t **error);

int
libvsmbr_volume_free(libvsmbr_volume_t **volume,
    libvsmbr_error_t **error);

int
libvsmbr_volume_signal_abort(libvsmbr_volume_t *volume,
    libvsmbr_error_t **error);

int
libvsmbr_volume_open(libvsmbr_volume_t *volume, const char *filename,
    int access_flags, libvsmbr_error_t **error);

int
libvsmbr_volume_close(libvsmbr_volume_t *volume,
    libvsmbr_error_t **error);

int
libvsmbr_volume_get_bytes_per_sector(libvsmbr_volume_t *volume,
    uint32_t *bytes_per_sector, libvsmbr_error_t **error);

int
libvsmbr_volume_set_bytes_per_sector(libvsmbr_volume_t *volume,
    uint32_t bytes_per_sector, libvsmbr_error_t **error);

int
libvsmbr_volume_get_disk_identity(libvsmbr_volume_t *volume,
    uint32_t *disk_identity, libvsmbr_error_t **error);

int
libvsmbr_volume_get_number_of_partitions(libvsmbr_volume_t *volume,
    int *number_of_partitions, libvsmbr_error_t **error);

int
libvsmbr_volume_get_partition_by_index(libvsmbr_volume_t *volume,
    int partition_index, libvsmbr_partition_t **partition,
    libvsmbr_error_t **error);

Available when compiled with wide character string support:

int
libvsmbr_volume_open_wide(libvsmbr_volume_t *volume,
    const wchar_t *filename, int access_flags,
    libvsmbr_error_t **error);

Available when compiled with libbfio support:

int
libvsmbr_volume_open_file_io_handle(libvsmbr_volume_t *volume,
    libbfio_handle_t *file_io_handle, int access_flags,
    libvsmbr_error_t **error);

Partition functions 🌸

int
libvsmbr_partition_free(libvsmbr_partition_t **partition,
    libvsmbr_error_t **error);

int
libvsmbr_partition_get_type(libvsmbr_partition_t *partition,
    uint8_t *type, libvsmbr_error_t **error);

int
libvsmbr_partition_get_volume_offset(libvsmbr_partition_t *partition,
    off64_t *volume_offset, libvsmbr_error_t **error);

ssize_t
libvsmbr_partition_read_buffer(libvsmbr_partition_t *partition,
    void *buffer, size_t buffer_size, libvsmbr_error_t **error);

ssize_t
libvsmbr_partition_read_buffer_at_offset(libvsmbr_partition_t *partition,
    void *buffer, size_t buffer_size, off64_t offset,
    libvsmbr_error_t **error);

off64_t
libvsmbr_partition_seek_offset(libvsmbr_partition_t *partition,
    off64_t offset, int whence, libvsmbr_error_t **error);

int
libvsmbr_partition_get_offset(libvsmbr_partition_t *partition,
    off64_t *offset, libvsmbr_error_t **error);

int
libvsmbr_partition_get_size(libvsmbr_partition_t *partition,
    size64_t *size, libvsmbr_error_t **error);

✨ DESCRIPTION ✨

okay so the one described function here is libvsmbr_get_version() β€” it's your go-to for retrieving the library version. That's literally its whole job on this page. πŸ’–

πŸ’€ RETURN VALUES πŸ’€

ngl, most of the functions return NULL or -1 on error, dependent on the return type. For the actual return values, see "libvsmbr.h". No cap. 🫢

🌈 ENVIRONMENT 🌈

None β€” literally no environment variables listed here, bestie. πŸŽ€

πŸ“ FILES πŸ“

None β€” no files listed on this page. πŸ’…

🧚 NOTES 🧚

libvsmbr can be compiled with wide character support (wchar_t).

To compile libvsmbr with wide character support use: ./configure --enable-wide-character-type=yes or define: _UNICODE or UNICODE during compilation.

LIBVSMBR_WIDE_CHARACTER_TYPE in libvsmbr/features.h can be used to determine if libvsmbr was compiled with wide character support.

πŸ™ˆ BUGS πŸ™ˆ

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

πŸ‘‘ AUTHOR πŸ‘‘

These man pages are generated from "libvsmbr.h".

Copyright (C) 2010-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.

⭐ SEE ALSO ⭐

the libvsmbr.h include file β€” that's the see-also, bestie. πŸ’–


πŸ’– okay that's the whole page, bestie β€” source/version: libvsmbr; date: November 11, 2021; manual: libvsmbr(3). Stay slay. πŸ’