1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <sal/config.h>
25 #include "file_error_transl.hxx"
27 oslFileError
oslTranslateFileError(int Errno
)
32 return osl_File_E_PERM
;
35 return osl_File_E_NOENT
;
38 return osl_File_E_SRCH
;
41 return osl_File_E_INTR
;
50 return osl_File_E_2BIG
;
53 return osl_File_E_NOEXEC
;
56 return osl_File_E_BADF
;
59 return osl_File_E_CHILD
;
62 return osl_File_E_AGAIN
;
65 return osl_File_E_NOMEM
;
68 return osl_File_E_ACCES
;
71 return osl_File_E_FAULT
;
74 return osl_File_E_BUSY
;
77 return osl_File_E_EXIST
;
80 return osl_File_E_XDEV
;
83 return osl_File_E_NODEV
;
86 return osl_File_E_NOTDIR
;
89 return osl_File_E_ISDIR
;
92 return osl_File_E_INVAL
;
95 return osl_File_E_NFILE
;
98 return osl_File_E_MFILE
;
101 return osl_File_E_NOTTY
;
104 return osl_File_E_FBIG
;
107 return osl_File_E_NOSPC
;
110 return osl_File_E_SPIPE
;
113 return osl_File_E_ROFS
;
116 return osl_File_E_MLINK
;
119 return osl_File_E_PIPE
;
122 return osl_File_E_DOM
;
125 return osl_File_E_RANGE
;
128 return osl_File_E_DEADLK
;
131 return osl_File_E_NAMETOOLONG
;
134 return osl_File_E_NOLCK
;
138 #if EOPNOTSUPP != ENOTSUP
141 return osl_File_E_NOSYS
;
144 return osl_File_E_NOTEMPTY
;
147 return osl_File_E_LOOP
;
149 #if !(defined(MACOSX) || defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD) \
150 || defined(DRAGONFLY))
152 return osl_File_E_ILSEQ
;
155 return osl_File_E_NOLINK
;
158 return osl_File_E_MULTIHOP
;
163 return osl_File_E_USERS
;
167 return osl_File_E_OVERFLOW
;
170 return osl_File_E_TIMEDOUT
;
174 /* FIXME translateFileError: is this alright? Or add a new one: osl_File_E_Unknown? */
175 return osl_File_E_invalidError
;
179 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */