On Tue, 13 Dec 2005, gary clark wrote:

> Hello,
> 
> I want to be able to log file transfers from a PC to
> USB storage devices? Can this be achieved in user
> space or will I have to patch the kernel usb storage
> driver to achieve this. I was thinking the latter
> would be the obvious choice. Any ideas on this would
> be appreciated.

There's no way to do this from within the kernel.  The kernel can't tell 
the difference between a file transfer and any other I/O operation.  And 
usb-storage can't tell whether a particular I/O operation involves file 
data.

A simple userspace approach would be to set up a shell alias for the "cp"  
command.  Have it add a line to the log file in addition to doing the
copy.  Of course, that won't catch all file transfers.

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to