git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
devargs: add non-variadic parsing function
[dpdk.git]
/
lib
/
librte_eal
/
linuxapp
/
eal
/
eal_dev.c
diff --git
a/lib/librte_eal/linuxapp/eal/eal_dev.c
b/lib/librte_eal/linuxapp/eal/eal_dev.c
index
9478a39
..
1cf6aeb
100644
(file)
--- a/
lib/librte_eal/linuxapp/eal/eal_dev.c
+++ b/
lib/librte_eal/linuxapp/eal/eal_dev.c
@@
-7,6
+7,7
@@
#include <sys/socket.h>
#include <linux/netlink.h>
#include <sys/socket.h>
#include <linux/netlink.h>
+#include <rte_string_fns.h>
#include <rte_log.h>
#include <rte_compat.h>
#include <rte_dev.h>
#include <rte_log.h>
#include <rte_compat.h>
#include <rte_dev.h>
@@
-94,15
+95,15
@@
dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
if (!strncmp(buf, "ACTION=", 7)) {
buf += 7;
i += 7;
if (!strncmp(buf, "ACTION=", 7)) {
buf += 7;
i += 7;
- s
nprintf(action, sizeof(action), "%s", buf
);
+ s
trlcpy(action, buf, sizeof(action)
);
} else if (!strncmp(buf, "SUBSYSTEM=", 10)) {
buf += 10;
i += 10;
} else if (!strncmp(buf, "SUBSYSTEM=", 10)) {
buf += 10;
i += 10;
- s
nprintf(subsystem, sizeof(subsystem), "%s", buf
);
+ s
trlcpy(subsystem, buf, sizeof(subsystem)
);
} else if (!strncmp(buf, "PCI_SLOT_NAME=", 14)) {
buf += 14;
i += 14;
} else if (!strncmp(buf, "PCI_SLOT_NAME=", 14)) {
buf += 14;
i += 14;
- s
nprintf(pci_slot_name, sizeof(subsystem), "%s", buf
);
+ s
trlcpy(pci_slot_name, buf, sizeof(subsystem)
);
event->devname = strdup(pci_slot_name);
}
for (; i < length; i++) {
event->devname = strdup(pci_slot_name);
}
for (; i < length; i++) {