diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2017-04-03 15:02:19 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2017-04-03 15:02:19 +0200 |
commit | 1597c4fe343f4fee0821f590b592341a00362d85 (patch) | |
tree | 23834a821dd4119bf50637d5bab7f0088805373b /utils | |
parent | b3de64e7c11db0d7b0a37827be36e8749d36d942 (diff) | |
download | rockbox-1597c4fe343f4fee0821f590b592341a00362d85.tar.gz rockbox-1597c4fe343f4fee0821f590b592341a00362d85.zip |
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
Diffstat (limited to 'utils')
-rw-r--r-- | utils/scsi/rbscsi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/scsi/rbscsi.c b/utils/scsi/rbscsi.c index 8a263f29e6..a43608a08b 100644 --- a/utils/scsi/rbscsi.c +++ b/utils/scsi/rbscsi.c | |||
@@ -43,11 +43,10 @@ typedef HANDLE rb_scsi_handle_t; | |||
43 | #include <fcntl.h> | 43 | #include <fcntl.h> |
44 | #include <stdio.h> | 44 | #include <stdio.h> |
45 | #include <string.h> | 45 | #include <string.h> |
46 | #include <stdint.h> | ||
46 | #include <errno.h> | 47 | #include <errno.h> |
47 | #include <sys/ioctl.h> | 48 | #include <sys/ioctl.h> |
48 | #include <scsi/sg.h> | 49 | #include <scsi/sg.h> |
49 | #include <scsi/sg_lib.h> | ||
50 | #include <scsi/sg_io_linux.h> | ||
51 | #define RB_SCSI_LINUX | 50 | #define RB_SCSI_LINUX |
52 | typedef int rb_scsi_handle_t; | 51 | typedef int rb_scsi_handle_t; |
53 | #else | 52 | #else |
@@ -64,6 +63,9 @@ struct rb_scsi_device_t | |||
64 | 63 | ||
65 | /* Linux */ | 64 | /* Linux */ |
66 | #ifdef RB_SCSI_LINUX | 65 | #ifdef RB_SCSI_LINUX |
66 | /* the values for hdr.driver_status are not defined in public headers */ | ||
67 | #define DRIVER_SENSE 0x08 | ||
68 | |||
67 | rb_scsi_device_t rb_scsi_open(const char *path, unsigned flags, void *user, | 69 | rb_scsi_device_t rb_scsi_open(const char *path, unsigned flags, void *user, |
68 | rb_scsi_printf_t printf) | 70 | rb_scsi_printf_t printf) |
69 | { | 71 | { |