[dpdk-dev,RFC,10/23] eal: Do not panic on log failures
Checks
Commit Message
When log initialization fails, it's generally because the fopencookie
failed. While this is rare in practice, it could happen. Return
'Operation Not Supported' in errno, and let the caller know this error
occured.
Signed-off-by: Aaron Conole <aconole@redhat.com>
---
lib/librte_eal/linuxapp/eal/eal.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
@@ -813,8 +813,11 @@ rte_eal_init(int argc, char **argv)
rte_config_init();
- if (rte_eal_log_init(logid, internal_config.syslog_facility) < 0)
- rte_panic("Cannot init logs\n");
+ if (rte_eal_log_init(logid, internal_config.syslog_facility) < 0) {
+ RTE_LOG (ERR, EAL, "Cannot init logs\n");
+ errno = ENOTSUP;
+ return -1;
+ }
if (rte_eal_pci_init() < 0)
rte_panic("Cannot init PCI\n");