summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmds/ntux_cmd_fspath.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cmds/ntux_cmd_fspath.c b/src/cmds/ntux_cmd_fspath.c
index 60d4192..12d575c 100644
--- a/src/cmds/ntux_cmd_fspath.c
+++ b/src/cmds/ntux_cmd_fspath.c
@@ -65,6 +65,7 @@ int ntux_cmd_fspath(const struct ntux_driver_ctx * dctx, const char * dunit)
buf,
NTUX_SYSTEM_ERROR(dctx));
+ /* posix absolute notation? */
} else if (dctx->cctx->drvflags & NTUX_DRIVER_APATH) {
if ((ret = __sys_fs_apath(
fdcwd,
@@ -75,6 +76,7 @@ int ntux_cmd_fspath(const struct ntux_driver_ctx * dctx, const char * dunit)
buf,
NTUX_SYSTEM_ERROR(dctx));
+ /* native tool notation? */
} else if (dctx->cctx->drvflags & NTUX_DRIVER_NPATH) {
if ((ret = __sys_fs_npath(
fdcwd,
@@ -85,6 +87,7 @@ int ntux_cmd_fspath(const struct ntux_driver_ctx * dctx, const char * dunit)
buf,
NTUX_SYSTEM_ERROR(dctx));
+ /* native driver notation? */
} else if (dctx->cctx->drvflags & NTUX_DRIVER_DPATH) {
if ((ret = __sys_fs_dpath(
fdcwd,
@@ -94,6 +97,17 @@ int ntux_cmd_fspath(const struct ntux_driver_ctx * dctx, const char * dunit)
return ntux_cmd_fspath_ret(
buf,
NTUX_SYSTEM_ERROR(dctx));
+
+ /* [default] posix absolute notation */
+ } else {
+ if ((ret = __sys_fs_apath(
+ fdcwd,
+ (const char *)unit,
+ 0,buf,bufsize)) < 0)
+ if (ntux_errno_set(dctx,ret))
+ return ntux_cmd_fspath_ret(
+ buf,
+ NTUX_SYSTEM_ERROR(dctx));
}
/* outupt */