[dpdk-dev] couple of minor compilation errors in DPDK 1.6 (/lib/librte_eal/linuxapp/eal/eal_ivshmem.c)
Jyotiswarup Raiturkar
jyotisr5 at googlemail.com
Tue Feb 4 04:32:39 CET 2014
Hi
I downloaded DPDK 1.6 from the Intel website and ran into couple of
compilation errors with /lib/librte_eal/linuxapp/eal/eal_ivshmem.c. The
following changes seem to fix it. Have other people seen these?
Thanks
Jyoti
@@ -472,7 +472,7 @@
rte_snprintf(path, sizeof(path), IVSHMEM_CONFIG_PATH,
internal_config.hugefile_prefix);
- fd = open(path, O_CREAT | O_RDWR);
+ fd = open(path, O_CREAT | O_RDWR, S_IRWXU | S_IRWXG | S_IRWXO );
if (fd < 0) {
RTE_LOG(ERR, EAL, "Could not open %s: %s\n", path, strerror(errno));
@@ -486,7 +486,8 @@
return -1;
}
- ftruncate(fd, sizeof(struct ivshmem_shared_config));
+ if (ftruncate(fd, sizeof(struct ivshmem_shared_config))) {
+ close(fd); return -1;
+ }
ivshmem_config = mmap(NULL, sizeof(struct ivshmem_shared_config),
PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
More information about the dev
mailing list