]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
tools: unify error verbiage and casing
authorDave Reisner <dreisner@archlinux.org>
Wed, 4 Jan 2012 15:41:50 +0000 (10:41 -0500)
committerDave Reisner <dreisner@archlinux.org>
Wed, 4 Jan 2012 15:59:03 +0000 (10:59 -0500)
Fix a typo and ensure that we always use "could not" instead of "Could
not" or the conjunction "couldn't".

tools/kmod-depmod.c
tools/kmod-modinfo.c
tools/kmod-modprobe.c

index f7dafc58fd33fb20a15109fdb05ad2ce62954d8e..a74dbcb34780dccd11973dd3e58fca4324569245 100644 (file)
@@ -1267,7 +1267,7 @@ static int depmod_modules_search_file(struct depmod *depmod, size_t baselen, siz
                return 0;
 
        if (path_to_modname(path, modname, &modnamelen) == NULL) {
-               ERR("Could not get modname from path %s\n", path);
+               ERR("could not get modname from path %s\n", path);
                return -EINVAL;
        }
 
@@ -1289,20 +1289,20 @@ static int depmod_modules_search_file(struct depmod *depmod, size_t baselen, siz
            mod->relpath, relpath);
        err = depmod_module_del(depmod, mod);
        if (err < 0) {
-               ERR("Could not del module %s: %s\n", mod->path, strerror(-err));
+               ERR("could not del module %s: %s\n", mod->path, strerror(-err));
                return err;
        }
 
 add:
        err = kmod_module_new_from_path(depmod->ctx, path, &kmod);
        if (err < 0) {
-               ERR("Could not create module %s: %s\n", path, strerror(-err));
+               ERR("could not create module %s: %s\n", path, strerror(-err));
                return err;
        }
 
        err = depmod_module_add(depmod, kmod);
        if (err < 0) {
-               ERR("Could not add module %s: %s\n",
+               ERR("could not add module %s: %s\n",
                    path, strerror(-err));
                kmod_module_unref(kmod);
                return err;
@@ -1401,7 +1401,7 @@ static int depmod_modules_search(struct depmod *depmod)
        int err;
        if (d == NULL) {
                err = -errno;
-               ERR("Couldn't open directory %s: %m\n", depmod->cfg->dirname);
+               ERR("could not open directory %s: %m\n", depmod->cfg->dirname);
                return err;
        }
 
@@ -1824,7 +1824,7 @@ static int output_deps(struct depmod *depmod, FILE *out)
 
                deps = mod_get_all_sorted_dependencies(mod, &n_deps);
                if (deps == NULL) {
-                       ERR("Could not get all sorted dependencies of %s\n", p);
+                       ERR("could not get all sorted dependencies of %s\n", p);
                        goto end;
                }
 
@@ -1872,7 +1872,7 @@ static int output_deps_bin(struct depmod *depmod, FILE *out)
 
                deps = mod_get_all_sorted_dependencies(mod, &n_deps);
                if (deps == NULL && n_deps > 0) {
-                       ERR("Could not get all sorted dependencies of %s\n", p);
+                       ERR("could not get all sorted dependencies of %s\n", p);
                        continue;
                }
 
@@ -2109,7 +2109,7 @@ static int output_builtin_bin(struct depmod *depmod, FILE *out)
        in = fopen(infile, "r");
        if (in == NULL) {
                int err = -errno;
-               ERR("Could not open %s: %m\n", infile);
+               ERR("could not open %s: %m\n", infile);
                return err;
        }
 
@@ -2215,7 +2215,7 @@ static int depmod_output(struct depmod *depmod, FILE *out)
                dfd = open(dname, O_RDONLY);
                if (dfd < 0) {
                        err = -errno;
-                       CRIT("Could not open directory %s: %m\n", dname);
+                       CRIT("could not open directory %s: %m\n", dname);
                        return err;
                }
        }
@@ -2478,13 +2478,13 @@ static int depfile_up_to_date(const char *dirname)
        int err;
        if (d == NULL) {
                err = -errno;
-               ERR("Couldn't open directory %s: %m\n", dirname);
+               ERR("could not open directory %s: %m\n", dirname);
                return err;
        }
 
        if (fstatat(dirfd(d), "modules.dep", &st, 0) != 0) {
                err = -errno;
-               ERR("Couldn't fstatat(%s, modules.dep): %m\n", dirname);
+               ERR("could not fstatat(%s, modules.dep): %m\n", dirname);
                closedir(d);
                return err;
        }
@@ -2655,14 +2655,14 @@ static int do_depmod(int argc, char *argv[])
        if (module_symvers != NULL) {
                err = depmod_load_symvers(&depmod, module_symvers);
                if (err < 0) {
-                       CRIT("Could not load %s: %s\n", module_symvers,
+                       CRIT("could not load %s: %s\n", module_symvers,
                             strerror(-err));
                        goto cmdline_failed;
                }
        } else if (system_map != NULL) {
                err = depmod_load_system_map(&depmod, system_map);
                if (err < 0) {
-                       CRIT("Could not load %s: %s\n", module_symvers,
+                       CRIT("could not load %s: %s\n", module_symvers,
                             strerror(-err));
                        goto cmdline_failed;
                }
@@ -2674,12 +2674,12 @@ static int do_depmod(int argc, char *argv[])
        if (all) {
                err = cfg_load(&cfg, config_paths);
                if (err < 0) {
-                       CRIT("Could not load configuration files\n");
+                       CRIT("could not load configuration files\n");
                        goto cmdline_modules_failed;
                }
                err = depmod_modules_search(&depmod);
                if (err < 0) {
-                       CRIT("Could search modules: %s\n", strerror(-err));
+                       CRIT("could not search modules: %s\n", strerror(-err));
                        goto cmdline_modules_failed;
                }
        } else {
@@ -2694,14 +2694,14 @@ static int do_depmod(int argc, char *argv[])
 
                        err = kmod_module_new_from_path(depmod.ctx, path, &mod);
                        if (err < 0) {
-                               CRIT("Could not create module %s: %s\n",
+                               CRIT("could not create module %s: %s\n",
                                     path, strerror(-err));
                                goto cmdline_modules_failed;
                        }
 
                        err = depmod_module_add(&depmod, mod);
                        if (err < 0) {
-                               CRIT("Could not add module %s: %s\n",
+                               CRIT("could not add module %s: %s\n",
                                     path, strerror(-err));
                                kmod_module_unref(mod);
                                goto cmdline_modules_failed;
index ea9de1b8dd011f117c80bb56e887f9d186573dab..38eed2ea1e1400c417b7147a049895a808b103bf 100644 (file)
@@ -181,7 +181,7 @@ static int modinfo_do(struct kmod_module *mod)
 
        err = kmod_module_get_info(mod, &list);
        if (err < 0) {
-               LOG("Could not get modinfo from '%s': %s\n",
+               LOG("could not get modinfo from '%s': %s\n",
                        kmod_module_get_name(mod), strerror(-err));
                return err;
        }
index cee612a32d9b2a516ece0c6374145ef5a7762e85..8286b9b718c266f50ccb8ec05bb077a2b6ede408 100644 (file)
@@ -232,7 +232,7 @@ static int show_modversions(struct kmod_ctx *ctx, const char *filename)
 
        err = kmod_module_get_versions(mod, &list);
        if (err < 0) {
-               LOG("Could not get modversions of %s: %s\n",
+               LOG("could not get modversions of %s: %s\n",
                        filename, strerror(-err));
                kmod_module_unref(mod);
                return err;
@@ -865,7 +865,7 @@ static int insmod_alias(struct kmod_ctx *ctx, const char *alias, const char *ext
                DBG("using blacklist: input %p, output=%p\n", list, filtered);
                kmod_module_unref_list(list);
                if (err < 0) {
-                       LOG("Could not filter alias list!\n");
+                       LOG("could not filter alias list!\n");
                        return err;
                }
                list = filtered;