]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
Back to logging without \n
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Fri, 25 Nov 2011 03:28:39 +0000 (01:28 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Mon, 28 Nov 2011 13:28:18 +0000 (11:28 -0200)
It possibly breaks when not logging to stderr

libkmod/libkmod-module.c
libkmod/libkmod.c

index 5e8ae73e618a7eb770ace048f8c7925210efc96c..d9ba0b1b0ee91088f803d5b4c26eac2bd03ab5db 100644 (file)
@@ -193,12 +193,12 @@ KMOD_EXPORT int kmod_module_insert_module(struct kmod_module *mod,
                return -ENOENT;
 
        if (mod->path == NULL) {
-               ERR(mod->ctx, "Not supported to load a module by name yet");
+               ERR(mod->ctx, "Not supported to load a module by name yet\n");
                return -ENOSYS;
        }
 
        if (flags != 0)
-               INFO(mod->ctx, "Flags are not implemented yet");
+               INFO(mod->ctx, "Flags are not implemented yet\n");
 
        if ((fd = open(mod->path, O_RDONLY)) < 0) {
                err = -errno;
@@ -215,7 +215,7 @@ KMOD_EXPORT int kmod_module_insert_module(struct kmod_module *mod,
 
        err = init_module(mmaped_file, st.st_size, args);
        if (err < 0)
-               ERR(mod->ctx, "Failed to insert module '%s'", mod->path);
+               ERR(mod->ctx, "Failed to insert module '%s'\n", mod->path);
 
        munmap(mmaped_file, st.st_size);
        close(fd);
index 13948fb3575f7c40cab86f289d964521d6e4afe0..49acea2a66874acbf5c7673aad2f725fb7588129 100644 (file)
@@ -71,7 +71,6 @@ static void log_stderr(struct kmod_ctx *ctx,
 {
        fprintf(stderr, "libkmod: %s: ", fn);
        vfprintf(stderr, format, args);
-       fprintf(stderr, "\n");
 }
 
 const char *kmod_get_dirname(struct kmod_ctx *ctx)