OS_FSControl 55 (xosfscontrol_free_space64) failed
Sergey Lentsov (8268) 63 posts |
Hello, Can anybody please explain why xosfscontrol_free_space64() function may failed with error “(92670) Bad command”? My code:
The _current_root is “HostFS::H.$” I get err with number 92670 and message “Bad command” |
Stuart Swales (8827) 1357 posts |
Seems to work here (consistent with the Free option on HostFS) from BASIC, so there may be a bug in xosfscontrol_free_space64. Try _kernel_swi |
Charles Ferguson (8243) 427 posts |
I suspect that’s because it’s not implemented by the filing system. Filing system number &69 is AppleFS according to the list of FS numbers I’ve got here, but you stated that your error was for If I do this on HostFS::H.$ with RPCEmu, I get ‘Disc not found" and an error number of 104916 which is &199d4 – ie the HostFS filesystem. Which implies that my assumption that you’re using RPCEmu is wrong. So I can’t explain it, but the parameters you describe and the response are all odd. |
André Timmermans (100) 655 posts |
What is the evaluation order of “(int*)&xxx_space + 1”? If it is the former, you should use “((int*)&xxx_space) + 1” instead to point at xxx_space + 32 bits. |
Stuart Swales (8827) 1357 posts |
Or use a union of one uint64_t and two uint32_t. Simples. |
Jon Abbott (1421) 2651 posts |
Possibly unrelated, but whilst developing Partition Manager I have been plagued with random issues caused by either OS_FSControl 49 or OS_FSControl 55 against 3rd party filing systems. I can’t make out if the issue I’m seeing is triggered by the filesystem Module, FileCore or CLib. To date I’ve not investigated, just commented out the call under the assumption it’s an issue with the underlying filesystem. I was half expecting someone using Partition Manager to report the issue, but nothing to date which also reaffirmed my suspicion around the underlying filesystem. |
Rick Murray (539) 13840 posts |
Partition Manager link doesn’t work. |
Chris Mahoney (1684) 2165 posts |
Looks like it’s supposed to be https://forums.jaspp.org.uk/forum/viewforum.php?f=29 |