summaryrefslogtreecommitdiffhomepage
path: root/src/cmds
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-05-26 21:47:57 +0000
committermidipix <writeonce@midipix.org>2019-05-27 00:03:29 +0000
commit471bb043390d0995c847d01f1af89763bbee668f (patch)
treebb068f17349ba5bd987e8d91e2ebe38a827963b8 /src/cmds
parent32e604c63f1f7e211c63cc900e77f5ef637c9eef (diff)
downloadntux-471bb043390d0995c847d01f1af89763bbee668f.tar.bz2
ntux-471bb043390d0995c847d01f1af89763bbee668f.tar.xz
framework: code against the newly added __xfi_xxx interfaces.
Diffstat (limited to 'src/cmds')
-rw-r--r--src/cmds/ntux_cmd_chmod.c16
-rw-r--r--src/cmds/ntux_cmd_spawn.c1
-rw-r--r--src/cmds/ntux_cmd_stat.c4
-rw-r--r--src/cmds/ntux_cmd_strace.c1
4 files changed, 12 insertions, 10 deletions
diff --git a/src/cmds/ntux_cmd_chmod.c b/src/cmds/ntux_cmd_chmod.c
index 03ab8f5..55b517d 100644
--- a/src/cmds/ntux_cmd_chmod.c
+++ b/src/cmds/ntux_cmd_chmod.c
@@ -4,15 +4,19 @@
/* Released under GPLv2 and GPLv3; see COPYING.NTUX. */
/***********************************************************/
-#include <ntapi/ntapi.h>
#include <psxabi/sys_sysapi.h>
#include <psxabi/sys_stat.h>
#include <psxabi/sys_errno.h>
+#include <psxxfi/xfi_base.h>
+#include <psxxfi/xfi_acl.h>
#include <psxxfi/xfi_fs.h>
#include <psxxfi/xfi_ofd.h>
#include <psxxfi/xfi_unicode.h>
+#include <ntapi/nt_acl.h>
+#include <ntapi/nt_file.h>
+
#include <ntux/ntux.h>
#include "ntux_driver_impl.h"
#include "ntux_nolibc_impl.h"
@@ -21,7 +25,7 @@
static int ntux_cmd_chmod_ret(int fd, struct __ofd * ofd, void * hasync, int ret)
{
if (hasync)
- ntapi->zw_close(hasync);
+ __xfi_close_handle(hasync);
if (ofd)
__xfi_ofd_ref_dec(ofd);
@@ -103,7 +107,7 @@ int ntux_cmd_chmod(const struct ntux_driver_ctx * dctx, const char * dunit)
/* srcsd */
srcsd = (nt_sd *)buf;
- if ((status = ntapi->zw_query_security_object(
+ if ((status = __xfi_query_security_object(
hasync,
NT_OWNER_SECURITY_INFORMATION
| NT_GROUP_SECURITY_INFORMATION
@@ -113,7 +117,7 @@ int ntux_cmd_chmod(const struct ntux_driver_ctx * dctx, const char * dunit)
fd,ofd,hasync,
NTUX_SYSTEM_ERROR(dctx));
- if ((status = ntapi->acl_init_common_descriptor_meta(
+ if ((status = __xfi_acl_init_common_descriptor_meta(
&meta,srcsd,
NT_ACL_INIT_COMMON_DESCRIPTION_META_STRICT_MODE)))
return ntux_cmd_chmod_ret(
@@ -129,13 +133,13 @@ int ntux_cmd_chmod(const struct ntux_driver_ctx * dctx, const char * dunit)
access_admin = access_owner | NT_SEC_WRITE_DAC;
/* updated dacl */
- ntapi->acl_init_common_descriptor(
+ __xfi_acl_init_common_descriptor(
&dstsd,
meta.owner,meta.group,0,0,
access_owner,access_group,access_other,
access_admin,meta.system_acc);
- if ((status = ntapi->zw_set_security_object(
+ if ((status = __xfi_set_security_object(
hasync,
NT_DACL_SECURITY_INFORMATION,
&dstsd.sd)))
diff --git a/src/cmds/ntux_cmd_spawn.c b/src/cmds/ntux_cmd_spawn.c
index cb88696..f488e3e 100644
--- a/src/cmds/ntux_cmd_spawn.c
+++ b/src/cmds/ntux_cmd_spawn.c
@@ -4,7 +4,6 @@
/* Released under GPLv2 and GPLv3; see COPYING.NTUX. */
/***********************************************************/
-#include <ntapi/ntapi.h>
#include <psxabi/sys_sysapi.h>
#include <psxabi/sys_errno.h>
diff --git a/src/cmds/ntux_cmd_stat.c b/src/cmds/ntux_cmd_stat.c
index 8634c4a..f043ddb 100644
--- a/src/cmds/ntux_cmd_stat.c
+++ b/src/cmds/ntux_cmd_stat.c
@@ -4,12 +4,12 @@
/* Released under GPLv2 and GPLv3; see COPYING.NTUX. */
/***********************************************************/
-#include <ntapi/ntapi.h>
#include <psxabi/sys_sysapi.h>
#include <psxabi/sys_stat.h>
#include <psxabi/sys_errno.h>
#include <psxxfi/xfi_ofd.h>
+#include <psxxfi/xfi_stat.h>
#include <psxxfi/xfi_unicode.h>
#include <ntux/ntux.h>
@@ -100,7 +100,7 @@ int ntux_cmd_stat(const struct ntux_driver_ctx * dctx, const char * dunit)
nstat = (nt_stat *)sbuf;
/* stat */
- if ((status = ntapi->tt_stat(
+ if ((status = __xfi_stat(
ofd->info.hfile,
nstat,bufsize,
buf,bufsize,
diff --git a/src/cmds/ntux_cmd_strace.c b/src/cmds/ntux_cmd_strace.c
index 4f23e39..bdc1308 100644
--- a/src/cmds/ntux_cmd_strace.c
+++ b/src/cmds/ntux_cmd_strace.c
@@ -4,7 +4,6 @@
/* Released under GPLv2 and GPLv3; see COPYING.NTUX. */
/***********************************************************/
-#include <ntapi/ntapi.h>
#include <ntapi/nt_termios.h>
#include <psxabi/sys_sysapi.h>