{"action":"created","comment":{"url":"https://api.github.com/repos/citra-emu/citra/pulls/comments/72886584","id":72886584,"diff_hunk":"@@ -391,19 +395,105 @@ static void OpenArchive(Service::Interface* self) {\n }\n \n /**\n+ * FS_User::ControlArchive service function\n+ *  Inputs:\n+ *      0 : Header code [0x080D0144]\n+ *    1-2 : u64, Archive Handle\n+ *      3 : Action\n+ *      4 : Input Size\n+ *      5 : Output Size\n+ *      6 : (inputSize << 4) | 0xA\n+ *      7 : void* Input\n+ *      8 : (outputSize << 4) | 0xC\n+ *      9 : void* Output\n+ *  Outputs:\n+ *      0 : Header code\n+ *      1 : Result code\n+ *  Notes:\n+ *      Action:\n+ *             0 : Commits save data changes.\n+ *                     Input : None\n+ *                    Output : None\n+ *             1 : Retrieves a file's last-modified timestamp\n+ *                     Input : u16*, UTF-16 Path\n+ *                    Output : u64, Time Stamp\n+ *         30877 : Calls FSPXI command 0x00560102(unknown)\n+ *                     Input : u16*, 12 bytes\n+ *                    Output : 16 bytes\n+ */\n+static void ControlArchive(Service::Interface* self) {\n+    u32* cmd_buff = Kernel::GetCommandBuffer();\n+\n+    ArchiveHandle archive_handle = MakeArchiveHandle(cmd_buff[1], cmd_buff[2]);\n+    u32 action = cmd_buff[3];\n+    u32 input_size = cmd_buff[4];\n+    u32 output_size = cmd_buff[5];\n+    u32 input_translation = cmd_buff[6];\n+    u32 input_buffer = cmd_buff[7];\n+    u32 output_translation = cmd_buff[8];\n+    u32 output_buffer = cmd_buff[9];\n+\n+    if (!IPC::CheckBufferMappingTranslation(IPC::BufferMappingType::InputBuffer, input_size, input_translation)) {\n+        cmd_buff[0] = IPC::MakeHeader(0x0, 1, 0); // 0x40\n+        cmd_buff[1] = ResultCode(ErrorDescription::OS_InvalidBufferDescriptor, ErrorModule::OS,\n+                                 ErrorSummary::WrongArgument, ErrorLevel::Permanent).raw; // 0xD9001830\n+        LOG_ERROR(Service_FS, \"Check input_buffer_mapping_translation failed\");\n+        return;\n+    }\n+\n+    if (!IPC::CheckBufferMappingTranslation(IPC::BufferMappingType::OutputBuffer, output_size, output_translation)) {\n+        cmd_buff[0] = IPC::MakeHeader(0x0, 1, 0); // 0x40\n+        cmd_buff[1] = ResultCode(ErrorDescription::OS_InvalidBufferDescriptor, ErrorModule::OS,\n+                                 ErrorSummary::WrongArgument, ErrorLevel::Permanent).raw; // 0xD9001830\n+        LOG_ERROR(Service_FS, \"Check output_buffer_mapping_translation failed\");\n+        return;\n+    }\n+\n+    switch (action) {","path":"src/core/hle/service/fs/fs_user.cpp","position":82,"original_position":82,"commit_id":"d1a02003e58be9b15b2252869187d7f2e0cb0b31","original_commit_id":"eed2bab07b33bba16dfd84dd7f5d0fbe511f5c88","user":{"login":"wwylele","id":4592895,"avatar_url":"https://avatars.githubusercontent.com/u/4592895?v=3","gravatar_id":"","url":"https://api.github.com/users/wwylele","html_url":"https://github.com/wwylele","followers_url":"https://api.github.com/users/wwylele/followers","following_url":"https://api.github.com/users/wwylele/following{/other_user}","gists_url":"https://api.github.com/users/wwylele/gists{/gist_id}","starred_url":"https://api.github.com/users/wwylele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwylele/subscriptions","organizations_url":"https://api.github.com/users/wwylele/orgs","repos_url":"https://api.github.com/users/wwylele/repos","events_url":"https://api.github.com/users/wwylele/events{/privacy}","received_events_url":"https://api.github.com/users/wwylele/received_events","type":"User","site_admin":false},"body":"@JamePeng I didn't get it, why call case 0 \"ControlArchive\" instead of \"CommitChanges\" or so.","created_at":"2016-07-30T12:16:51Z","updated_at":"2016-07-30T12:16:52Z","html_url":"https://github.com/citra-emu/citra/pull/1748#discussion_r72886584","pull_request_url":"https://api.github.com/repos/citra-emu/citra/pulls/1748","_links":{"self":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/comments/72886584"},"html":{"href":"https://github.com/citra-emu/citra/pull/1748#discussion_r72886584"},"pull_request":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/1748"}}},"pull_request":{"url":"https://api.github.com/repos/citra-emu/citra/pulls/1748","id":68540314,"html_url":"https://github.com/citra-emu/citra/pull/1748","diff_url":"https://github.com/citra-emu/citra/pull/1748.diff","patch_url":"https://github.com/citra-emu/citra/pull/1748.patch","issue_url":"https://api.github.com/repos/citra-emu/citra/issues/1748","number":1748,"state":"open","locked":false,"title":"Implement ControlArchive and IPC::CheckBufferMappingTranslation","user":{"login":"JamePeng","id":17095606,"avatar_url":"https://avatars.githubusercontent.com/u/17095606?v=3","gravatar_id":"","url":"https://api.github.com/users/JamePeng","html_url":"https://github.com/JamePeng","followers_url":"https://api.github.com/users/JamePeng/followers","following_url":"https://api.github.com/users/JamePeng/following{/other_user}","gists_url":"https://api.github.com/users/JamePeng/gists{/gist_id}","starred_url":"https://api.github.com/users/JamePeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JamePeng/subscriptions","organizations_url":"https://api.github.com/users/JamePeng/orgs","repos_url":"https://api.github.com/users/JamePeng/repos","events_url":"https://api.github.com/users/JamePeng/events{/privacy}","received_events_url":"https://api.github.com/users/JamePeng/received_events","type":"User","site_admin":false},"body":"I append the IPC::CheckBufferMappingTranslation for check the buffer_size whether map to their translation.\r\n\r\nOtherwise, I think all of temporarily mapped input_buffer/output_buffer operation should do this check first :smile: ","created_at":"2016-05-02T09:38:23Z","updated_at":"2016-07-30T12:16:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c89a91d09d826a600bcef062a45c15aa6fde58e4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/citra-emu/citra/pulls/1748/commits","review_comments_url":"https://api.github.com/repos/citra-emu/citra/pulls/1748/comments","review_comment_url":"https://api.github.com/repos/citra-emu/citra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/citra-emu/citra/issues/1748/comments","statuses_url":"https://api.github.com/repos/citra-emu/citra/statuses/d1a02003e58be9b15b2252869187d7f2e0cb0b31","head":{"label":"JamePeng:contorl-archive","ref":"contorl-archive","sha":"d1a02003e58be9b15b2252869187d7f2e0cb0b31","user":{"login":"JamePeng","id":17095606,"avatar_url":"https://avatars.githubusercontent.com/u/17095606?v=3","gravatar_id":"","url":"https://api.github.com/users/JamePeng","html_url":"https://github.com/JamePeng","followers_url":"https://api.github.com/users/JamePeng/followers","following_url":"https://api.github.com/users/JamePeng/following{/other_user}","gists_url":"https://api.github.com/users/JamePeng/gists{/gist_id}","starred_url":"https://api.github.com/users/JamePeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JamePeng/subscriptions","organizations_url":"https://api.github.com/users/JamePeng/orgs","repos_url":"https://api.github.com/users/JamePeng/repos","events_url":"https://api.github.com/users/JamePeng/events{/privacy}","received_events_url":"https://api.github.com/users/JamePeng/received_events","type":"User","site_admin":false},"repo":{"id":51692823,"name":"citra","full_name":"JamePeng/citra","owner":{"login":"JamePeng","id":17095606,"avatar_url":"https://avatars.githubusercontent.com/u/17095606?v=3","gravatar_id":"","url":"https://api.github.com/users/JamePeng","html_url":"https://github.com/JamePeng","followers_url":"https://api.github.com/users/JamePeng/followers","following_url":"https://api.github.com/users/JamePeng/following{/other_user}","gists_url":"https://api.github.com/users/JamePeng/gists{/gist_id}","starred_url":"https://api.github.com/users/JamePeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JamePeng/subscriptions","organizations_url":"https://api.github.com/users/JamePeng/orgs","repos_url":"https://api.github.com/users/JamePeng/repos","events_url":"https://api.github.com/users/JamePeng/events{/privacy}","received_events_url":"https://api.github.com/users/JamePeng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JamePeng/citra","description":"Nintendo 3DS emulator/debugger","fork":true,"url":"https://api.github.com/repos/JamePeng/citra","forks_url":"https://api.github.com/repos/JamePeng/citra/forks","keys_url":"https://api.github.com/repos/JamePeng/citra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JamePeng/citra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JamePeng/citra/teams","hooks_url":"https://api.github.com/repos/JamePeng/citra/hooks","issue_events_url":"https://api.github.com/repos/JamePeng/citra/issues/events{/number}","events_url":"https://api.github.com/repos/JamePeng/citra/events","assignees_url":"https://api.github.com/repos/JamePeng/citra/assignees{/user}","branches_url":"https://api.github.com/repos/JamePeng/citra/branches{/branch}","tags_url":"https://api.github.com/repos/JamePeng/citra/tags","blobs_url":"https://api.github.com/repos/JamePeng/citra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JamePeng/citra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JamePeng/citra/git/refs{/sha}","trees_url":"https://api.github.com/repos/JamePeng/citra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JamePeng/citra/statuses/{sha}","languages_url":"https://api.github.com/repos/JamePeng/citra/languages","stargazers_url":"https://api.github.com/repos/JamePeng/citra/stargazers","contributors_url":"https://api.github.com/repos/JamePeng/citra/contributors","subscribers_url":"https://api.github.com/repos/JamePeng/citra/subscribers","subscription_url":"https://api.github.com/repos/JamePeng/citra/subscription","commits_url":"https://api.github.com/repos/JamePeng/citra/commits{/sha}","git_commits_url":"https://api.github.com/repos/JamePeng/citra/git/commits{/sha}","comments_url":"https://api.github.com/repos/JamePeng/citra/comments{/number}","issue_comment_url":"https://api.github.com/repos/JamePeng/citra/issues/comments{/number}","contents_url":"https://api.github.com/repos/JamePeng/citra/contents/{+path}","compare_url":"https://api.github.com/repos/JamePeng/citra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JamePeng/citra/merges","archive_url":"https://api.github.com/repos/JamePeng/citra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JamePeng/citra/downloads","issues_url":"https://api.github.com/repos/JamePeng/citra/issues{/number}","pulls_url":"https://api.github.com/repos/JamePeng/citra/pulls{/number}","milestones_url":"https://api.github.com/repos/JamePeng/citra/milestones{/number}","notifications_url":"https://api.github.com/repos/JamePeng/citra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JamePeng/citra/labels{/name}","releases_url":"https://api.github.com/repos/JamePeng/citra/releases{/id}","deployments_url":"https://api.github.com/repos/JamePeng/citra/deployments","created_at":"2016-02-14T11:57:41Z","updated_at":"2016-02-14T11:57:43Z","pushed_at":"2016-07-30T12:13:06Z","git_url":"git://github.com/JamePeng/citra.git","ssh_url":"git@github.com:JamePeng/citra.git","clone_url":"https://github.com/JamePeng/citra.git","svn_url":"https://github.com/JamePeng/citra","homepage":null,"size":13110,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"citra-emu:master","ref":"master","sha":"e91327c86a863b9419fd3695b2400a52336ec3b5","user":{"login":"citra-emu","id":7605670,"avatar_url":"https://avatars.githubusercontent.com/u/7605670?v=3","gravatar_id":"","url":"https://api.github.com/users/citra-emu","html_url":"https://github.com/citra-emu","followers_url":"https://api.github.com/users/citra-emu/followers","following_url":"https://api.github.com/users/citra-emu/following{/other_user}","gists_url":"https://api.github.com/users/citra-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/citra-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citra-emu/subscriptions","organizations_url":"https://api.github.com/users/citra-emu/orgs","repos_url":"https://api.github.com/users/citra-emu/repos","events_url":"https://api.github.com/users/citra-emu/events{/privacy}","received_events_url":"https://api.github.com/users/citra-emu/received_events","type":"Organization","site_admin":false},"repo":{"id":19866730,"name":"citra","full_name":"citra-emu/citra","owner":{"login":"citra-emu","id":7605670,"avatar_url":"https://avatars.githubusercontent.com/u/7605670?v=3","gravatar_id":"","url":"https://api.github.com/users/citra-emu","html_url":"https://github.com/citra-emu","followers_url":"https://api.github.com/users/citra-emu/followers","following_url":"https://api.github.com/users/citra-emu/following{/other_user}","gists_url":"https://api.github.com/users/citra-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/citra-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citra-emu/subscriptions","organizations_url":"https://api.github.com/users/citra-emu/orgs","repos_url":"https://api.github.com/users/citra-emu/repos","events_url":"https://api.github.com/users/citra-emu/events{/privacy}","received_events_url":"https://api.github.com/users/citra-emu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citra-emu/citra","description":"Nintendo 3DS Emulator","fork":false,"url":"https://api.github.com/repos/citra-emu/citra","forks_url":"https://api.github.com/repos/citra-emu/citra/forks","keys_url":"https://api.github.com/repos/citra-emu/citra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citra-emu/citra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citra-emu/citra/teams","hooks_url":"https://api.github.com/repos/citra-emu/citra/hooks","issue_events_url":"https://api.github.com/repos/citra-emu/citra/issues/events{/number}","events_url":"https://api.github.com/repos/citra-emu/citra/events","assignees_url":"https://api.github.com/repos/citra-emu/citra/assignees{/user}","branches_url":"https://api.github.com/repos/citra-emu/citra/branches{/branch}","tags_url":"https://api.github.com/repos/citra-emu/citra/tags","blobs_url":"https://api.github.com/repos/citra-emu/citra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citra-emu/citra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citra-emu/citra/git/refs{/sha}","trees_url":"https://api.github.com/repos/citra-emu/citra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citra-emu/citra/statuses/{sha}","languages_url":"https://api.github.com/repos/citra-emu/citra/languages","stargazers_url":"https://api.github.com/repos/citra-emu/citra/stargazers","contributors_url":"https://api.github.com/repos/citra-emu/citra/contributors","subscribers_url":"https://api.github.com/repos/citra-emu/citra/subscribers","subscription_url":"https://api.github.com/repos/citra-emu/citra/subscription","commits_url":"https://api.github.com/repos/citra-emu/citra/commits{/sha}","git_commits_url":"https://api.github.com/repos/citra-emu/citra/git/commits{/sha}","comments_url":"https://api.github.com/repos/citra-emu/citra/comments{/number}","issue_comment_url":"https://api.github.com/repos/citra-emu/citra/issues/comments{/number}","contents_url":"https://api.github.com/repos/citra-emu/citra/contents/{+path}","compare_url":"https://api.github.com/repos/citra-emu/citra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citra-emu/citra/merges","archive_url":"https://api.github.com/repos/citra-emu/citra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citra-emu/citra/downloads","issues_url":"https://api.github.com/repos/citra-emu/citra/issues{/number}","pulls_url":"https://api.github.com/repos/citra-emu/citra/pulls{/number}","milestones_url":"https://api.github.com/repos/citra-emu/citra/milestones{/number}","notifications_url":"https://api.github.com/repos/citra-emu/citra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citra-emu/citra/labels{/name}","releases_url":"https://api.github.com/repos/citra-emu/citra/releases{/id}","deployments_url":"https://api.github.com/repos/citra-emu/citra/deployments","created_at":"2014-05-16T18:33:15Z","updated_at":"2016-07-29T23:30:28Z","pushed_at":"2016-07-30T12:13:06Z","git_url":"git://github.com/citra-emu/citra.git","ssh_url":"git@github.com:citra-emu/citra.git","clone_url":"https://github.com/citra-emu/citra.git","svn_url":"https://github.com/citra-emu/citra","homepage":"https://citra-emu.org","size":21005,"stargazers_count":2133,"watchers_count":2133,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":522,"mirror_url":null,"open_issues_count":197,"forks":522,"open_issues":197,"watchers":2133,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/1748"},"html":{"href":"https://github.com/citra-emu/citra/pull/1748"},"issue":{"href":"https://api.github.com/repos/citra-emu/citra/issues/1748"},"comments":{"href":"https://api.github.com/repos/citra-emu/citra/issues/1748/comments"},"review_comments":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/1748/comments"},"review_comment":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/1748/commits"},"statuses":{"href":"https://api.github.com/repos/citra-emu/citra/statuses/d1a02003e58be9b15b2252869187d7f2e0cb0b31"}}}}
{"actor":{"display_login":"wwylele"}}