How to obtain or simulate the remaining space of drive redirection #3246
-
Currently, chansrv can properly handle drive redirection. However, some specific programs, such as browsers, check whether there is enough storage space when downloading and saving files. How can we make the operating system recognize the remaining space for drive redirection? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
Hi @tsz8899 As always from you, this is an interesting and though-provoking observation. I don't think there's anything in the protocol to support this kind of direct query. I tested that with a couple of Windows 10 VMs, with the reasoning that if Microsoft supports it we should be able to. I ran mstsc.exe and asked to pass through just the C drive. Here is what I get:- The redirected drive does not display its free space, nor could I find a way to make it. So I think the only way to proceed would be to supply a dummy value which chansrv could pass back to the Thoughts? |
Beta Was this translation helpful? Give feedback.
-
Come into force!@@ chansrv_fuse.c .h
thank |
Beta Was this translation helpful? Give feedback.
-
After modifying the code, I encountered a VFS fuse kernel error that I had never seen before. All existing and new features functioned normally during frequent use. This fuse error occurred only once.
|
Beta Was this translation helpful? Give feedback.
-
thank kernel is 6.10.8 |
Beta Was this translation helpful? Give feedback.
-
I've been looking at the Microsoft documents related to the remote filesystem, and I think I've given you incorrect information. It may be possible to query the free space after all. Relevant sections are
I'm a little short of time to look at this at the moment, but it looks promising. |
Beta Was this translation helpful? Give feedback.
Hi @tsz8899
As always from you, this is an interesting and though-provoking observation.
I don't think there's anything in the protocol to support this kind of direct query. I tested that with a couple of Windows 10 VMs, with the reasoning that if Microsoft supports it we should be able to.
I ran mstsc.exe and asked to pass through just the C drive. Here is what I get:-
The redirected drive does not display its free space, nor could I find a way to make it.
So I think the only way to proceed would be to supply a dummy value which chansrv could pass back to the
statfs
system call. It wouldn't be just the value though - If I understand it correctly we'd have to link an additional method into