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.
I will hack FILE_GetDeviceInfo just to make it recognize my cdrom as removable and try to see if it helps.
However, I don't understand well why forcing the drive as cdrom (instead of relying on autodetection) is not taken into account. This could be also usefull for ISO images. Unless this option is planned to be removed !?!
Thx, Christian
Christian Costa titan.costa@wanadoo.fr writes:
I will hack FILE_GetDeviceInfo just to make it recognize my cdrom as removable and try to see if it helps.
However, I don't understand well why forcing the drive as cdrom (instead of relying on autodetection) is not taken into account. This could be also usefull for ISO images. Unless this option is planned to be removed !?!
We can't do that because all we have is a file handle, and there's no way to know which drive it was opened from. Besides, you don't really want that anyway, whether you open d:\foo or z:\mnt\cdrom\foo doesn't change the fact that foo is on a removable device. So we really need to make autodetection work properly (it does work fine for ISO images BTW).
Alexandre Julliard wrote:
Christian Costa titan.costa@wanadoo.fr writes:
I will hack FILE_GetDeviceInfo just to make it recognize my cdrom as removable and try to see if it helps.
However, I don't understand well why forcing the drive as cdrom (instead of relying on autodetection) is not taken into account. This could be also usefull for ISO images. Unless this option is planned to be removed !?!
We can't do that because all we have is a file handle, and there's no way to know which drive it was opened from. Besides, you don't really want that anyway, whether you open d:\foo or z:\mnt\cdrom\foo doesn't change the fact that foo is on a removable device. So we really need to make autodetection work properly (it does work fine for ISO images BTW).
Ok thanks, it is clearer in my mind.
I made FILE_GetDeviceInfo recognize my cdroms and it works. I just need now to figure out why the fs magic id is wrong.
Thanks a lot for your time and explanations.
Bye, Christian