1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2011 New Dream Network
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
15 #include "include/types.h"
18 // converts from linux errno values to host values
19 __s32 ceph_to_hostos_errno(__s32 r)
78 // return -EPERM; //TODO ENONET
80 // return -EPERM; //TODO ENOPKG
86 // return -EPERM; //TODO EADV
88 // return -EPERM; //TODO ESRMNT
90 // return -EPERM; //TODO ECOMM
96 return -EPERM; //TODO EDOTDOT
128 return -EDESTADDRREQ;
136 return -EPROTONOSUPPORT;
138 return -ESOCKTNOSUPPORT;
142 return -EPFNOSUPPORT;
144 return -EAFNOSUPPORT;
148 return -EADDRNOTAVAIL;
156 return -ECONNABORTED;
168 return -ETOOMANYREFS;
172 return -ECONNREFUSED;
176 return -EHOSTUNREACH;
184 return -EPERM; //TODO EUCLEAN
186 return -EPERM; //TODO ENOTNAM
188 return -EPERM; //TODO ENAVAIL
190 return -EPERM; //TODO EISNAM
192 return -EPERM; //TODO EREMOTEIO
196 return -EPERM; //TODO ENOMEDIUM
198 return -EPERM; //TODO EMEDIUMTYPE - not used
202 return -EPERM; //TODO ENOKEY
204 return -EPERM; //TODO EKEYEXPIRED
206 return -EPERM; //TODO EKEYREVOKED
208 return -EPERM; //TODO EKEYREJECTED
212 return -ENOTRECOVERABLE;
214 return -EPERM; //TODO ERFKILL
216 return -EPERM; //TODO EHWPOISON
223 return r; // otherwise return original value
226 // converts Host OS errno values to linux/Ceph values
227 // XXX Currently not worked out
228 __s32 hostos_to_ceph_errno(__s32 r)