ivshmem: fix errors identified by hardening
ivshmem: fix errors identified by hardening

Need to pass mode argument to open with O_CREAT.
Must check return value from ftruncate().

Signed-off-by: Stephen Hemminger <5939443bd6498ae9d7581c946dfbecf8ed1feac0@brocade.com>
Acked-by: Thomas Monjalon <ee2fa8b2681c737f775687e475dcbf2028a412f1@6wind.com>

phermansson/dpdk,phermansson/dpdk,phermansson/dpdk,phermansson/dpdk