2 * version.c --- Return the version of the ext2 library
4 * Copyright (C) 1997 Theodore Ts'o.
7 * This file may be redistributed under the terms of the GNU Public
22 #include "../../version.h"
24 static const char *lib_version = E2FSPROGS_VERSION;
25 static const char *lib_date = E2FSPROGS_DATE;
27 int ext2fs_parse_version_string(const char *ver_string)
30 int version = 0, dot_count = 0;
32 for (cp = ver_string; *cp; cp++) {
41 version = (version * 10) + (*cp - '0');
47 int ext2fs_get_library_version(const char **ver_string,
48 const char **date_string)
51 *ver_string = lib_version;
53 *date_string = lib_date;
55 return ext2fs_parse_version_string(lib_version);