service: fix parameter type for attribute
[dpdk.git] / lib / librte_eal / common / rte_service.c
index 8767c72..5f75e5a 100644 (file)
@@ -7,7 +7,6 @@
 #include <inttypes.h>
 #include <limits.h>
 #include <string.h>
-#include <dirent.h>
 
 #include <rte_compat.h>
 #include <rte_service.h>
@@ -735,7 +734,7 @@ rte_service_lcore_stop(uint32_t lcore)
 }
 
 int32_t
-rte_service_attr_get(uint32_t id, uint32_t attr_id, uint32_t *attr_value)
+rte_service_attr_get(uint32_t id, uint32_t attr_id, uint64_t *attr_value)
 {
        struct rte_service_spec_impl *s;
        SERVICE_VALID_GET_OR_ERR_RET(id, s, -EINVAL);
@@ -795,6 +794,9 @@ rte_service_dump_one(FILE *f, struct rte_service_spec_impl *s,
                return;
        }
 
+       if (f == NULL)
+               return;
+
        fprintf(f, "  %s: stats %d\tcalls %"PRIu64"\tcycles %"
                        PRIu64"\tavg: %"PRIu64"\n",
                        s->spec.name, service_stats_enabled(s), s->calls,