diff --git a/src/util-device.c b/src/util-device.c index 54602fe398..94d48df9a7 100644 --- a/src/util-device.c +++ b/src/util-device.c @@ -71,14 +71,14 @@ int LiveGetDeviceCount(void) { } /** - * \brief Get a pointer to the device at idx + * \brief Get a pointer to the device name at idx * * \param number idx of the device in our list * * \retval ptr pointer to the string containing the device * \retval NULL on error */ -char *LiveGetDevice(int number) { +char *LiveGetDeviceName(int number) { int i = 0; LiveDevice *pd; diff --git a/src/util-device.h b/src/util-device.h index ed142aa8b3..77b99bd23c 100644 --- a/src/util-device.h +++ b/src/util-device.h @@ -29,7 +29,7 @@ typedef struct LiveDevice_ { int LiveRegisterDevice(char *dev); int LiveGetDeviceCount(void); -char *LiveGetDevice(int number); +char *LiveGetDeviceName(int number); int LiveBuildDeviceList(char * base); #endif /* __UTIL_DEVICE_H__ */ diff --git a/src/util-runmodes.c b/src/util-runmodes.c index f52dac30a1..156db97a07 100644 --- a/src/util-runmodes.c +++ b/src/util-runmodes.c @@ -106,7 +106,7 @@ int RunModeSetLiveCaptureAuto(DetectEngineCtx *de_ctx, SCLogInfo("Using %d live device(s).", nlive); for (thread = 0; thread < nlive; thread++) { - char *live_dev = LiveGetDevice(thread); + char *live_dev = LiveGetDeviceName(thread); char *tnamec = NULL; void *aconf; @@ -484,7 +484,7 @@ int RunModeSetLiveCaptureAutoFp(DetectEngineCtx *de_ctx, int lthread; for (lthread = 0; lthread < nlive; lthread++) { - char *live_dev = LiveGetDevice(lthread); + char *live_dev = LiveGetDeviceName(lthread); void *aconf; int threads_count; @@ -701,7 +701,7 @@ int RunModeSetLiveCaptureWorkers(DetectEngineCtx *de_ctx, exit(EXIT_FAILURE); } } else { - live_dev_c = LiveGetDevice(ldev); + live_dev_c = LiveGetDeviceName(ldev); aconf = ConfigParser(live_dev_c); } RunModeSetLiveCaptureWorkersForDevice(de_ctx, @@ -736,7 +736,7 @@ int RunModeSetLiveCaptureSingle(DetectEngineCtx *de_ctx, if (live_dev != NULL) { aconf = ConfigParser(live_dev); } else { - char *live_dev_c = LiveGetDevice(0); + char *live_dev_c = LiveGetDeviceName(0); aconf = ConfigParser(live_dev_c); /* \todo Set threads number in config to 1 */ } @@ -769,7 +769,7 @@ int RunModeSetIPSAuto(DetectEngineCtx *de_ctx, for (int i = 0; i < nqueue; i++) { /* create the threads */ - cur_queue = LiveGetDevice(i); + cur_queue = LiveGetDeviceName(i); if (cur_queue == NULL) { printf("ERROR: Invalid queue number\n"); exit(EXIT_FAILURE); @@ -984,7 +984,7 @@ int RunModeSetIPSAutoFp(DetectEngineCtx *de_ctx, for (int i = 0; i < nqueue; i++) { /* create the threads */ - cur_queue = LiveGetDevice(i); + cur_queue = LiveGetDeviceName(i); if (cur_queue == NULL) { printf("ERROR: Invalid queue number\n"); exit(EXIT_FAILURE); @@ -1156,7 +1156,7 @@ int RunModeSetIPSWorker(DetectEngineCtx *de_ctx, for (int i = 0; i < nqueue; i++) { /* create the threads */ - cur_queue = LiveGetDevice(i); + cur_queue = LiveGetDeviceName(i); if (cur_queue == NULL) { printf("ERROR: Invalid queue number\n"); exit(EXIT_FAILURE);