pccard-launch starts Fsys.eide when I insert my Kingston DataPak 5GB card,
and terminates it when I remove the card. So far so good. The problem is
that /dev/hd1.0 remains in the namespace after Fsys.eide terminates, which
later causes problems.
The docs say that pccard-launch sends a SIGTERM to the driver when the card
is removed. However, the Fsys docs (QNX 4.25D) say you should not slay
(SIGTERM) a filesystem driver, but should perform a shutdown procedure
(unmount, rm /dev/hd1.0).
What is the proper way to use pccard-launch with a removable hard drive? For
reference, here is my command:
No, you cannot slay Fsys.eide, as this will leave the file system in an
indeterminate state. If the flash is /dev/hd1, then the proper way to
remove it would first be to do a ‘umount /dev/hd1t77’ (assuming that you
have a QNX4 type partition on the flash) and then a ‘umount /dev/hd1’.
The unmount of the physical device will also slay the driver.
Previously, Dale Sherwood, NYAB wrote in qdn.public.qnx4:
Hi:
pccard-launch starts Fsys.eide when I insert my Kingston DataPak 5GB card,
and terminates it when I remove the card. So far so good. The problem is
that /dev/hd1.0 remains in the namespace after Fsys.eide terminates, which
later causes problems.
The docs say that pccard-launch sends a SIGTERM to the driver when the card
is removed. However, the Fsys docs (QNX 4.25D) say you should not slay
(SIGTERM) a filesystem driver, but should perform a shutdown procedure
(unmount, rm /dev/hd1.0).
What is the proper way to use pccard-launch with a removable hard drive? For
reference, here is my command:
No, you cannot slay Fsys.eide, as this will leave the file system in an
indeterminate state. If the flash is /dev/hd1, then the proper way to
remove it would first be to do a ‘umount /dev/hd1t77’ (assuming that you
have a QNX4 type partition on the flash) and then a ‘umount /dev/hd1’.
The unmount of the physical device will also slay the driver.
I think, you have to do a ‘rm /dev/hd1’ to get rid of the driver …
Hugh Brown <> hsbrown@qnx.com> > wrote:
No, you cannot slay Fsys.eide, as this will leave the file system in an
indeterminate state. If the flash is /dev/hd1, then the proper way to
remove it would first be to do a ‘umount /dev/hd1t77’ (assuming that you
have a QNX4 type partition on the flash) and then a ‘umount /dev/hd1’.
The unmount of the physical device will also slay the driver.
I think, you have to do a ‘rm /dev/hd1’ to get rid of the driver …
The docs say that pccard-launch sends a SIGTERM to the driver when the card
is removed. However, the Fsys docs (QNX 4.25D) say you should not slay
(SIGTERM) a filesystem driver, but should perform a shutdown procedure
(unmount, rm /dev/hd1.0).
It’s been a while since I did this, and then with PcmciaLaunch, but it
sounds the same. You are on exactly the right track though regarding
the use of a program to start Fsys.eide and then wait for the SIGTERM
and then perform the shutdown (others have posted the umount/rm needed).
I did this with a shell script and the “trap” command … this is a bit
rusty from memory, but try (something like) this (and make it the script
invoked by the launch utility):
terminate()
{
will also need to unmount any filesystems too
umount /dev/hd1.0
rm /dev/hd1.0
}
trap terminate TERM
Fsys.eide -Nbackup -n0=hd1 eide -a$IOPORT -i$IRQ &
mount -p /dev/hd1.0