/*
* Copyright (C) 2001, 2002 Cluster File Systems, Inc.
*
+ * Copyright (c) 2014, Intel Corporation.
+ *
* This file is part of Portals, http://www.sf.net/projects/lustre/
*
* Portals is free software; you can redistribute it and/or
#define __USE_FILE_OFFSET64
+#include <sys/ioctl.h>
+#include <sys/mman.h>
#include <libcfs/libcfsutil.h>
#include <lnet/lnetctl.h>
return 0;
}
+void
+libcfs_ioctl_unpack(struct libcfs_ioctl_data *data, char *pbuf)
+{
+ struct libcfs_ioctl_data *overlay = (struct libcfs_ioctl_data *)pbuf;
+ char *ptr;
+
+ /* Preserve the caller's buffer pointers */
+ overlay->ioc_inlbuf1 = data->ioc_inlbuf1;
+ overlay->ioc_inlbuf2 = data->ioc_inlbuf2;
+
+ memcpy(data, pbuf, sizeof(*data));
+ ptr = &overlay->ioc_bulk[0];
+
+ if (data->ioc_inlbuf1 != NULL)
+ LOGU(data->ioc_inlbuf1, data->ioc_inllen1, ptr);
+ if (data->ioc_inlbuf2 != NULL)
+ LOGU(data->ioc_inlbuf2, data->ioc_inllen2, ptr);
+}