rte_virtio: use spdk/stdinc.h
Replace POSIX and standard C #includes with the central SPDK stdinc.h and remove the rte_virtio exclusion from header checking in scripts/check_format.sh Change-Id: Ie53d11de7cd9a51c59957e3c500bd8b9b4c4bc5e Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/383003 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
94678ad9ee
commit
ba90c8876e
@ -31,11 +31,7 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include "spdk/stdinc.h"
|
||||
|
||||
#include <linux/virtio_scsi.h>
|
||||
|
||||
|
@ -34,9 +34,7 @@
|
||||
#ifndef _VIRTIO_DEV_H_
|
||||
#define _VIRTIO_DEV_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/queue.h>
|
||||
#include "spdk/stdinc.h"
|
||||
|
||||
#include <linux/virtio_ring.h>
|
||||
|
||||
@ -45,6 +43,7 @@
|
||||
|
||||
#include "spdk_internal/log.h"
|
||||
#include "spdk/likely.h"
|
||||
#include "spdk/queue.h"
|
||||
|
||||
/*
|
||||
* Per virtio_config.h in Linux.
|
||||
|
@ -30,7 +30,8 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <stdint.h>
|
||||
|
||||
#include "spdk/stdinc.h"
|
||||
|
||||
#include <linux/virtio_scsi.h>
|
||||
|
||||
|
@ -34,7 +34,8 @@
|
||||
#ifndef _VIRTIO_PCI_H_
|
||||
#define _VIRTIO_PCI_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include "spdk/stdinc.h"
|
||||
|
||||
#include <linux/virtio_config.h>
|
||||
#include <linux/virtio_pci.h>
|
||||
|
||||
|
@ -31,12 +31,8 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include "spdk/stdinc.h"
|
||||
|
||||
#include <sys/eventfd.h>
|
||||
|
||||
#include <linux/virtio_scsi.h>
|
||||
|
@ -34,9 +34,7 @@
|
||||
#ifndef _VHOST_NET_USER_H
|
||||
#define _VHOST_NET_USER_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include "spdk/stdinc.h"
|
||||
|
||||
#include "spdk_internal/log.h"
|
||||
|
||||
|
@ -31,14 +31,7 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/un.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "spdk/stdinc.h"
|
||||
|
||||
#include "vhost.h"
|
||||
#include "virtio_user_dev.h"
|
||||
|
@ -31,17 +31,7 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/eventfd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include "spdk/stdinc.h"
|
||||
|
||||
#include "vhost.h"
|
||||
#include "virtio_user_dev.h"
|
||||
|
@ -34,9 +34,10 @@
|
||||
#ifndef _VIRTIO_USER_DEV_H
|
||||
#define _VIRTIO_USER_DEV_H
|
||||
|
||||
#include "spdk/stdinc.h"
|
||||
|
||||
#include <linux/virtio_ring.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include "vhost.h"
|
||||
|
||||
#include "../virtio_dev.h"
|
||||
|
@ -64,7 +64,7 @@ fi
|
||||
rm -f eofnl.log
|
||||
|
||||
echo -n "Checking for POSIX includes..."
|
||||
git grep -I -i -f scripts/posix.txt -- './*' ':!include/spdk/stdinc.h' ':!lib/vhost/rte_vhost*/**' ':!lib/bdev/virtio/rte_virtio*/**' ':!scripts/posix.txt' > scripts/posix.log || true
|
||||
git grep -I -i -f scripts/posix.txt -- './*' ':!include/spdk/stdinc.h' ':!lib/vhost/rte_vhost*/**' ':!scripts/posix.txt' > scripts/posix.log || true
|
||||
if [ -s scripts/posix.log ]; then
|
||||
echo "POSIX includes detected. Please include spdk/stdinc.h instead."
|
||||
cat scripts/posix.log
|
||||
|
Loading…
Reference in New Issue
Block a user