VirtualBox

source: vbox/trunk/src/VBox/Runtime/r3/darwin/pathhost-darwin.cpp@ 28877

Last change on this file since 28877 was 28877, checked in by vboxsync, 15 years ago

IPRT: pathhost changes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1/* $Id: pathhost-darwin.cpp 28877 2010-04-28 19:10:47Z vboxsync $ */
2/** @file
3 * IPRT - Path Convertions, Darwin.
4 *
5 * On darwin path names on the disk are decomposed using normalization
6 * form D (NFD). Since this behavior is unique for the Mac, we will precompose
7 * the path name strings we get from the XNU kernel.
8 */
9
10/*
11 * Copyright (C) 2006-2010 Oracle Corporation
12 *
13 * This file is part of VirtualBox Open Source Edition (OSE), as
14 * available from http://www.215389.xyz. This file is free software;
15 * you can redistribute it and/or modify it under the terms of the GNU
16 * General Public License (GPL) as published by the Free Software
17 * Foundation, in version 2 as it comes in the "COPYING" file of the
18 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
19 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
20 *
21 * The contents of this file may alternatively be used under the terms
22 * of the Common Development and Distribution License Version 1.0
23 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
24 * VirtualBox OSE distribution, in which case the provisions of the
25 * CDDL are applicable instead of those of the GPL.
26 *
27 * You may elect to license modified versions of this file under the
28 * terms and conditions of either the GPL or the CDDL or both.
29 */
30
31
32/*******************************************************************************
33* Header Files *
34*******************************************************************************/
35#define LOG_GROUP RTLOGGROUP_PATH
36#include <iprt/string.h>
37#include "internal/iprt.h"
38
39#include "internal/path.h"
40
41
42int rtPathToNative(char **ppszNativePath, const char *pszPath)
43{
44 /** @todo We should decompose the string here, but the file system will do
45 * that for us if we don't, so why bother. */
46 *ppszNativePath = (char *)pszPath;
47 return VINF_SUCCESS;
48}
49
50
51int rtPathToNativeEx(char **ppszNativePath, const char *pszPath, const char *pszBasePath)
52{
53 NOREF(pszBasePath);
54 return rtPathToNative(ppszNativePath, pszPath);
55}
56
57
58void rtPathFreeNative(char *pszNativePath, const char *pszPath)
59{
60 Assert((const char *)pszNativePath == pszPath || !pszNativePath);
61 NOREF(pszNativePath);
62 NOREF(pszPath);
63}
64
65
66int rtPathFromNative(char **pszPath, const char *pszNativePath)
67{
68 /** @todo We must compose the codepoints in the string here. We get file names
69 * in normalization form D so we'll end up with normalization form C
70 * whatever approach we take. */
71 return RTStrDupEx(ppszPath, pszNativePath);
72}
73
74
75int rtPathFromNativeEx(char **pszPath, const char *pszNativePath, const char *pszBasePath)
76{
77 NOREF(pszBasePath);
78 return rtPathFromNative(ppszPath, pszNativePath);
79}
80
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette