Add NT_STATUS_IO_REPARSE_DATA_INVALID
[metze/samba/wip.git] / libcli / util / ntstatus.h
index d53f4bbc52f627186a930116b7c3666274ead3b4..b1286a292e5e986d991e32cd0dd75cb23a0a353e 100644 (file)
@@ -597,6 +597,7 @@ typedef uint32_t NTSTATUS;
 #define NT_STATUS_FILE_IS_OFFLINE NT_STATUS(0xC0000000 | 0x0267)
 #define NT_STATUS_DS_NO_MORE_RIDS NT_STATUS(0xC0000000 | 0x02A8)
 #define NT_STATUS_NOT_A_REPARSE_POINT NT_STATUS(0xC0000000 | 0x0275)
+#define NT_STATUS_IO_REPARSE_DATA_INVALID NT_STATUS(0xC0000000 | 0x0278)
 #define NT_STATUS_CURRENT_DOMAIN_NOT_ALLOWED NT_STATUS(0xC0000000 | 0x02E9)
 #define NT_STATUS_OBJECTID_NOT_FOUND NT_STATUS(0xC0000000 | 0x02F0)
 #define NT_STATUS_NO_SUCH_JOB NT_STATUS(0xC0000000 | 0xEDE) /* scheduler */
@@ -628,6 +629,15 @@ typedef uint32_t NTSTATUS;
  * this means we need a torture test */
 #define NT_STATUS_FOOBAR NT_STATUS_UNSUCCESSFUL
 
+/*****************************************************************************
+ Returns an NT error message.  not amazingly helpful, but better than a number.
+
+ This version is const, and so neither allocates memory nor uses a
+ static variable for unknown errors.
+ *****************************************************************************/
+
+const char *nt_errstr_const(NTSTATUS nt_code);
+
 /*****************************************************************************
  returns an NT error message.  not amazingly helpful, but better than a number.
  *****************************************************************************/
@@ -648,9 +658,6 @@ const char *get_nt_error_c_code(void *mem_ctx, NTSTATUS nt_code);
  *****************************************************************************/
 NTSTATUS nt_status_string_to_code(const char *nt_status_str);
 
-/** Used by ntstatus_dos_equal: */
-extern bool ntstatus_check_dos_mapping;
-
 /* we need these here for openchange */
 #ifndef likely
 #define likely(x) (x)
@@ -661,13 +668,7 @@ extern bool ntstatus_check_dos_mapping;
 
 #define NT_STATUS_IS_OK(x) (likely(NT_STATUS_V(x) == 0))
 #define NT_STATUS_IS_ERR(x) (unlikely((NT_STATUS_V(x) & 0xc0000000) == 0xc0000000))
-/* checking for DOS error mapping here is ugly, but unfortunately the
-   alternative is a very intrusive rewrite of the torture code */
-#if _SAMBA_BUILD_ == 4
-#define NT_STATUS_EQUAL(x,y) (NT_STATUS_IS_DOS(x)||NT_STATUS_IS_DOS(y)?ntstatus_dos_equal(x,y):NT_STATUS_V(x) == NT_STATUS_V(y))
-#else
 #define NT_STATUS_EQUAL(x,y) (NT_STATUS_V(x) == NT_STATUS_V(y))
-#endif
 
 #define NT_STATUS_HAVE_NO_MEMORY(x) do { \
        if (unlikely(!(x))) {           \
@@ -732,4 +733,10 @@ extern bool ntstatus_check_dos_mapping;
        (((NT_STATUS_V(status) & 0xFFFF) == 0xC0020000) || \
         ((NT_STATUS_V(status) & 0xFFFF) == 0xC0030000))
 
+typedef struct
+{
+       const char *nt_errstr;
+       NTSTATUS nt_errcode;
+} nt_err_code_struct;
+
 #endif /* _NTSTATUS_H */