savemii icon indicating copy to clipboard operation
savemii copied to clipboard

Change file user/group

Open koolkdev opened this issue 7 years ago • 7 comments

Hi, I saw your TODO list in the last release. I am pretty familiar with the file system internals, so here is some information that may be useful. There is FSA_ChangeOwner command, but I see that no one ever documented it or mentioned it.

The issue is that it needs to be added to haxchi and mocha wupserver. I created a pull request for haxchi and libiosuhax: https://github.com/FIX94/haxchi/pull/12

Also, about ctime/mtime, in the filesystem it is stored in epoch time, but than when it fills the FSStat it converts it to milliseconds since 1/1/1980.

koolkdev avatar Aug 14 '17 00:08 koolkdev

Oh, another option would be integrating iosuhax like wudump does. (And it will even work with regular HBL, but I think that it won't work with mocha)

koolkdev avatar Aug 14 '17 07:08 koolkdev

Thanks for the info.

GabyPCgeeK avatar Aug 15 '17 00:08 GabyPCgeeK

Just a small correction, time in microseconds, not milliseconds.

koolkdev avatar Aug 15 '17 07:08 koolkdev

Thanks. I've already made made it work with the functions from time.h by converting value to seconds and adding seconds from 1/1/1970 to 1/1/1980.

Also could you add support for more fsa commands like FSAGetCwd, FSAReadFileWithPos, FSAWriteFileWithPos, FSAGetPosFile, FSAIsEof, FSAAppendFile, FSAAppendFileEx, FSAFlushFile, FSAFlushQuota, FSAOpenFileEx But especially FSAMakeQuota, FSARollbackQuota, FSARollbackVolume, FSARename, FSAGetDirSize, FSAGetEntryNum, FSAGetFreeSpaceSize, FSAGetVolumeInfo, FSATruncateFile, FSAGetStatusStr. (If, they really do exist. Found them in the decaf-emu source.)

Also the fileStat_s struct in lib/iosuhax seems to be wrong. I changed it to be the same as the FSStat struct and now seems to work.

GabyPCgeeK avatar Aug 15 '17 16:08 GabyPCgeeK

Ok, I added most of them here: https://github.com/FIX94/haxchi/pull/13

Since I doubt that haxchi will be updated, it is possible to integrate wupserver into your app. (it only doesn't work in mocha, but it will work on the regular HBL, so it will only be an issue for redNAND users)

koolkdev avatar Aug 17 '17 22:08 koolkdev

Thanks. I'll try to integrate wupserver.

GabyPCgeeK avatar Aug 19 '17 01:08 GabyPCgeeK

question: why not compile your own libiosuhax, then compile custom mocha with it?

djskual avatar Aug 21 '17 17:08 djskual