diff options
| author | Dimitris Aragiorgis <dimara@arrikto.com> | 2015-06-23 13:45:00 +0300 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@redhat.com> | 2015-06-23 15:08:52 +0100 |
| commit | 3307ed7b3fac5ba99eb3b84904b0b7cdc3592a61 (patch) | |
| tree | fb98300d62b250a8976a07a9384a6ba27402d2e0 /hw/core/qdev-properties-system.c | |
| parent | a93a3982a6645463fa822131d38b17284edd5633 (diff) | |
| download | focaccia-qemu-3307ed7b3fac5ba99eb3b84904b0b7cdc3592a61.tar.gz focaccia-qemu-3307ed7b3fac5ba99eb3b84904b0b7cdc3592a61.zip | |
raw-posix: Introduce hdev_is_sg()
Until now, an SG device was identified only by checking if its path started with "/dev/sg". Then, hdev_open() would set the bs->sg flag accordingly. The patch relies on the actual properties of the device instead of the specified file path. To this end, test for an SG device (e.g. /dev/sg0) by ensuring that all of the following holds: - The specified file name corresponds to a character device - The device supports the SG_GET_VERSION_NUM ioctl - The device supports the SG_GET_SCSI_ID ioctl Signed-off-by: Dimitris Aragiorgis <dimara@arrikto.com> Message-id: 1435056300-14924-6-git-send-email-dimara@arrikto.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/core/qdev-properties-system.c')
0 files changed, 0 insertions, 0 deletions