aboutsummaryrefslogtreecommitdiff
path: root/contrib/ivshmem-server/ivshmem-server.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2016-03-15 19:34:18 +0100
committerMarkus Armbruster <armbru@redhat.com>2016-03-18 17:34:40 +0100
commit3625c739eaf304fdf8ab3552ea6140cce07962a2 (patch)
tree1e00501ce39ec56cea2598f3e0d656b0d4200825 /contrib/ivshmem-server/ivshmem-server.h
parente3ad72965a86b19df5d011117e186c62893085ef (diff)
ivshmem-server: Don't overload POSIX shmem and file name
Option -m NAME is interpreted as directory name if we can statfs() it and its on hugetlbfs. Else it's interpreted as POSIX shared memory object name. This is nuts. Always interpret -m as directory. Create new -M for POSIX shared memory. Last of -m or -M wins. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1458066895-20632-4-git-send-email-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'contrib/ivshmem-server/ivshmem-server.h')
-rw-r--r--contrib/ivshmem-server/ivshmem-server.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/ivshmem-server/ivshmem-server.h b/contrib/ivshmem-server/ivshmem-server.h
index e9de8a369d..3851639618 100644
--- a/contrib/ivshmem-server/ivshmem-server.h
+++ b/contrib/ivshmem-server/ivshmem-server.h
@@ -66,6 +66,7 @@ typedef struct IvshmemServer {
char unix_sock_path[PATH_MAX]; /**< path to unix socket */
int sock_fd; /**< unix sock file descriptor */
char shm_path[PATH_MAX]; /**< path to shm */
+ bool use_shm_open;
size_t shm_size; /**< size of shm */
int shm_fd; /**< shm file descriptor */
unsigned n_vectors; /**< number of vectors */
@@ -89,7 +90,8 @@ typedef struct IvshmemServer {
*/
int
ivshmem_server_init(IvshmemServer *server, const char *unix_sock_path,
- const char *shm_path, size_t shm_size, unsigned n_vectors,
+ const char *shm_path, bool use_shm_open,
+ size_t shm_size, unsigned n_vectors,
bool verbose);
/**