Scroll to navigation

libvsmbr(3) Library Functions Manual libvsmbr(3)

NAME

libvsmbr.hLibrary to access the Master Boot Record (MBR) volume system format

SYNOPSIS

#include <libvsmbr.h>

Support functions
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

The () function is used to retrieve the library version.

RETURN VALUES

Most of the functions return NULL or -1 on error, dependent on the return type. For the actual return values see "libvsmbr.h".

ENVIRONMENT

None

FILES

None

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

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

November 11, 2021 libvsmbr