int NaClDescGetValueNotImplemented(struct NaClDesc *vself) { NaClLog(LOG_ERROR, "GetValue method is not implemented for object of type %s\n", NaClDescTypeString(((struct NaClDescVtbl const *) vself->base.vtbl)->typeTag)); return -NACL_ABI_EINVAL; }
int32_t NaClDescIsattyNotImplemented(struct NaClDesc *vself) { NaClLog(LOG_ERROR, "Isatty method is not implemented for object of type %s\n", NaClDescTypeString(((struct NaClDescVtbl const *) vself->base.vtbl)->typeTag)); return -NACL_ABI_ENOTTY; }
int NaClDescGetValueNotImplemented(struct NaClDesc *vself, struct NaClDescEffector *effp) { UNREFERENCED_PARAMETER(effp); NaClLog(LOG_ERROR, "GetValue method is not implemented for object of type %s\n", NaClDescTypeString(vself->vtbl->typeTag)); return -NACL_ABI_EINVAL; }
int NaClDescExternalizeNotImplemented(struct NaClDesc *vself, struct NaClDescXferState *xfer) { UNREFERENCED_PARAMETER(xfer); NaClLog(LOG_ERROR, "Externalize method is not implemented for object of type %s\n", NaClDescTypeString(vself->vtbl->typeTag)); return -NACL_ABI_EINVAL; }
int NaClDescFtruncateNotImplemented(struct NaClDesc *vself, nacl_abi_off_t length) { UNREFERENCED_PARAMETER(length); NaClLog(LOG_ERROR, "Ftruncate method is not implemented for object of type %s\n", NaClDescTypeString(((struct NaClDescVtbl const *) vself->base.vtbl)->typeTag)); return -NACL_ABI_EINVAL; }
int NaClDescFstatNotImplemented(struct NaClDesc *vself, struct nacl_abi_stat *statbuf) { UNREFERENCED_PARAMETER(statbuf); NaClLog(LOG_ERROR, "Fstat method is not implemented for object of type %s\n", NaClDescTypeString(((struct NaClDescVtbl const *) vself->base.vtbl)->typeTag)); return -NACL_ABI_EINVAL; }
int NaClDescWaitNotImplemented(struct NaClDesc *vself, struct NaClDesc *mutex) { UNREFERENCED_PARAMETER(mutex); NaClLog(LOG_ERROR, "Wait method is not implemented for object of type %s\n", NaClDescTypeString(((struct NaClDescVtbl const *) vself->base.vtbl)->typeTag)); return -NACL_ABI_EINVAL; }
int NaClDescAcceptConnNotImplemented(struct NaClDesc *vself, struct NaClDesc **result) { UNREFERENCED_PARAMETER(result); NaClLog(LOG_ERROR, "AcceptConn method is not implemented for object of type %s\n", NaClDescTypeString(((struct NaClDescVtbl const *) vself->base.vtbl)->typeTag)); return -NACL_ABI_EINVAL; }
int NaClDescExternalizeSizeNotImplemented(struct NaClDesc *vself, size_t *nbytes, size_t *nhandles) { UNREFERENCED_PARAMETER(nbytes); UNREFERENCED_PARAMETER(nhandles); NaClLog(LOG_ERROR, "ExternalizeSize method is not implemented for object of type %s\n", NaClDescTypeString(vself->vtbl->typeTag)); return -NACL_ABI_EINVAL; }
int NaClDescFstatNotImplemented(struct NaClDesc *vself, struct NaClDescEffector *effp, struct nacl_abi_stat *statbuf) { UNREFERENCED_PARAMETER(effp); UNREFERENCED_PARAMETER(statbuf); NaClLog(LOG_ERROR, "Fstat method is not implemented for object of type %s\n", NaClDescTypeString(vself->vtbl->typeTag)); return -NACL_ABI_EINVAL; }
int NaClDescUnmapUnsafeNotImplemented(struct NaClDesc *vself, void *start_addr, size_t len) { UNREFERENCED_PARAMETER(start_addr); UNREFERENCED_PARAMETER(len); NaClLog(LOG_ERROR, "Map method is not implemented for object of type %s\n", NaClDescTypeString(((struct NaClDescVtbl const *) vself->base.vtbl)->typeTag)); return -NACL_ABI_EINVAL; }
int NaClDescTimedWaitAbsNotImplemented(struct NaClDesc *vself, struct NaClDesc *mutex, struct nacl_abi_timespec const *ts) { UNREFERENCED_PARAMETER(mutex); UNREFERENCED_PARAMETER(ts); NaClLog(LOG_ERROR, "TimedWaitAbs method is not implemented for object of type %s\n", NaClDescTypeString(((struct NaClDescVtbl const *) vself->base.vtbl)->typeTag)); return -NACL_ABI_EINVAL; }
ssize_t NaClDescWriteNotImplemented(struct NaClDesc *vself, void const *buf, size_t len) { UNREFERENCED_PARAMETER(buf); UNREFERENCED_PARAMETER(len); NaClLog(LOG_ERROR, "Write method is not implemented for object of type %s\n", NaClDescTypeString(((struct NaClDescVtbl const *) vself->base.vtbl)->typeTag)); return -NACL_ABI_EINVAL; }
ssize_t NaClDescGetdentsNotImplemented(struct NaClDesc *vself, void *dirp, size_t count) { UNREFERENCED_PARAMETER(dirp); UNREFERENCED_PARAMETER(count); NaClLog(LOG_ERROR, "Getdents method is not implemented for object of type %s\n", NaClDescTypeString(((struct NaClDescVtbl const *) vself->base.vtbl)->typeTag)); return -NACL_ABI_EINVAL; }
int NaClDescIoctlNotImplemented(struct NaClDesc *vself, int request, void *arg) { UNREFERENCED_PARAMETER(request); UNREFERENCED_PARAMETER(arg); NaClLog(LOG_ERROR, "Ioctl method is not implemented for object of type %s\n", NaClDescTypeString(((struct NaClDescVtbl const *) vself->base.vtbl)->typeTag)); return -NACL_ABI_EINVAL; }
nacl_off64_t NaClDescSeekNotImplemented(struct NaClDesc *vself, nacl_off64_t offset, int whence) { UNREFERENCED_PARAMETER(offset); UNREFERENCED_PARAMETER(whence); NaClLog(LOG_ERROR, "Seek method is not implemented for object of type %s\n", NaClDescTypeString(((struct NaClDescVtbl const *) vself->base.vtbl)->typeTag)); return -NACL_ABI_EINVAL; }
ssize_t NaClDescLowLevelRecvMsgNotImplemented( struct NaClDesc *vself, struct NaClMessageHeader *dgram, int flags) { UNREFERENCED_PARAMETER(dgram); UNREFERENCED_PARAMETER(flags); NaClLog(LOG_ERROR, "LowLevelRecvMsg method is not implemented for object of type %s\n", NaClDescTypeString(((struct NaClDescVtbl const *) vself->base.vtbl)->typeTag)); return -NACL_ABI_EINVAL; }
ssize_t NaClDescSendMsgNotImplemented( struct NaClDesc *vself, const struct NaClImcTypedMsgHdr *nitmhp, int flags) { UNREFERENCED_PARAMETER(nitmhp); UNREFERENCED_PARAMETER(flags); NaClLog(LOG_ERROR, "SendMsg method is not implemented for object of type %s\n", NaClDescTypeString(((struct NaClDescVtbl const *) vself->base.vtbl)->typeTag)); return -NACL_ABI_EINVAL; }
nacl_off64_t NaClDescSeekNotImplemented(struct NaClDesc *vself, struct NaClDescEffector *effp, nacl_off64_t offset, int whence) { UNREFERENCED_PARAMETER(effp); UNREFERENCED_PARAMETER(offset); UNREFERENCED_PARAMETER(whence); NaClLog(LOG_ERROR, "Seek method is not implemented for object of type %s\n", NaClDescTypeString(vself->vtbl->typeTag)); return -NACL_ABI_EINVAL; }
int NaClDescIoctlNotImplemented(struct NaClDesc *vself, struct NaClDescEffector *effp, int request, void *arg) { UNREFERENCED_PARAMETER(effp); UNREFERENCED_PARAMETER(request); UNREFERENCED_PARAMETER(arg); NaClLog(LOG_ERROR, "Ioctl method is not implemented for object of type %s\n", NaClDescTypeString(vself->vtbl->typeTag)); return -NACL_ABI_EINVAL; }
ssize_t NaClDescReadNotImplemented(struct NaClDesc *vself, struct NaClDescEffector *effp, void *buf, size_t len) { UNREFERENCED_PARAMETER(effp); UNREFERENCED_PARAMETER(buf); UNREFERENCED_PARAMETER(len); NaClLog(LOG_ERROR, "Read method is not implemented for object of type %s\n", NaClDescTypeString(vself->vtbl->typeTag)); return -NACL_ABI_EINVAL; }
ssize_t NaClDescRecvMsgNotImplemented(struct NaClDesc *vself, struct NaClDescEffector *effp, struct NaClMessageHeader *dgram, int flags) { UNREFERENCED_PARAMETER(effp); UNREFERENCED_PARAMETER(dgram); UNREFERENCED_PARAMETER(flags); NaClLog(LOG_ERROR, "RecvMsg method is not implemented for object of type %s\n", NaClDescTypeString(vself->vtbl->typeTag)); return -NACL_ABI_EINVAL; }
uintptr_t NaClDescMapNotImplemented(struct NaClDesc *vself, struct NaClDescEffector *effp, void *start_addr, size_t len, int prot, int flags, nacl_off64_t offset) { UNREFERENCED_PARAMETER(effp); UNREFERENCED_PARAMETER(start_addr); UNREFERENCED_PARAMETER(len); UNREFERENCED_PARAMETER(prot); UNREFERENCED_PARAMETER(flags); UNREFERENCED_PARAMETER(offset); NaClLog(LOG_ERROR, "Map method is not implemented for object of type %s\n", NaClDescTypeString(vself->vtbl->typeTag)); return -NACL_ABI_EINVAL; }
/* * Returns number of descriptors internalized, or an error code. * Since only one descriptor can be internalized (out parameter is not * an array), this means 0 or 1 are non-error conditions. * * Returns negative errno (syscall-style) on error. */ int NaClDescInternalizeFromXferBuffer( struct NaClDesc **out_desc, struct NaClDescXferState *xferp, struct NaClDescQuotaInterface *quota_interface) { int xfer_status; size_t type_tag; type_tag = NaClNrdXferReadTypeTag(xferp); /* 0 <= type_tag */ if (NACL_DESC_TYPE_END_TAG == type_tag) { return 0; } if (type_tag >= NACL_DESC_TYPE_MAX) { NaClLog(4, ("illegal type tag %"NACL_PRIdS" (0x%"NACL_PRIxS")\n"), type_tag, type_tag); return -NACL_ABI_EIO; } if ((int (*)(struct NaClDesc **, struct NaClDescXferState *, struct NaClDescQuotaInterface *)) NULL == NaClDescInternalize[type_tag]) { NaClLog(LOG_FATAL, "No internalization function for type %"NACL_PRIdS"\n", type_tag); /* fatal, but in case we change it later */ return -NACL_ABI_EIO; } xfer_status = (*NaClDescInternalize[type_tag])(out_desc, xferp, quota_interface); /* constructs new_desc, transferring ownership of any handles consumed */ if (xfer_status != 0) { NaClLog(0, "non-zero xfer_status %d, desc type tag %s (%"NACL_PRIdS")\n", xfer_status, NaClDescTypeString(type_tag), type_tag); } return 0 == xfer_status; }