mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 21:47:45 +00:00
STABLE14-windows-universal-error-handling-20051015
properly interpret the universal error codes (cherry picked from commit 51fa307a0011d3ca27e6199631e1b2bdc75a9f50)
This commit is contained in:
parent
77fc484e85
commit
62213fcf80
@ -567,6 +567,7 @@ int afsd_InitCM(char **reasonP)
|
||||
WSAStartup(0x0101, &WSAjunk);
|
||||
|
||||
afsd_initUpperCaseTable();
|
||||
init_et_to_sys_error();
|
||||
|
||||
/* setup osidebug server at RPC slot 1000 */
|
||||
osi_LongToUID(1000, &debugID);
|
||||
|
@ -254,4 +254,6 @@ int RXAFS_Lookup (struct rx_connection *,
|
||||
#define CM_ERROR_LOCK_CONFLICT (CM_ERROR_BASE+47)
|
||||
#define CM_ERROR_SHARING_VIOLATION (CM_ERROR_BASE+48)
|
||||
#define CM_ERROR_ALLDOWN (CM_ERROR_BASE+49)
|
||||
#define CM_ERROR_TOOFEWBUFS (CM_ERROR_BASE+50)
|
||||
#define CM_ERROR_TOOMANYBUFS (CM_ERROR_BASE+51)
|
||||
#endif /* __CM_H_ENV__ */
|
||||
|
@ -201,7 +201,4 @@ extern void buf_ForceTrace(BOOL flush);
|
||||
|
||||
/* error codes */
|
||||
#define CM_BUF_EXISTS 1 /* buffer exists, and shouldn't */
|
||||
#define CM_ERROR_BASEBUF 0x33333333
|
||||
#define CM_ERROR_TOOFEWBUFS (CM_ERROR_BASEBUF+0)
|
||||
#define CM_ERROR_TOOMANYBUFS (CM_ERROR_BASEBUF+1)
|
||||
#endif /* _BUF_H__ENV_ */
|
||||
|
@ -13,6 +13,45 @@
|
||||
#ifndef DJGPP
|
||||
#include <windows.h>
|
||||
#include <winsock2.h>
|
||||
#ifndef EWOULDBLOCK
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#define EALREADY WSAEALREADY
|
||||
#define ENOTSOCK WSAENOTSOCK
|
||||
#define EDESTADDRREQ WSAEDESTADDRREQ
|
||||
#define EMSGSIZE WSAEMSGSIZE
|
||||
#define EPROTOTYPE WSAEPROTOTYPE
|
||||
#define ENOPROTOOPT WSAENOPROTOOPT
|
||||
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
||||
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
|
||||
#define EOPNOTSUPP WSAEOPNOTSUPP
|
||||
#define EPFNOSUPPORT WSAEPFNOSUPPORT
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#define EADDRINUSE WSAEADDRINUSE
|
||||
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
||||
#define ENETDOWN WSAENETDOWN
|
||||
#define ENETUNREACH WSAENETUNREACH
|
||||
#define ENETRESET WSAENETRESET
|
||||
#define ECONNABORTED WSAECONNABORTED
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#define ENOBUFS WSAENOBUFS
|
||||
#define EISCONN WSAEISCONN
|
||||
#define ENOTCONN WSAENOTCONN
|
||||
#define ESHUTDOWN WSAESHUTDOWN
|
||||
#define ETOOMANYREFS WSAETOOMANYREFS
|
||||
#define ETIMEDOUT WSAETIMEDOUT
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#define ELOOP WSAELOOP
|
||||
#define ENAMETOOLONG WSAENAMETOOLONG
|
||||
#define EHOSTDOWN WSAEHOSTDOWN
|
||||
#define EHOSTUNREACH WSAEHOSTUNREACH
|
||||
#define ENOTEMPTY WSAENOTEMPTY
|
||||
#define EPROCLIM WSAEPROCLIM
|
||||
#define EUSERS WSAEUSERS
|
||||
#define EDQUOT WSAEDQUOT
|
||||
#define ESTALE WSAESTALE
|
||||
#define EREMOTE WSAEREMOTE
|
||||
#endif /* EWOULDBLOCK */
|
||||
#endif /* !DJGPP */
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
@ -20,6 +59,9 @@
|
||||
#include <osi.h>
|
||||
#include <rx/rx.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <afs/unified_afs.h>
|
||||
|
||||
#include "afsd.h"
|
||||
|
||||
static osi_once_t cm_utilsOnce;
|
||||
@ -28,6 +70,147 @@ osi_rwlock_t cm_utilsLock;
|
||||
|
||||
cm_space_t *cm_spaceListp;
|
||||
|
||||
static int et2sys[512];
|
||||
|
||||
void
|
||||
init_et_to_sys_error(void)
|
||||
{
|
||||
memset(&et2sys, 0, sizeof(et2sys));
|
||||
et2sys[(UAEPERM - ERROR_TABLE_BASE_uae)] = EPERM;
|
||||
et2sys[(UAENOENT - ERROR_TABLE_BASE_uae)] = ENOENT;
|
||||
et2sys[(UAESRCH - ERROR_TABLE_BASE_uae)] = ESRCH;
|
||||
et2sys[(UAEINTR - ERROR_TABLE_BASE_uae)] = EINTR;
|
||||
et2sys[(UAEIO - ERROR_TABLE_BASE_uae)] = EIO;
|
||||
et2sys[(UAENXIO - ERROR_TABLE_BASE_uae)] = ENXIO;
|
||||
et2sys[(UAE2BIG - ERROR_TABLE_BASE_uae)] = E2BIG;
|
||||
et2sys[(UAENOEXEC - ERROR_TABLE_BASE_uae)] = ENOEXEC;
|
||||
et2sys[(UAEBADF - ERROR_TABLE_BASE_uae)] = EBADF;
|
||||
et2sys[(UAECHILD - ERROR_TABLE_BASE_uae)] = ECHILD;
|
||||
et2sys[(UAEAGAIN - ERROR_TABLE_BASE_uae)] = EAGAIN;
|
||||
et2sys[(UAENOMEM - ERROR_TABLE_BASE_uae)] = ENOMEM;
|
||||
et2sys[(UAEACCES - ERROR_TABLE_BASE_uae)] = EACCES;
|
||||
et2sys[(UAEFAULT - ERROR_TABLE_BASE_uae)] = EFAULT;
|
||||
et2sys[(UAENOTBLK - ERROR_TABLE_BASE_uae)] = ENOTBLK;
|
||||
et2sys[(UAEBUSY - ERROR_TABLE_BASE_uae)] = EBUSY;
|
||||
et2sys[(UAEEXIST - ERROR_TABLE_BASE_uae)] = EEXIST;
|
||||
et2sys[(UAEXDEV - ERROR_TABLE_BASE_uae)] = EXDEV;
|
||||
et2sys[(UAENODEV - ERROR_TABLE_BASE_uae)] = ENODEV;
|
||||
et2sys[(UAENOTDIR - ERROR_TABLE_BASE_uae)] = ENOTDIR;
|
||||
et2sys[(UAEISDIR - ERROR_TABLE_BASE_uae)] = EISDIR;
|
||||
et2sys[(UAEINVAL - ERROR_TABLE_BASE_uae)] = EINVAL;
|
||||
et2sys[(UAENFILE - ERROR_TABLE_BASE_uae)] = ENFILE;
|
||||
et2sys[(UAEMFILE - ERROR_TABLE_BASE_uae)] = EMFILE;
|
||||
et2sys[(UAENOTTY - ERROR_TABLE_BASE_uae)] = ENOTTY;
|
||||
et2sys[(UAETXTBSY - ERROR_TABLE_BASE_uae)] = ETXTBSY;
|
||||
et2sys[(UAEFBIG - ERROR_TABLE_BASE_uae)] = EFBIG;
|
||||
et2sys[(UAENOSPC - ERROR_TABLE_BASE_uae)] = ENOSPC;
|
||||
et2sys[(UAESPIPE - ERROR_TABLE_BASE_uae)] = ESPIPE;
|
||||
et2sys[(UAEROFS - ERROR_TABLE_BASE_uae)] = EROFS;
|
||||
et2sys[(UAEMLINK - ERROR_TABLE_BASE_uae)] = EMLINK;
|
||||
et2sys[(UAEPIPE - ERROR_TABLE_BASE_uae)] = EPIPE;
|
||||
et2sys[(UAEDOM - ERROR_TABLE_BASE_uae)] = EDOM;
|
||||
et2sys[(UAERANGE - ERROR_TABLE_BASE_uae)] = ERANGE;
|
||||
et2sys[(UAEDEADLK - ERROR_TABLE_BASE_uae)] = EDEADLK;
|
||||
et2sys[(UAENAMETOOLONG - ERROR_TABLE_BASE_uae)] = ENAMETOOLONG;
|
||||
et2sys[(UAENOLCK - ERROR_TABLE_BASE_uae)] = ENOLCK;
|
||||
et2sys[(UAENOSYS - ERROR_TABLE_BASE_uae)] = ENOSYS;
|
||||
et2sys[(UAENOTEMPTY - ERROR_TABLE_BASE_uae)] = ENOTEMPTY;
|
||||
et2sys[(UAELOOP - ERROR_TABLE_BASE_uae)] = ELOOP;
|
||||
et2sys[(UAEWOULDBLOCK - ERROR_TABLE_BASE_uae)] = EWOULDBLOCK;
|
||||
et2sys[(UAENOMSG - ERROR_TABLE_BASE_uae)] = ENOMSG;
|
||||
et2sys[(UAEIDRM - ERROR_TABLE_BASE_uae)] = EIDRM;
|
||||
et2sys[(UAECHRNG - ERROR_TABLE_BASE_uae)] = ECHRNG;
|
||||
et2sys[(UAEL2NSYNC - ERROR_TABLE_BASE_uae)] = EL2NSYNC;
|
||||
et2sys[(UAEL3HLT - ERROR_TABLE_BASE_uae)] = EL3HLT;
|
||||
et2sys[(UAEL3RST - ERROR_TABLE_BASE_uae)] = EL3RST;
|
||||
et2sys[(UAELNRNG - ERROR_TABLE_BASE_uae)] = ELNRNG;
|
||||
et2sys[(UAEUNATCH - ERROR_TABLE_BASE_uae)] = EUNATCH;
|
||||
et2sys[(UAENOCSI - ERROR_TABLE_BASE_uae)] = ENOCSI;
|
||||
et2sys[(UAEL2HLT - ERROR_TABLE_BASE_uae)] = EL2HLT;
|
||||
et2sys[(UAEBADE - ERROR_TABLE_BASE_uae)] = EBADE;
|
||||
et2sys[(UAEBADR - ERROR_TABLE_BASE_uae)] = EBADR;
|
||||
et2sys[(UAEXFULL - ERROR_TABLE_BASE_uae)] = EXFULL;
|
||||
et2sys[(UAENOANO - ERROR_TABLE_BASE_uae)] = ENOANO;
|
||||
et2sys[(UAEBADRQC - ERROR_TABLE_BASE_uae)] = EBADRQC;
|
||||
et2sys[(UAEBADSLT - ERROR_TABLE_BASE_uae)] = EBADSLT;
|
||||
et2sys[(UAEBFONT - ERROR_TABLE_BASE_uae)] = EBFONT;
|
||||
et2sys[(UAENOSTR - ERROR_TABLE_BASE_uae)] = ENOSTR;
|
||||
et2sys[(UAENODATA - ERROR_TABLE_BASE_uae)] = ENODATA;
|
||||
et2sys[(UAETIME - ERROR_TABLE_BASE_uae)] = ETIME;
|
||||
et2sys[(UAENOSR - ERROR_TABLE_BASE_uae)] = ENOSR;
|
||||
et2sys[(UAENONET - ERROR_TABLE_BASE_uae)] = ENONET;
|
||||
et2sys[(UAENOPKG - ERROR_TABLE_BASE_uae)] = ENOPKG;
|
||||
et2sys[(UAEREMOTE - ERROR_TABLE_BASE_uae)] = EREMOTE;
|
||||
et2sys[(UAENOLINK - ERROR_TABLE_BASE_uae)] = ENOLINK;
|
||||
et2sys[(UAEADV - ERROR_TABLE_BASE_uae)] = EADV;
|
||||
et2sys[(UAESRMNT - ERROR_TABLE_BASE_uae)] = ESRMNT;
|
||||
et2sys[(UAECOMM - ERROR_TABLE_BASE_uae)] = ECOMM;
|
||||
et2sys[(UAEPROTO - ERROR_TABLE_BASE_uae)] = EPROTO;
|
||||
et2sys[(UAEMULTIHOP - ERROR_TABLE_BASE_uae)] = EMULTIHOP;
|
||||
et2sys[(UAEDOTDOT - ERROR_TABLE_BASE_uae)] = EDOTDOT;
|
||||
et2sys[(UAEBADMSG - ERROR_TABLE_BASE_uae)] = EBADMSG;
|
||||
et2sys[(UAEOVERFLOW - ERROR_TABLE_BASE_uae)] = EOVERFLOW;
|
||||
et2sys[(UAENOTUNIQ - ERROR_TABLE_BASE_uae)] = ENOTUNIQ;
|
||||
et2sys[(UAEBADFD - ERROR_TABLE_BASE_uae)] = EBADFD;
|
||||
et2sys[(UAEREMCHG - ERROR_TABLE_BASE_uae)] = EREMCHG;
|
||||
et2sys[(UAELIBACC - ERROR_TABLE_BASE_uae)] = ELIBACC;
|
||||
et2sys[(UAELIBBAD - ERROR_TABLE_BASE_uae)] = ELIBBAD;
|
||||
et2sys[(UAELIBSCN - ERROR_TABLE_BASE_uae)] = ELIBSCN;
|
||||
et2sys[(UAELIBMAX - ERROR_TABLE_BASE_uae)] = ELIBMAX;
|
||||
et2sys[(UAELIBEXEC - ERROR_TABLE_BASE_uae)] = ELIBEXEC;
|
||||
et2sys[(UAEILSEQ - ERROR_TABLE_BASE_uae)] = EILSEQ;
|
||||
et2sys[(UAERESTART - ERROR_TABLE_BASE_uae)] = ERESTART;
|
||||
et2sys[(UAESTRPIPE - ERROR_TABLE_BASE_uae)] = ESTRPIPE;
|
||||
et2sys[(UAEUSERS - ERROR_TABLE_BASE_uae)] = EUSERS;
|
||||
et2sys[(UAENOTSOCK - ERROR_TABLE_BASE_uae)] = ENOTSOCK;
|
||||
et2sys[(UAEDESTADDRREQ - ERROR_TABLE_BASE_uae)] = EDESTADDRREQ;
|
||||
et2sys[(UAEMSGSIZE - ERROR_TABLE_BASE_uae)] = EMSGSIZE;
|
||||
et2sys[(UAEPROTOTYPE - ERROR_TABLE_BASE_uae)] = EPROTOTYPE;
|
||||
et2sys[(UAENOPROTOOPT - ERROR_TABLE_BASE_uae)] = ENOPROTOOPT;
|
||||
et2sys[(UAEPROTONOSUPPORT - ERROR_TABLE_BASE_uae)] = EPROTONOSUPPORT;
|
||||
et2sys[(UAESOCKTNOSUPPORT - ERROR_TABLE_BASE_uae)] = ESOCKTNOSUPPORT;
|
||||
et2sys[(UAEOPNOTSUPP - ERROR_TABLE_BASE_uae)] = EOPNOTSUPP;
|
||||
et2sys[(UAEPFNOSUPPORT - ERROR_TABLE_BASE_uae)] = EPFNOSUPPORT;
|
||||
et2sys[(UAEAFNOSUPPORT - ERROR_TABLE_BASE_uae)] = EAFNOSUPPORT;
|
||||
et2sys[(UAEADDRINUSE - ERROR_TABLE_BASE_uae)] = EADDRINUSE;
|
||||
et2sys[(UAEADDRNOTAVAIL - ERROR_TABLE_BASE_uae)] = EADDRNOTAVAIL;
|
||||
et2sys[(UAENETDOWN - ERROR_TABLE_BASE_uae)] = ENETDOWN;
|
||||
et2sys[(UAENETUNREACH - ERROR_TABLE_BASE_uae)] = ENETUNREACH;
|
||||
et2sys[(UAENETRESET - ERROR_TABLE_BASE_uae)] = ENETRESET;
|
||||
et2sys[(UAECONNABORTED - ERROR_TABLE_BASE_uae)] = ECONNABORTED;
|
||||
et2sys[(UAECONNRESET - ERROR_TABLE_BASE_uae)] = ECONNRESET;
|
||||
et2sys[(UAENOBUFS - ERROR_TABLE_BASE_uae)] = ENOBUFS;
|
||||
et2sys[(UAEISCONN - ERROR_TABLE_BASE_uae)] = EISCONN;
|
||||
et2sys[(UAENOTCONN - ERROR_TABLE_BASE_uae)] = ENOTCONN;
|
||||
et2sys[(UAESHUTDOWN - ERROR_TABLE_BASE_uae)] = ESHUTDOWN;
|
||||
et2sys[(UAETOOMANYREFS - ERROR_TABLE_BASE_uae)] = ETOOMANYREFS;
|
||||
et2sys[(UAETIMEDOUT - ERROR_TABLE_BASE_uae)] = ETIMEDOUT;
|
||||
et2sys[(UAECONNREFUSED - ERROR_TABLE_BASE_uae)] = ECONNREFUSED;
|
||||
et2sys[(UAEHOSTDOWN - ERROR_TABLE_BASE_uae)] = EHOSTDOWN;
|
||||
et2sys[(UAEHOSTUNREACH - ERROR_TABLE_BASE_uae)] = EHOSTUNREACH;
|
||||
et2sys[(UAEALREADY - ERROR_TABLE_BASE_uae)] = EALREADY;
|
||||
et2sys[(UAEINPROGRESS - ERROR_TABLE_BASE_uae)] = EINPROGRESS;
|
||||
et2sys[(UAESTALE - ERROR_TABLE_BASE_uae)] = ESTALE;
|
||||
et2sys[(UAEUCLEAN - ERROR_TABLE_BASE_uae)] = EUCLEAN;
|
||||
et2sys[(UAENOTNAM - ERROR_TABLE_BASE_uae)] = ENOTNAM;
|
||||
et2sys[(UAENAVAIL - ERROR_TABLE_BASE_uae)] = ENAVAIL;
|
||||
et2sys[(UAEISNAM - ERROR_TABLE_BASE_uae)] = EISNAM;
|
||||
et2sys[(UAEREMOTEIO - ERROR_TABLE_BASE_uae)] = EREMOTEIO;
|
||||
et2sys[(UAEDQUOT - ERROR_TABLE_BASE_uae)] = EDQUOT;
|
||||
et2sys[(UAENOMEDIUM - ERROR_TABLE_BASE_uae)] = ENOMEDIUM;
|
||||
et2sys[(UAEMEDIUMTYPE - ERROR_TABLE_BASE_uae)] = EMEDIUMTYPE;
|
||||
}
|
||||
|
||||
static afs_int32
|
||||
et_to_sys_error(afs_int32 in)
|
||||
{
|
||||
if (in < ERROR_TABLE_BASE_uae || in >= ERROR_TABLE_BASE_uae + 512)
|
||||
return in;
|
||||
if (et2sys[in - ERROR_TABLE_BASE_uae] != 0)
|
||||
return et2sys[in - ERROR_TABLE_BASE_uae];
|
||||
return in;
|
||||
}
|
||||
|
||||
long cm_MapRPCError(long error, cm_req_t *reqp)
|
||||
{
|
||||
if (error == 0)
|
||||
@ -44,6 +227,8 @@ long cm_MapRPCError(long error, cm_req_t *reqp)
|
||||
return error;
|
||||
}
|
||||
|
||||
error = et_to_sys_error(error);
|
||||
|
||||
if (error < 0)
|
||||
error = CM_ERROR_TIMEDOUT;
|
||||
else if (error == 30)
|
||||
|
@ -32,6 +32,7 @@ extern "C" {
|
||||
#include <afsint.h>
|
||||
#include <afs/auth.h>
|
||||
#include <WINNT\afsreg.h>
|
||||
#include <cm.h>
|
||||
}
|
||||
|
||||
|
||||
@ -298,10 +299,54 @@ void WhereIs(CStringArray& files)
|
||||
dlg.DoModal();
|
||||
}
|
||||
|
||||
static int
|
||||
CMtoUNIXerror(int cm_code)
|
||||
{
|
||||
switch (cm_code) {
|
||||
case CM_ERROR_TIMEDOUT:
|
||||
return ETIMEDOUT;
|
||||
case CM_ERROR_NOACCESS:
|
||||
return EACCES;
|
||||
case CM_ERROR_NOSUCHFILE:
|
||||
return ENOENT;
|
||||
case CM_ERROR_INVAL:
|
||||
return EINVAL;
|
||||
case CM_ERROR_BADFD:
|
||||
return EBADF;
|
||||
case CM_ERROR_EXISTS:
|
||||
return EEXIST;
|
||||
case CM_ERROR_CROSSDEVLINK:
|
||||
return EXDEV;
|
||||
case CM_ERROR_NOTDIR:
|
||||
return ENOTDIR;
|
||||
case CM_ERROR_ISDIR:
|
||||
return EISDIR;
|
||||
case CM_ERROR_READONLY:
|
||||
return EROFS;
|
||||
case CM_ERROR_WOULDBLOCK:
|
||||
return EWOULDBLOCK;
|
||||
case CM_ERROR_NOSUCHCELL:
|
||||
return ESRCH; /* hack */
|
||||
case CM_ERROR_NOSUCHVOLUME:
|
||||
return EPIPE; /* hack */
|
||||
case CM_ERROR_NOMORETOKENS:
|
||||
return EDOM; /* hack */
|
||||
case CM_ERROR_TOOMANYBUFS:
|
||||
return EFBIG; /* hack */
|
||||
default:
|
||||
if (cm_code > 0 && cm_code < EILSEQ)
|
||||
return cm_code;
|
||||
else
|
||||
return ENOTTY;
|
||||
}
|
||||
}
|
||||
|
||||
CString GetAfsError(int code, const char *filename)
|
||||
{
|
||||
CString strMsg;
|
||||
|
||||
code = CMtoUNIXerror(code);
|
||||
|
||||
if (code == EINVAL) {
|
||||
if (filename)
|
||||
strMsg.Format("Invalid argument; it is possible that the file is not in AFS");
|
||||
|
@ -350,11 +350,20 @@ void CSetAfsAcl::EnablePermChanges(BOOL bEnable)
|
||||
|
||||
void CSetAfsAcl::OnNothingSelected()
|
||||
{
|
||||
m_NormalRights.SetSel(-1, FALSE); // Unselect any selected normal rights
|
||||
m_NegativeRights.SetSel(-1, FALSE); // Unselect any selected negative rights
|
||||
ShowRights(""); // Show no rights
|
||||
EnablePermChanges(FALSE); // Allow no rights changes
|
||||
m_Remove.EnableWindow(FALSE); // Disable remove button
|
||||
//m_NormalRights.SetSel(-1,FALSE); // Unselect any selected normal rights
|
||||
//m_NegativeRights.SetSel(-1,FALSE); // Unselect any selected negative rights
|
||||
|
||||
for (int i=0;i < m_NormalRights.GetCount();i++)
|
||||
{
|
||||
m_NormalRights.SetSel(i, FALSE);
|
||||
}
|
||||
for (int i=0;i < m_NegativeRights.GetCount();i++)
|
||||
{
|
||||
m_NegativeRights.SetSel(i, FALSE);
|
||||
}
|
||||
ShowRights(""); // Show no rights
|
||||
EnablePermChanges(FALSE); // Allow no rights changes
|
||||
m_Remove.EnableWindow(FALSE); // Disable remove button
|
||||
}
|
||||
|
||||
void CSetAfsAcl::OnSelection()
|
||||
|
@ -91,7 +91,10 @@ CMtoUNIXerror(int cm_code)
|
||||
case CM_ERROR_TOOMANYBUFS:
|
||||
return EFBIG; /* hack */
|
||||
default:
|
||||
return ENOTTY;
|
||||
if (cm_code > 0 && cm_code < EILSEQ)
|
||||
return cm_code;
|
||||
else
|
||||
return ENOTTY;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user