> Try to run the following dtrace script, and send an
> eject to the firewire device.
> 
> What values are printed for "l_nosup_tur" and
> "l_nosup_start_stop"?
> 
> ======================================================
> ===============
> #!/usr/sbin/dtrace -s
> 
> fbt::scsa1394_cmd_fake_comp:entry
> {
>         self->sp = (scsa1394_state_t *)arg0;
> self->cmd = (scsa1394_cmd_t *)arg1;
>         self->lp = self->cmd->sc_lun;
> printf("l_rmb_orig %d, l_nosup_tur %d,
> l_nosup_start_stop %d, l_nosup_inquiry %d",
> self->lp->l_rmb_orig,
>  self->lp->l_nosup_tur,
> self->lp->l_nosup_start_stop,
>  self->lp->l_nosup_inquiry);
> 
> ======================================================
> ===============

I'm a complete novice with dtrace - never used it before.

I cut and pasted your script and then made the assumption
that the printf statement goes on a single line.  I get an error:

[t43p:/home/stu/temp/dtrace]# ./cd_eject

dtrace: failed to compile script ./cd_eject: line 5: syntax error near ")"
[t43p:/home/stu/temp/dtrace]# [t43p:/home/stu/temp/dtrace]# cat cd_eject
#!/usr/sbin/dtrace -s

fbt::scsa1394_cmd_fake_comp:entry
{
self->sp = (scsa1394_state_t *)arg0;
self->cmd = (scsa1394_cmd_t *)arg1;
self->lp = self->cmd->sc_lun;
printf("l_rmb_orig %d, l_nosup_tur %d, l_nosup_start_stop %d, l_nosup_inquiry 
%d", self->lp->l_rmb_orig, self->lp->l_nosup_tur, self->lp->l_nosup_start_stop, 
self->lp->l_nosup_inquiry);
}
[t43p:/home/stu/temp/dtrace]# 

Suggestions on what I'm doing wrong?  Is the error in
the line:

self->sp = (scsa1394_state_t *)arg0;

Thanks,

Stuart
 
 
This message posted from opensolaris.org

Reply via email to