diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2015-08-03 10:02:20 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2015-08-03 10:02:20 -0700 |
commit | 51a341c4c0264e5eb96691d6d55187991d447806 (patch) | |
tree | 9446333d96f68c03e42cdf5b2fdab01f0bef212d | |
parent | 27587e1f617b2782cdcacc325f158a8fa76dd52a (diff) |
355.06355.06
-rw-r--r-- | common-utils/nvgetopt.c | 35 | ||||
-rw-r--r-- | option_table.h | 3 | ||||
-rw-r--r-- | version.mk | 2 |
3 files changed, 38 insertions, 2 deletions
diff --git a/common-utils/nvgetopt.c b/common-utils/nvgetopt.c index 1716495..286aee8 100644 --- a/common-utils/nvgetopt.c +++ b/common-utils/nvgetopt.c @@ -205,6 +205,41 @@ int nvgetopt(int argc, } } + /* + * If we still didn't find a match, maybe this is a short option + * with its argument value concatenated (e.g., "-j8"). For now, + * limit this to short options with integer argument values. + */ + if (!o && intval) { + + /* Is the string after the first character an integer? */ + int appendedInteger = NVGETOPT_FALSE; + if ((name[0] != '\0') && (name[1] != '\0')) { + char *endptr; + strtol(name + 1, &endptr, 0); + if (*endptr == '\0') { + /* + * The only characters after the first character are + * parsable by strtol(3). + */ + appendedInteger = NVGETOPT_TRUE; + } + } + + if (appendedInteger) { + for (i = 0; options[i].name; i++) { + if ((options[i].flags & NVGETOPT_INTEGER_ARGUMENT) == 0) { + continue; + } + if (options[i].val == name[0]) { + o = &options[i]; + argument = name + 1; + break; + } + } + } + } + /* if we didn't find an option, return */ if (!o) { diff --git a/option_table.h b/option_table.h index 8dc7e65..3c9231c 100644 --- a/option_table.h +++ b/option_table.h @@ -647,7 +647,8 @@ static const NVGetoptOption __options[] = { { "delete-unused-dp12-displays", XCONFIG_BOOL_VAL(DELETE_UNUSED_DP12_DPYS), NVGETOPT_IS_BOOLEAN, NULL, "Delete DisplayPort 1.2 RandR outputs that " - "are disconnected and not named in any MetaModes." }, + "are disconnected and not named in any MetaModes. This option is " + "deprecated." }, { "inband-stereo-signaling", XCONFIG_BOOL_VAL(INBAND_STEREO_SIGNALING), NVGETOPT_IS_BOOLEAN, NULL, "Enable or disable the " @@ -1 +1 @@ -NVIDIA_VERSION = 352.30 +NVIDIA_VERSION = 355.06 |