Version functions

Version functions — functions to get the library version.

Functions

Types and Values

Description

Functions

fdisk_parse_version_string ()

int
fdisk_parse_version_string (const char *ver_string);

Parameters

ver_string

version string (e.g "2.18.0")

 

Returns

release version code.


fdisk_get_library_version ()

int
fdisk_get_library_version (const char **ver_string);

Parameters

ver_string

return pointer to the static library version string if not NULL

 

Returns

release version number.


fdisk_get_library_features ()

int
fdisk_get_library_features (const char ***features);

Parameters

features

returns a pointer to the static array of strings, the array is terminated by NULL.

 

Returns

number of items in the features array not including the last NULL, or less than zero in case of error

Example:

1
2
3
4
const char *features;
fdisk_get_library_features(&features);
while (features && *features)
printf("%s\n", *features++);

Types and Values

LIBFDISK_MAJOR_VERSION

#define LIBFDISK_MAJOR_VERSION   2

LIBFDISK_MINOR_VERSION

#define LIBFDISK_MINOR_VERSION   40

LIBFDISK_PATCH_VERSION

#define LIBFDISK_PATCH_VERSION   1

LIBFDISK_VERSION

#define LIBFDISK_VERSION   "2.40.1"

Library version string