Christian Costa titan.costa@wanadoo.fr writes:
Something wrong is happening here, fstatfs return a good fs magic ID for reiserfs and vfat partitions. However, for the cdrom it returns 0x9fa1 which corresponds to OPENPROM fs !?! (and this for my cdreader and my cd recorder)
Something is wrong here...
FSCTL_DISMOUNT_VOLUME : in DIR_unmount_device (in ntdll/directory.c):
- unmount_device server call (in fd.c) is called but in unmount_device,
the function tries to retreive a device object given the device return by fstat but no device object has been previously created so get_device fails. My understanding is that this server call should closed all fds associated with the device but files stay opened.
It closes them in the server, but it can't close them in the client. They are open in the client because your CD has not been detected as a removable device so the client doesn't know that it shouldn't cache fds.
- system("umount ....") is called to unmount the device but umount
requires to be root and the return code of umount command is not tested so the call fails silently and FSCTL_DISMOUNT_VOLUME returns a success status
Yes, the device has been unmounted as far as the server is concerned, any subsequent access to the files will fail, so it makes sense to return success. The Unix unmount is really a best effort kind of thing, it can fail for a lot of reasons, like other apps having open files, but we don't want to return a failure in that case.