#!/usr/sbin/dtrace -qCs
/* stolen from /usr/include/sys/scsi/impl/uscsi.h */
#define USCSIIOC (0x04 << 8)
#define USCSICMD (USCSIIOC|201) /* user scsi command */
pid$target::ioctl:entry {
self->p = 0;
self->t = timestamp;
self->i = arg1;
}
pid$target::ioctl:return /self->t/ {
@[probefunc,
self->i == USCSICMD ? "USCSICMD" : "other"] =
quantize(timestamp - self->t);
self->fd = 0 ; self->t = 0 ;
}