[patch] SG_IO ioctl

Vladimir Nadvornik nadvornik at suse.cz
Mon Mar 19 17:00:17 UTC 2007


On Thursday 15 March 2007 02:11, Dmitry V. Levin wrote:
> Hi,
>
> On Tue, Mar 13, 2007 at 02:00:54PM +0100, Vladimir Nadvornik wrote:
> [...]
>
> > This patch adds possibility to trace linux SG_IO ioctl arguments and
> > results. Do you think it can be included?
>
> Yes, probably with minor adjustments.
>

Thank you for feedback. Please see the updated patch.
>
> > +int
> > +scsi_ioctl(tcp, code, arg)
>
> Btw, why scsi_ioctl?  Isn't it just scsi sg_io ioctl parser?
>

Other sg_* ioctls can be eventually added.


> > +		if (exiting(tcp)) {
> > +			struct sg_io_hdr sg_io;
> > +			if (umove(tcp, arg, &sg_io) >= 0) {
> > +				print_sg_io_res(tcp, &sg_io);
> > +			}
> > +		}
>
> Looks like syserror(tcp) check is missing here.

If there is an error, it prints the content of the structure as it was 
passed in. I think that it is acceptable behavior and special handling
is not necessary.



-- 
Vladimir Nadvornik
developer
---------------------------------------------------------------------  
SUSE LINUX, s. r. o.                        e-mail: nadvornik at suse.cz
Lihovarská 1060/12                          tel:+420 284 028 967
190 00 Praha 9                              fax:+420 284 028 951
Czech Republic                              http://www.suse.cz    
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strace-scsi.diff
Type: text/x-diff
Size: 3768 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20070319/8b4ae02a/attachment.bin>


More information about the Strace-devel mailing list