RTErrConvertFromDarwinKern.cpp revision ba272c487c0ba7509418d0210b2997d4739a467e
1008N/A/* $Id:$ */
1008N/A/** @file
1008N/A * IPRT - Convert Darwin Mach returns codes to iprt status codes.
1008N/A */
1008N/A
1008N/A/*
1008N/A * Copyright (C) 2006-2007 Sun Microsystems, Inc.
1008N/A *
1008N/A * This file is part of VirtualBox Open Source Edition (OSE), as
1008N/A * available from http://www.virtualbox.org. This file is free software;
1008N/A * you can redistribute it and/or modify it under the terms of the GNU
1008N/A * General Public License (GPL) as published by the Free Software
1008N/A * Foundation, in version 2 as it comes in the "COPYING" file of the
1008N/A * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
1008N/A * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1008N/A *
1008N/A * The contents of this file may alternatively be used under the terms
1008N/A * of the Common Development and Distribution License Version 1.0
1008N/A * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
1008N/A * VirtualBox OSE distribution, in which case the provisions of the
1008N/A * CDDL are applicable instead of those of the GPL.
1008N/A *
1008N/A * You may elect to license modified versions of this file under the
1008N/A * terms and conditions of either the GPL or the CDDL or both.
1008N/A *
1008N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
1008N/A * Clara, CA 95054 USA or visit http://www.sun.com if you need
1008N/A * additional information or have any questions.
1008N/A */
1008N/A
1008N/A/*******************************************************************************
1008N/A* Header Files *
1008N/A*******************************************************************************/
1008N/A#include <mach/kern_return.h>
1008N/A
1008N/A#include <iprt/err.h>
1008N/A#include <iprt/assert.h>
1008N/A
1008N/A
1008N/ARTDECL(int) RTErrConvertFromDarwinKern(int iNativeCode)
1008N/A{
1008N/A /*
1008N/A * 'optimzied' success case.
1008N/A */
1008N/A if (iNativeCode == KERN_SUCCESS)
1008N/A return VINF_SUCCESS;
1140N/A return RTErrConvertFromDarwin(iNativeCode);
1140N/A}
1140N/A
1140N/A
1140N/A