<commit_before>/**
 ******************************************************************************
 * Xenia : Xbox 360 Emulator Research Project                                 *
 ******************************************************************************
 * Copyright 2013 <NAME>. All rights reserved.                             *
 * Released under the BSD license - see LICENSE in the root for more details. *
 ******************************************************************************
 */

#include <xenia/kernel/modules/xboxkrnl/xboxkrnl_file.h>

#include <xenia/kernel/shim_utils.h>
#include <xenia/kernel/modules/xboxkrnl/kernel_state.h>
#include <xenia/kernel/modules/xboxkrnl/xboxkrnl_private.h>
#include <xenia/kernel/modules/xboxkrnl/objects/xthread.h>


using namespace xe;
using namespace xe::kernel;
using namespace xe::kernel::xboxkrnl;


namespace xe {
namespace kernel {
namespace xboxkrnl {


X_STATUS xeNtCreateFile(
    uint32_t* handle_ptr, uint32_t desired_access, void* object_attributes_ptr,
    void* io_status_block_ptr, uint64_t allocation_size, uint32_t file_attributes,
    uint32_t share_access, uint32_t creation_disposition) {
  KernelState* state = shared_kernel_state_;
  XEASSERTNOTNULL(state);
  return X_STATUS_NO_SUCH_FILE;
}

SHIM_CALL NtCreateFile_shim(
    xe_ppc_state_t* ppc_state, KernelState* state) {
  uint32_t handle_ptr = SHIM_GET_ARG_32(0);
  uint32_t desired_access = SHIM_GET_ARG_32(1);
  uint32_t object_attributes_ptr = SHIM_GET_ARG_32(2);
  uint32_t io_status_block_ptr = SHIM_GET_ARG_32(3);
  uint32_t allocation_size_ptr = SHIM_GET_ARG_32(4);
  uint32_t file_attributes = SHIM_GET_ARG_32(5);
  uint32_t share_access = SHIM_GET_ARG_32(6);
  uint32_t creation_disposition = SHIM_GET_ARG_32(7);

  XELOGD(
      "NtCreateFile(%.8X, %d, %.8X, %.8X, %.8X, %.8X, %.8X, %.8X)",
      handle_ptr,
      desired_access,
      object_attributes_ptr,
      io_status_block_ptr,
      allocation_size_ptr,<commit_msg>Fixed debug output format for NtCreateFile.<commit_after>/**
 ******************************************************************************
 * Xenia : Xbox 360 Emulator Research Project                                 *
 ******************************************************************************
 * Copyright 2013 <NAME>. All rights reserved.                             *
 * Released under the BSD license - see LICENSE in the root for more details. *
 ******************************************************************************
 */

#include <xenia/kernel/modules/xboxkrnl/xboxkrnl_file.h>

#include <xenia/kernel/shim_utils.h>
#include <xenia/kernel/modules/xboxkrnl/kernel_state.h>
#include <xenia/kernel/modules/xboxkrnl/xboxkrnl_private.h>
#include <xenia/kernel/modules/xboxkrnl/objects/xthread.h>


using namespace xe;
using namespace xe::kernel;
using namespace xe::kernel::xboxkrnl;


namespace xe {
namespace kernel {
namespace xboxkrnl {


X_STATUS xeNtCreateFile(
    uint32_t* handle_ptr, uint32_t desired_access, void* object_attributes_ptr,
    void* io_status_block_ptr, uint64_t allocation_size, uint32_t file_attributes,
    uint32_t share_access, uint32_t creation_disposition) {
  KernelState* state = shared_kernel_state_;
  XEASSERTNOTNULL(state);
  return X_STATUS_NO_SUCH_FILE;
}

SHIM_CALL NtCreateFile_shim(
    xe_ppc_state_t* ppc_state, KernelState* state) {
  uint32_t handle_ptr = SHIM_GET_ARG_32(0);
  uint32_t desired_access = SHIM_GET_ARG_32(1);
  uint32_t object_attributes_ptr = SHIM_GET_ARG_32(2);
  uint32_t io_status_block_ptr = SHIM_GET_ARG_32(3);
  uint32_t allocation_size_ptr = SHIM_GET_ARG_32(4);
  uint32_t file_attributes = SHIM_GET_ARG_32(5);
  uint32_t share_access = SHIM_GET_ARG_32(6);
  uint32_t creation_disposition = SHIM_GET_ARG_32(7);

  XELOGD(
      "NtCreateFile(%.8X, %.8X, %.8X, %.8X, %.8X, %.8X, %d, %d)",
      handle_ptr,
      desired_access,
      object_attributes_ptr,
      io_status_block_ptr,
      allocation_size_ptr,
{'fraction_non_alphanumeric': 0.20070600100857286, 'fraction_numerical': 0.033030761472516386, 'mean_word_length': 4.868343195266272, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2007404', 'n_tokens_mistral': 1412, 'n_tokens_neox': 1305, 'n_words': 242}