From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- src/include/win32/win32_errno.h | 146 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 src/include/win32/win32_errno.h (limited to 'src/include/win32/win32_errno.h') diff --git a/src/include/win32/win32_errno.h b/src/include/win32/win32_errno.h new file mode 100644 index 000000000..dd8ff8474 --- /dev/null +++ b/src/include/win32/win32_errno.h @@ -0,0 +1,146 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +/* + * Ceph - scalable distributed file system + * + * Copyright (C) 2020 SUSE LINUX GmbH + * + * This is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software + * Foundation. See file COPYING. + * + */ + +// We're going to preserve the error numbers defined by the Windows SDK but not +// by Mingw headers. For others, we're going to use numbers greater than 256 to +// avoid unintended overlaps. + +#ifndef WIN32_ERRNO_H +#define WIN32_ERRNO_H 1 + +#include + +#include "include/int_types.h" + +#ifndef EBADMSG +#define EBADMSG 104 +#endif + +#ifndef ENODATA +#define ENODATA 120 +#endif + +#ifndef ENOLINK +#define ENOLINK 121 +#endif + +#ifndef ENOMSG +#define ENOMSG 122 +#endif + +#ifndef ENOTRECOVERABLE +#define ENOTRECOVERABLE 127 +#endif + +#ifndef ETIME +#define ETIME 137 +#endif + +#ifndef ETXTBSY +#define ETXTBSY 139 +#endif + +#ifndef ENODATA +#define ENODATA 120 +#endif + +#define ESTALE 256 +#define EREMOTEIO 257 + +#ifndef EBADE +#define EBADE 258 +#endif + +#define EUCLEAN 259 +#define EREMCHG 260 +#define EKEYREJECTED 261 +#define EREMOTE 262 + +// Not used at moment. Full coverage ensures that remote errors will be +// converted and handled properly. +#define EADV 263 +#define EBADFD 264 +#define EBADR 265 +#define EBADRQC 266 +#define EBADSLT 267 +#define EBFONT 268 +#define ECHRNG 269 +#define ECOMM 270 +#define EDOTDOT 271 +#define EHOSTDOWN 272 +#define EHWPOISON 273 +// Defined by Boost. +#ifndef EIDRM +#define EIDRM 274 +#endif +#define EISNAM 275 +#define EKEYEXPIRED 276 +#define EKEYREVOKED 277 +#define EL2HLT 278 +#define EL2NSYNC 279 +#define EL3HLT 280 +#define EL3RST 281 +#define ELIBACC 282 +#define ELIBBAD 283 +#define ELIBEXEC 284 +#define ELIBMAX 285 +#define ELIBSCN 286 +#define ELNRNG 287 +#define EMEDIUMTYPE 288 +#define EMULTIHOP 289 +#define ENAVAIL 290 +#define ENOANO 291 +#define ENOCSI 292 +#define ENOKEY 293 +#define ENOMEDIUM 294 +#define ENONET 295 +#define ENOPKG 296 +#ifndef ENOSR +#define ENOSR 297 +#endif +#ifndef ENOSTR +#define ENOSTR 298 +#endif +#define ENOTNAM 299 +#define ENOTUNIQ 300 +#define EPFNOSUPPORT 301 +#define ERFKILL 302 +#define ESOCKTNOSUPPORT 303 +#define ESRMNT 304 +#define ESTRPIPE 305 +#define ETOOMANYREFS 306 +#define EUNATCH 307 +#define EUSERS 308 +#define EXFULL 309 +#define ENOTBLK 310 + +#ifndef EDQUOT +#define EDQUOT 311 +#endif + +#define ESHUTDOWN 312 + +#ifdef __cplusplus +extern "C" { +#endif + +__s32 wsae_to_errno(__s32 r); +__u32 errno_to_ntstatus(__s32 r); +__u32 cephfs_errno_to_ntstatus_map(int cephfs_errno); + +#ifdef __cplusplus +} +#endif + +#endif // WIN32_ERRNO_H -- cgit v1.2.3