---
name: "libvsapm"
section: "3"
platform: "linux"
package: "libvsapm-dev"
version: "0~20240503-2+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/libvsapm"
---

# libvsapm(3)

Library to access the Apple Partition Map (APM) volume system format

## NAME

**libvsapm.h** – Library to access the Apple Partition Map (APM) volume system format

## SYNOPSIS

**#include \<libvsapm.h\>**

Support functions

*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

*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

*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

*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

*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

The **libvsapm\_get\_version**() 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 "libvsapm.h".

## ENVIRONMENT

None

## FILES

None

## NOTES

libvsapm can be compiled with wide character support (wchar\_t).

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

*LIBVSAPM\_WIDE\_CHARACTER\_TYPE*\
  in libvsapm/features.h can be used to determine if libvsapm was compiled with wide character support.

## BUGS

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

## 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.

## SEE ALSO

the libvsapm.h include file
