Nov 12, 2008, 9:56 AM
Post #1 of 2
I'd like to create a perl script that creates a pseudo-device that shuffles data to-and-from /dev/sg0, making some minor tweaks along the way.
device I/O interceptor
A friend has shown me how to use ioctl to talk to things like /dev/sg0 with perl, but I don't see how to make perl listen to something as if it were a device.
I'm guessing the pseudo-device would be a FIFO, lets call it /dev/psg0.
I'd like to be able to do "sg_ses -p 2 /dev/psg0", and have a perl script listen to what sg_ses sends via /dev/psg0, tweak it a bit and send it on to /dev/sg0, take the response from /dev/sg0 and send it back to sg_ses via /dev/psg0.
I can't find the CPAN module that does this.