1 /* vi: set sw=4 ts=4: */
3 * version.c --- Return the version of the ext2 library
5 * Copyright (C) 1997 Theodore Ts'o.
8 * This file may be redistributed under the terms of the GNU Public
23 static const char *lib_version
= E2FSPROGS_VERSION
;
24 static const char *lib_date
= E2FSPROGS_DATE
;
26 int ext2fs_parse_version_string(const char *ver_string
)
31 for (cp
= ver_string
; *cp
; cp
++) {
36 version
= (version
* 10) + (*cp
- '0');
42 int ext2fs_get_library_version(const char **ver_string
,
43 const char **date_string
)
46 *ver_string
= lib_version
;
48 *date_string
= lib_date
;
50 return ext2fs_parse_version_string(lib_version
);