diff -Nru nvidia-persistenced-325.15/common-utils/common-utils.c nvidia-persistenced-331.20/common-utils/common-utils.c --- nvidia-persistenced-325.15/common-utils/common-utils.c 2013-08-01 02:37:08.000000000 +0000 +++ nvidia-persistenced-331.20/common-utils/common-utils.c 2013-10-31 01:57:40.000000000 +0000 @@ -235,6 +235,28 @@ } /* nvasprintf() */ +/* + * nv_append_sprintf() - similar to glib's g_string_append_printf(), except + * instead of operating on a GString it operates on a (char **). Appends a + * formatted string to the end of the dynamically-allocated string pointed to by + * *buf (or the empty string if *buf is NULL), potentially reallocating the + * string in the process. This function only returns on succcess. + */ +void nv_append_sprintf(char **buf, const char *fmt, ...) +{ + char *prefix, *suffix; + + prefix = *buf; + NV_VSNPRINTF(suffix, fmt); + + if (!prefix) { + *buf = suffix; + } else { + *buf = nvstrcat(prefix, suffix, NULL); + free(prefix); + free(suffix); + } +} /* @@ -413,7 +435,7 @@ } } - /* look for any newline inbetween a and b, and move b to it */ + /* look for any newline between a and b, and move b to it */ for (c = a; c < b; c++) if (*c == '\n') { b = c; break; } diff -Nru nvidia-persistenced-325.15/common-utils/common-utils.h nvidia-persistenced-331.20/common-utils/common-utils.h --- nvidia-persistenced-325.15/common-utils/common-utils.h 2013-08-01 02:37:08.000000000 +0000 +++ nvidia-persistenced-331.20/common-utils/common-utils.h 2013-10-31 01:57:40.000000000 +0000 @@ -40,8 +40,9 @@ #define VERBOSITY_NONE 0 /* nothing */ #define VERBOSITY_ERROR 1 /* errors only */ -#define VERBOSITY_WARNING 2 /* errors and warnings */ -#define VERBOSITY_ALL 3 /* errors, warnings and other info */ +#define VERBOSITY_DEPRECATED 2 /* errors, deprecation messages and warnings */ +#define VERBOSITY_WARNING 3 /* errors and warnings */ +#define VERBOSITY_ALL 4 /* errors, warnings and other info */ #define VERBOSITY_DEFAULT VERBOSITY_ERROR @@ -72,6 +73,7 @@ char *nvstrtoupper(char *s); char *nvstrchrnul(char *s, int c); char *nvasprintf(const char *fmt, ...) NV_ATTRIBUTE_PRINTF(1, 2); +void nv_append_sprintf(char **buf, const char *fmt, ...) NV_ATTRIBUTE_PRINTF(2, 3); void nvfree(void *s); char *tilde_expansion(const char *str); @@ -184,4 +186,20 @@ #define NV_VERSION4(major, minor, micro, nano) \ nv_encode_version(major, minor, micro, nano) +/* + * Helper enum that can be used for boolean values that might or might not be + * set. Care should be taken to avoid simple boolean testing, as a value of + * NV_OPTIONAL_BOOL_DEFAULT would evaluate as true. + * + * The user is responsible for unconditionally initializing the default value of + * any such booleans to NV_OPTIONAL_BOOL_DEFAULT, before any code path that + * might optionally set their values is executed. + */ + +typedef enum { + NV_OPTIONAL_BOOL_DEFAULT = -1, + NV_OPTIONAL_BOOL_FALSE = FALSE, + NV_OPTIONAL_BOOL_TRUE = TRUE +} NVOptionalBool; + #endif /* __COMMON_UTILS_H__ */ diff -Nru nvidia-persistenced-325.15/common-utils/gen-manpage-opts-helper.c nvidia-persistenced-331.20/common-utils/gen-manpage-opts-helper.c --- nvidia-persistenced-325.15/common-utils/gen-manpage-opts-helper.c 2013-08-01 02:37:08.000000000 +0000 +++ nvidia-persistenced-331.20/common-utils/gen-manpage-opts-helper.c 2013-10-31 01:57:40.000000000 +0000 @@ -89,7 +89,7 @@ * '^' : toggles bold on and off * '-' : is backslashified: "\-" * - * Whitespace is omited when italics or bold is on + * Whitespace is omitted when italics or bold is on */ italics = 0; diff -Nru nvidia-persistenced-325.15/common-utils/nvgetopt.h nvidia-persistenced-331.20/common-utils/nvgetopt.h --- nvidia-persistenced-325.15/common-utils/nvgetopt.h 2013-08-01 02:37:08.000000000 +0000 +++ nvidia-persistenced-331.20/common-utils/nvgetopt.h 2013-10-31 01:57:40.000000000 +0000 @@ -34,8 +34,8 @@ /* * indicates that the option is a boolean value; the presence of the - * option will be interpretted as a TRUE value; if the option is - * prepended with '--no-', the option will be interpretted as a FALSE + * option will be interpreted as a TRUE value; if the option is + * prepended with '--no-', the option will be interpreted as a FALSE * value. On success, nvgetopt will return the parsed boolean value * through 'boolval'. */ diff -Nru nvidia-persistenced-325.15/debian/changelog nvidia-persistenced-331.20/debian/changelog --- nvidia-persistenced-325.15/debian/changelog 2013-08-08 11:07:07.000000000 +0000 +++ nvidia-persistenced-331.20/debian/changelog 2013-11-08 13:18:10.000000000 +0000 @@ -1,3 +1,9 @@ +nvidia-persistenced (331.20-0ubuntu1~xedgers~saucy1) saucy; urgency=medium + + * New upstream release + + -- Rico Tzschichholz Fri, 08 Nov 2013 14:15:45 +0100 + nvidia-persistenced (325.15-0ubuntu1~xedgers~saucy1) saucy; urgency=medium * New upstream release diff -Nru nvidia-persistenced-325.15/nvidia-persistenced.1.m4 nvidia-persistenced-331.20/nvidia-persistenced.1.m4 --- nvidia-persistenced-325.15/nvidia-persistenced.1.m4 2013-08-01 02:37:08.000000000 +0000 +++ nvidia-persistenced-331.20/nvidia-persistenced.1.m4 2013-10-31 01:57:40.000000000 +0000 @@ -68,7 +68,7 @@ .PP The source code to .B nvidia\-persistenced -is released under the MIT license and is available here: +is available here: .__URL__ ftp://download.nvidia.com/XFree86/nvidia-persistenced/ .PP diff -Nru nvidia-persistenced-325.15/nvidia-persistenced.c nvidia-persistenced-331.20/nvidia-persistenced.c --- nvidia-persistenced-325.15/nvidia-persistenced.c 2013-08-01 02:37:08.000000000 +0000 +++ nvidia-persistenced-331.20/nvidia-persistenced.c 2013-10-31 01:57:40.000000000 +0000 @@ -184,7 +184,7 @@ return; } - syslog(priority, device_str); + syslog(priority, "%s", device_str); nvfree(device_str); } diff -Nru nvidia-persistenced-325.15/options.c nvidia-persistenced-331.20/options.c --- nvidia-persistenced-325.15/options.c 2013-08-01 02:37:08.000000000 +0000 +++ nvidia-persistenced-331.20/options.c 2013-10-31 01:57:40.000000000 +0000 @@ -49,7 +49,7 @@ static void print_version(void) { fmtout(""); - fmtout(pNV_ID); + fmtout("%s", pNV_ID); fmtout(""); fmtoutp(TAB, "The NVIDIA Persistence Daemon."); fmtout(""); @@ -65,8 +65,8 @@ */ static void print_help_callback(const char *name, const char *description) { - fmtoutp(TAB, name); - fmtoutp(BIGTAB, description); + fmtoutp(TAB, "%s", name); + fmtoutp(BIGTAB, "%s", description); fmtout(""); } diff -Nru nvidia-persistenced-325.15/utils.mk nvidia-persistenced-331.20/utils.mk --- nvidia-persistenced-325.15/utils.mk 2013-08-01 02:37:08.000000000 +0000 +++ nvidia-persistenced-331.20/utils.mk 2013-10-31 01:57:40.000000000 +0000 @@ -31,7 +31,7 @@ # only set these warnings and optimizations if CFLAGS is unset CFLAGS ?= -Wall -O2 # always set these -f CFLAGS -CFLAGS += -fno-strict-aliasing -fno-omit-frame-pointer +CFLAGS += -fno-strict-aliasing -fno-omit-frame-pointer -Wformat=2 CC_ONLY_CFLAGS ?= LDFLAGS ?= BIN_LDFLAGS ?= diff -Nru nvidia-persistenced-325.15/version.mk nvidia-persistenced-331.20/version.mk --- nvidia-persistenced-325.15/version.mk 2013-08-01 02:37:08.000000000 +0000 +++ nvidia-persistenced-331.20/version.mk 2013-10-31 01:57:40.000000000 +0000 @@ -1 +1 @@ -NVIDIA_VERSION = 325.15 +NVIDIA_VERSION = 331.20