+ else if (match2 (g, fs->product_name, re_centos_old, &major, &minor) ||
+ match2 (g, fs->product_name, re_centos, &major, &minor)) {
+ fs->distro = OS_DISTRO_CENTOS;
+ fs->major_version = guestfs___parse_unsigned_int (g, major);
+ free (major);
+ if (fs->major_version == -1) {
+ free (minor);
+ return -1;
+ }
+ fs->minor_version = guestfs___parse_unsigned_int (g, minor);
+ free (minor);
+ if (fs->minor_version == -1)
+ return -1;
+ }
+ else if ((major = match1 (g, fs->product_name, re_centos_no_minor)) != NULL) {
+ fs->distro = OS_DISTRO_CENTOS;
+ fs->major_version = guestfs___parse_unsigned_int (g, major);
+ free (major);
+ if (fs->major_version == -1)
+ return -1;
+ fs->minor_version = 0;
+ }
+ else if (match2 (g, fs->product_name, re_scientific_linux_old, &major, &minor) ||
+ match2 (g, fs->product_name, re_scientific_linux, &major, &minor)) {
+ fs->distro = OS_DISTRO_SCIENTIFIC_LINUX;
+ fs->major_version = guestfs___parse_unsigned_int (g, major);
+ free (major);
+ if (fs->major_version == -1) {
+ free (minor);
+ return -1;
+ }
+ fs->minor_version = guestfs___parse_unsigned_int (g, minor);
+ free (minor);
+ if (fs->minor_version == -1)
+ return -1;
+ }
+ else if ((major = match1 (g, fs->product_name, re_scientific_linux_no_minor)) != NULL) {
+ fs->distro = OS_DISTRO_SCIENTIFIC_LINUX;
+ fs->major_version = guestfs___parse_unsigned_int (g, major);
+ free (major);
+ if (fs->major_version == -1)
+ return -1;
+ fs->minor_version = 0;
+ }