在 Mac OS X 中向 SCSI 设备发送特定的 SCSI 命令

发布于 2024-12-04 00:30:44 字数 31 浏览 5 评论 0原文

是否可以对 SCSI 驱动程序执行一些查询请求?

Is it possible to do some Inquiry requests to SCSI driver?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

油饼 2024-12-11 00:30:44

不,从用户态是不可能的。

根据设计,Mac OS X 不允许应用程序发送 SCSI 或 ATA
对存储设备的命令,除非应用程序开发人员还
提供支持命令的内核设备驱动程序。这
SCSI 架构模型系列仅允许一个逻辑单元驱动程序
一次控制一个设备并提供内核逻辑单元驱动程序
用于存储设备(如“SCSI 架构模型系列”中所列)
设备支持”)。同样,ATA家族也不允许
应用程序直接向 ATA 或 SATA(串行 ATA)发送 ATA 命令
设备。

从这里
http://developer.apple.com/library/mac/#documentation/DeviceDrivers/Conceptual/WorkingWithSAM/WWS_SAMDevInt/WWS_SAM_DevInt.html

No it is not possible from userland.

By design, Mac OS X does not allow applications to send SCSI or ATA
commands to storage devices unless the application developer also
provides an in-kernel device driver that supports the commands. The
SCSI Architecture Model family allows only one logical unit driver to
control a device at a time and provides in-kernel logical unit drivers
for storage devices (as listed in “SCSI Architecture Model Family
Device Support”). Similarly, the ATA family does not allow
applications to send ATA commands directly to ATA or SATA (Serial ATA)
devices.

From here
http://developer.apple.com/library/mac/#documentation/DeviceDrivers/Conceptual/WorkingWithSAM/WWS_SAMDevInt/WWS_SAM_DevInt.html

地狱即天堂 2024-12-11 00:30:44

接受的答案并不完全正确。

如果设备不是块磁盘设备,而是磁带驱动器,因此默认情况下不由 macOS 驱动程序驱动,则可以使用 ,来自用户态应用程序。请参阅 Apple 的 SCSI文档

The accepted answer is not entirely correct.

If the device is not a block disk device but, for instance, a tape drive, and therefore is not driven by a macOS driver by default, then one can talk to it using the functions available in <IOKit/scsi/SCSITaskLib.h>, from a userland application. See the "SCSITaskDeviceInterface" section in Apple's SCSI docs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文