aboutsummaryrefslogtreecommitdiffstats
path: root/src/hw/blockcmd.h
Commit message (Collapse)AuthorAgeFilesLines
* blockcmd: generic SCSI luns enumerationRoman Kagan2017-05-021-0/+4
| | | | | | | | | | | | | | | | | | | Add two generic functions to discover active LUNs on a SCSI target. The functions take a temporary drive descriptor on the target, and a callback to create a new drive descriptor with a new LUN using the temporary one as a template. One of the functions performs REPORT LUNS on the temporary drive to obtain the list of candidate luns; the other sequentially iterates the lun numbers up to the given maximum, and is meant as a fallback. Both functions return the number of successfully created drive descriptors, or a negative number if an error occured. This will allow to lift the limitation of most of the SCSI drivers that support booting off the LUN #0 only. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
* blockcmd: Convert cdb_is_read() to scsi_is_read()Kevin O'Connor2015-07-141-1/+1
| | | | | | | Convert the cdb_is_read() function to a new function scsi_is_read() which takes a 'struct disk_op_s' as a paramter. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* blockcmd: Remove unused scsi_process_op() and cdb_cmd_data()Kevin O'Connor2015-07-141-1/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* blockcmd: Introduce scsi_fill_cmd()Kevin O'Connor2015-07-141-0/+1
| | | | | | | Introduce scsi_fill_cmd() which creates a scsi style "command data block" from a "struct disk_op_s" disk request. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* scsi: Don't export cdb_* functionsKevin O'Connor2014-12-291-9/+0
| | | | | | | The low-level cdb_* functions are now only used from within cmdblock.c, so don't export them. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* scsi: Move process_scsi_op() to hw/blockcmd.c and renameKevin O'Connor2014-12-291-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Move code centered around specific hardware devices to src/hw/Kevin O'Connor2013-09-021-0/+118
Move many C files from the src/ directory to the new src/hw/ directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>