2N/A * GRUB -- GRand Unified Bootloader 2N/A * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * GRUB is free software: you can redistribute it and/or modify 2N/A * it under the terms of the GNU General Public License as published by 2N/A * the Free Software Foundation, either version 3 of the License, or 2N/A * (at your option) any later version. 2N/A * GRUB is distributed in the hope that it will be useful, 2N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of 2N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2N/A * GNU General Public License for more details. 2N/A * You should have received a copy of the GNU General Public License 2N/A "solaris_grub_version",
2N/A * compare_dotted_version() 2N/A * Compares two strings with an arbitrary long number of dot-separated numbers. 2N/A * Returns: 0 - if the version numbers are equal 2N/A * >0 - if str1 version number is more recent than str2 2N/A * <0 - if str2 version number is more recent than str1 2N/A * Comparison is done field by field, by retrieving an unsigned integer value, 2N/A * (missing fields are assumed as 0, but explict zeroes take precedence) so: 2N/A * 4.1.2.11 > 4.1.2.2 > 4.1.2.0 > 4.1.2 2N/A * where ">" means "more recent than". 2N/A /* Common portion of the version string is equal. */ 2N/A * compare_timestamps() 2N/A * Currently, timestamp is in %Y%m%dT%H%M%SZ format in UTC, which means that 2N/A * we can simply do a lexicographic comparison to know which one is the most 2N/A * Returns: 0 - if timestamps coincide 2N/A * 1 - if the timestamp in str1 is more recent 2N/A * 2 - if the timestamp in str2 is more recent 2N/A * Given two solaris versions, compare the two and returns which one is more 2N/A * "recent". Comparison is based on dotted version number fields and a 2N/A * Returns: 0 - if the two versions coincide 2N/A * >0 - if the version in str1 is more recent 2N/A * <0 - if the version in str2 is more recent 2N/A /* verstr1 or verstr2 will be NULL before parsep1 or parsep2. */