aboutsummaryrefslogtreecommitdiff
path: root/coroutine-sigaltstack.c
diff options
context:
space:
mode:
authorDimitris Aragiorgis <dimara@arrikto.com>2015-06-23 13:45:00 +0300
committerStefan Hajnoczi <stefanha@redhat.com>2015-06-23 15:08:52 +0100
commit3307ed7b3fac5ba99eb3b84904b0b7cdc3592a61 (patch)
treefb98300d62b250a8976a07a9384a6ba27402d2e0 /coroutine-sigaltstack.c
parenta93a3982a6645463fa822131d38b17284edd5633 (diff)
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 'coroutine-sigaltstack.c')
0 files changed, 0 insertions, 0 deletions