diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libfile.c | 2 | ||||
-rw-r--r-- | lib/parameter.c | 3 | ||||
-rw-r--r-- | lib/vsprintf.c | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/libfile.c b/lib/libfile.c index 62e9b8ed22..cba2f02a23 100644 --- a/lib/libfile.c +++ b/lib/libfile.c @@ -28,7 +28,7 @@ * Like write, but guarantees to write the full buffer out, else * it returns with an error. */ -int write_full(int fd, void *buf, size_t size) +int write_full(int fd, const void *buf, size_t size) { size_t insize = size; int now; diff --git a/lib/parameter.c b/lib/parameter.c index 3d356fb972..656a6037c6 100644 --- a/lib/parameter.c +++ b/lib/parameter.c @@ -28,6 +28,7 @@ #include <malloc.h> #include <driver.h> #include <string.h> +#include <globalvar.h> #include <linux/err.h> struct param_d *get_param_by_name(struct device_d *dev, const char *name) @@ -156,6 +157,8 @@ static int __dev_add_param(struct param_d *param, struct device_d *dev, const ch param->dev = dev; list_add_sort(¶m->list, &dev->parameters, compare); + dev_param_init_from_nv(dev, name); + return 0; } diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 1122a4ad38..f3885a8201 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -684,11 +684,10 @@ EXPORT_SYMBOL(bvasprintf); int asprintf(char **strp, const char *fmt, ...) { va_list ap; - char *p; int len; va_start(ap, fmt); - len = vasprintf(&p, fmt, ap); + len = vasprintf(strp, fmt, ap); va_end(ap); return len; |