Now that we are moving to x.y.z version number scheme for maintenance
releases, we ned to change ext2fs_parse_version_string and
blkid_parse_version_string to ignore the second period so we don't
have maintenance releases with a substantially bigger verison number
than the initial x.y release.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
int ext2fs_parse_version_string(const char *ver_string)
{
const char *cp;
- int version = 0;
+ int version = 0, dot_count = 0;
for (cp = ver_string; *cp; cp++) {
- if (*cp == '.')
- continue;
+ if (*cp == '.') {
+ if (dot_count++)
+ break;
+ else
+ continue;
+ }
if (!isdigit(*cp))
break;
version = (version * 10) + (*cp - '0');