Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-compat]: src/sys/kern Add some helpful error messages when thin...
details: https://anonhg.NetBSD.org/src/rev/7c26313669ce
branches: pgoyette-compat
changeset: 830610:7c26313669ce
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Tue Sep 04 11:48:38 2018 +0000
description:
Add some helpful error messages when things fail.
diffstat:
sys/kern/kern_module.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diffs (59 lines):
diff -r 039254cc3232 -r 7c26313669ce sys/kern/kern_module.c
--- a/sys/kern/kern_module.c Tue Sep 04 11:36:06 2018 +0000
+++ b/sys/kern/kern_module.c Tue Sep 04 11:48:38 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_module.c,v 1.130.2.14 2018/09/04 11:31:11 pgoyette Exp $ */
+/* $NetBSD: kern_module.c,v 1.130.2.15 2018/09/04 11:48:38 pgoyette Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.130.2.14 2018/09/04 11:31:11 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.130.2.15 2018/09/04 11:48:38 pgoyette Exp $");
#define _MODULE_INTERNAL
@@ -904,8 +904,8 @@
* cases (such as nfsserver + nfs), the dependee can be
* succesfully linked without the dependencies.
*/
- module_error("%s: can't find builtin dependency `%s'",
- pmod->mod_info->mi_name, name);
+ module_error("built-in module %s can't find builtin "
+ "dependency `%s'", pmod->mod_info->mi_name, name);
return ENOENT;
}
@@ -929,6 +929,8 @@
alloc_required(mod);
error = module_do_builtin(mod, buf, &mod2, NULL);
if (error != 0) {
+ module_error("built-in module %s prerequisite "
+ "%s failed, error %d", name, buf, error);
goto fail;
}
(*mod->mod_required)[mod->mod_nrequired++] = mod2;
@@ -945,6 +947,9 @@
if (modp != NULL)
*modp = mod2;
error = EEXIST;
+ module_error("built-in module %s alias %s "
+ "already exists in module %s", name,
+ *--aliasp, mod2->mod_info->mod_name);
goto fail;
}
}
@@ -957,8 +962,8 @@
error = (*mi->mi_modcmd)(MODULE_CMD_INIT, props);
module_active = prev_active;
if (error != 0) {
- module_error("builtin module `%s' "
- "failed to init, error %d", mi->mi_name, error);
+ module_error("built-in module %s failed its MODULE_CMD_INIT, "
+ "error %d", mi->mi_name, error);
goto fail;
}
Home |
Main Index |
Thread Index |
Old Index