summaryrefslogtreecommitdiffhomepage
path: root/src/output
diff options
context:
space:
mode:
Diffstat (limited to 'src/output')
-rw-r--r--src/output/ntux_output_error.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/output/ntux_output_error.c b/src/output/ntux_output_error.c
index b1a3a96..3324a71 100644
--- a/src/output/ntux_output_error.c
+++ b/src/output/ntux_output_error.c
@@ -46,6 +46,22 @@ static const char * ntux_output_unit_header(const struct ntux_error_info * erri)
return "while querying";
}
+static const char * ntux_output_chmod_strerror(
+ const struct ntux_driver_ctx * dctx,
+ const struct ntux_error_info * erri)
+{
+ (void)dctx;
+
+ if (erri->elibcode == NTUX_ERR_CONFLICTING_ARGUMENTS)
+ return "chmod conflicting arguments: +P cannot be used together with --refobj";
+
+ else if (erri->elibcode == NTUX_ERR_NON_POSIX_DESCRIPTOR)
+ return "chmod: cannot amend a referenced non-posix security descriptor";
+
+ else
+ return "ntux_output_chmod_strerror(): unhandled custom error";
+}
+
static const char * ntux_output_strerror(
const struct ntux_driver_ctx * dctx,
const struct ntux_error_info * erri)
@@ -61,6 +77,12 @@ static const char * ntux_output_strerror(
if ((erri->eflags & NTUX_ERROR_CUSTOM) && (erri->elibcode == NTUX_ERR_NOT_IMPLEMENTED))
return "status: support for one or more option values is not yet implemented";
+ else if ((erri->eflags & NTUX_ERROR_CUSTOM) && (erri->elibcode == NTUX_ERR_CONFLICTING_ARGUMENTS))
+ return ntux_output_chmod_strerror(dctx,erri);
+
+ else if ((erri->eflags & NTUX_ERROR_CUSTOM) && (erri->elibcode == NTUX_ERR_NON_POSIX_DESCRIPTOR))
+ return ntux_output_chmod_strerror(dctx,erri);
+
else if (erri->eflags & NTUX_ERROR_CUSTOM)
return "flow error: unexpected condition or other";