2
* version.c --- Return the version of the blkid library
4
* Copyright (C) 2004 Theodore Ts'o.
7
* This file may be redistributed under the terms of the GNU Public
21
/* LIBBLKID_* defined in the global config.h */
22
static const char *lib_version = LIBBLKID_VERSION; /* release version */
23
static const char *lib_date = LIBBLKID_DATE;
26
* blkid_parse_version_string:
27
* @ver_string: version string (e.g. "2.16.0")
29
* Returns: release version code.
31
int blkid_parse_version_string(const char *ver_string)
36
for (cp = ver_string; *cp; cp++) {
41
version = (version * 10) + (*cp - '0');
47
* blkid_get_library_version:
48
* @ver_string: returns relese version (!= SONAME version)
49
* @date_string: returns date
51
* Returns: release version code.
53
int blkid_get_library_version(const char **ver_string,
54
const char **date_string)
57
*ver_string = lib_version;
59
*date_string = lib_date;
61
return blkid_parse_version_string(lib_version);