lsvpd: Unique name for temp Device file given and file closed before deleting it.
This piece of code used mkstemp to get unique name of file in that particular
directory. As file name is not hardcoded, so parameter for device_close and
device_open is changed to pass device location path.
This patch also fixes the issue of opened file which is not closed by closing
file descriptor.
---Problem Description---
Update Package request for lsvpd
---uname output---
Linux tuleta4u-lp9 4.10.0-27-generic #30~16.04.2-Ubuntu SMP Thu Jun 29 16:06:52 UTC 2017 ppc64le ppc64le ppc64le GNU/Linux
---Steps to Reproduce---
lsvpd
Userspace tool common name: lsvpd
Please pull below patches for lsvpd package.
------------------ efef7bb788d62e4 46833137b2
commit 7499dcc199da96b
Author: Ankit Kumar <email address hidden>
Date: Mon Dec 7 11:59:05 2015 +0530
lsvpd: Unique name for temp Device file given and file closed before deleting it.
This piece of code used mkstemp to get unique name of file in that particular
directory. As file name is not hardcoded, so parameter for device_close and
device_open is changed to pass device location path.
This patch also fixes the issue of opened file which is not closed by closing
file descriptor.
Signed-off-by: Ankit Kumar <email address hidden>
[Removed redundant variable - Vasant]
Signed-off-by: Vasant Hegde <email address hidden>
-----
Backported patch on top of 1.7.6 provided