Ejemplo n.º 1
0
static int test_version(struct libmnt_test *ts, int argc, char *argv[])
{
	const char *ver;
	const char **features;

	if (argc == 2)
		printf("Your version: %d\n",
				mnt_parse_version_string(argv[1]));

	mnt_get_library_version(&ver);

	printf("Library version: %s\n", ver);
	printf("Library API version: " LIBMOUNT_VERSION "\n");
	printf("Library features:");

	mnt_get_library_features(&features);
	while (features && *features)
		printf(" %s", *features++);

	printf("\n");

	if (mnt_get_library_version(NULL) ==
			mnt_parse_version_string(LIBMOUNT_VERSION))
		return 0;

	return -1;
}
Ejemplo n.º 2
0
/**
 * mnt_get_library_version:
 * @ver_string: return pointer to the static library version string if not NULL
 *
 * Returns: release version number.
 */
int mnt_get_library_version(const char **ver_string)
{
	if (ver_string)
		*ver_string = lib_version;

	return mnt_parse_version_string(lib_version);
}
Ejemplo n.º 3
0
int test_version(struct libmnt_test *ts, int argc, char *argv[])
{
    const char *ver;

    mnt_get_library_version(&ver);

    printf("Library version: %s\n", ver);
    printf("Library API version: " LIBMOUNT_VERSION "\n");

    if (mnt_get_library_version(NULL) ==
            mnt_parse_version_string(LIBMOUNT_VERSION))
        return 0;

    return -1;
}