scsi: don't make the linux lib depend on a library header file

The code dependend on the sg_lib header being present, remove this dependency
so that we only need public headers.

Change-Id: I69398453635135deb33e2adf67f15ddb80e4ba16
This commit is contained in:
Amaury Pouly 2017-04-03 15:02:19 +02:00
parent b3de64e7c1
commit 1597c4fe34

View file

@ -43,11 +43,10 @@ typedef HANDLE rb_scsi_handle_t;
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <scsi/sg.h>
#include <scsi/sg_lib.h>
#include <scsi/sg_io_linux.h>
#define RB_SCSI_LINUX
typedef int rb_scsi_handle_t;
#else
@ -64,6 +63,9 @@ struct rb_scsi_device_t
/* Linux */
#ifdef RB_SCSI_LINUX
/* the values for hdr.driver_status are not defined in public headers */
#define DRIVER_SENSE 0x08
rb_scsi_device_t rb_scsi_open(const char *path, unsigned flags, void *user,
rb_scsi_printf_t printf)
{