summaryrefslogtreecommitdiffstats
path: root/src/usr/errl
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2014-12-09 10:58:49 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-12-13 10:53:42 -0600
commitb5fa2d654e3c321f039a88a51afffce76d4a94a9 (patch)
treee78eeb942a03ddd7687c302a2756402b99066f46 /src/usr/errl
parent1d730ba9e2d823e9690e6dcae168b0ccae85a948 (diff)
downloadtalos-hostboot-b5fa2d654e3c321f039a88a51afffce76d4a94a9.tar.gz
talos-hostboot-b5fa2d654e3c321f039a88a51afffce76d4a94a9.zip
Utilfile support for HBRT
Change-Id: I16fde414390d48622c3a4e71e47afac581d29236 RTC:119000 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14804 Tested-by: Jenkins Server Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com> Reviewed-by: Joshua P. Rispoli <jprispol@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/errl')
-rw-r--r--src/usr/errl/runtime/rt_vfs.C36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/usr/errl/runtime/rt_vfs.C b/src/usr/errl/runtime/rt_vfs.C
index f30618129..7495e6d61 100644
--- a/src/usr/errl/runtime/rt_vfs.C
+++ b/src/usr/errl/runtime/rt_vfs.C
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -81,4 +83,36 @@ namespace VFS
return l_errl;
}
+
+ bool module_exists (const char* i_name)
+ {
+ return (NULL != vfs_find_module(VFS_MODULES,i_name));
+ }
+
+ errlHndl_t module_load_unload(const char * i_module, VfsMessages i_msgtype)
+ {
+ //modules are already loaded at the time we start hbrt
+ //Just make sure that module_exists
+
+ errlHndl_t l_err = NULL;
+ if (!(module_exists(i_module)))
+ {
+ /*@ errorlog tag
+ * @errortype ERRL_SEV_INFORMATIONAL
+ * @moduleid VFS_RT_MODULE_ID
+ * @reasoncode VFS_MODULE_DOES_NOT_EXIST
+ * @userdata1 0
+ * @userdata2 0
+ * @devdesc Module does not exist
+ */
+ l_err = new ErrlEntry(
+ ERRORLOG::ERRL_SEV_INFORMATIONAL, // severity
+ VFS::VFS_RT_MODULE_ID, // moduleid
+ VFS::VFS_MODULE_DOES_NOT_EXIST, // reason Code
+ 0, 0);
+ ErrlUserDetailsString(i_module).addToLog(l_err);
+ }
+ return l_err;
+ }
+
}
OpenPOWER on IntegriCloud