From e740686611a31303ac36498e72e2c3074dd6d2d3 Mon Sep 17 00:00:00 2001 From: Intel Date: Wed, 18 Sep 2013 12:00:00 +0200 Subject: [PATCH] eal: minor changes Signed-off-by: Intel --- lib/librte_eal/common/include/rte_hexdump.h | 0 lib/librte_eal/linuxapp/eal/eal.c | 4 ++-- lib/librte_eal/linuxapp/eal/eal_debug.c | 3 ++- lib/librte_eal/linuxapp/eal/eal_interrupts.c | 16 +++++++--------- 4 files changed, 11 insertions(+), 12 deletions(-) mode change 100755 => 100644 lib/librte_eal/common/include/rte_hexdump.h diff --git a/lib/librte_eal/common/include/rte_hexdump.h b/lib/librte_eal/common/include/rte_hexdump.h old mode 100755 new mode 100644 diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 5a9d7b9339..f7fd246760 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -337,7 +337,8 @@ eal_usage(const char *prgname) " --"OPT_NO_HUGE" : use malloc instead of hugetlbfs\n" " --"OPT_NO_PCI" : disable pci\n" " --"OPT_NO_HPET" : disable hpet\n" - " --"OPT_NO_SHCONF": no shared config (mmap'd files)\n\n", + " --"OPT_NO_SHCONF": no shared config (mmap'd files)\n" + "\n", prgname); /* Allow the application to print its usage message too if hook is set */ if ( rte_application_usage_hook ) { @@ -543,7 +544,6 @@ eal_parse_blacklist_opt(const char *optarg, size_t idx) return (idx); } - /* Parse the argument given in the command line of the application */ static int eal_parse_args(int argc, char **argv) diff --git a/lib/librte_eal/linuxapp/eal/eal_debug.c b/lib/librte_eal/linuxapp/eal/eal_debug.c index ffdcfaa58f..e91ccd448f 100644 --- a/lib/librte_eal/linuxapp/eal/eal_debug.c +++ b/lib/librte_eal/linuxapp/eal/eal_debug.c @@ -96,7 +96,8 @@ rte_exit(int exit_code, const char *format, ...) rte_log_set_history(0); if (exit_code != 0) - RTE_LOG(CRIT, EAL, "Error - exiting with code: %d\nCause: ", exit_code); + RTE_LOG(CRIT, EAL, "Error - exiting with code: %d\n" + " Cause: ", exit_code); va_start(ap, format); rte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap); diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c index 78a2e4d019..a9b0dcdd1a 100644 --- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c +++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c @@ -373,15 +373,13 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds) */ bytes_read = read(events[n].data.fd, &buf, bytes_read); - if (bytes_read < 0) { - RTE_LOG(ERR, EAL, "Error reading from file descriptor" - " %d, error: %d\n", events[n].data.fd, errno); - } - else if (bytes_read == 0) { - RTE_LOG(ERR, EAL, - "Read nothing from file descriptor %d.\n", - events[n].data.fd); - } + if (bytes_read < 0) + RTE_LOG(ERR, EAL, "Error reading from file " + "descriptor %d: %s\n", events[n].data.fd, + strerror(errno)); + else if (bytes_read == 0) + RTE_LOG(ERR, EAL, "Read nothing from file " + "descriptor %d\n", events[n].data.fd); /* grab a lock, again to call callbacks and update status. */ rte_spinlock_lock(&intr_lock); -- 2.20.1