0
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#define FILE_ID 0x594D555D
|
|
20 |
#include "bootldr.h"
|
|
21 |
|
|
22 |
_LIT(KLitPdd,".PDD");
|
|
23 |
_LIT(KLitLdd,".LDD");
|
|
24 |
TInt LoadDriver(const TDesC& aName, TBool aPdd)
|
|
25 |
{
|
|
26 |
TBuf<128> filename=aName;
|
|
27 |
TInt rv=KErrNone;
|
|
28 |
if (aPdd)
|
|
29 |
{
|
|
30 |
filename.Append(KLitPdd);
|
|
31 |
rv = User::LoadPhysicalDevice(filename);
|
|
32 |
}
|
|
33 |
else
|
|
34 |
{
|
|
35 |
filename.Append(KLitLdd);
|
|
36 |
rv = User::LoadLogicalDevice(filename);
|
|
37 |
}
|
|
38 |
if (rv==KErrAlreadyExists)
|
|
39 |
rv=KErrNone;
|
|
40 |
return rv;
|
|
41 |
}
|
|
42 |
|
|
43 |
GLDEF_C void Printf(TRefByValue<const TDesC> aFmt,...)
|
|
44 |
{
|
|
45 |
TBuf<256> printBuf;
|
|
46 |
VA_LIST list;
|
|
47 |
VA_START(list,aFmt);
|
|
48 |
printBuf.AppendFormatList(aFmt, list);
|
|
49 |
printBuf.Append(TChar(0));
|
|
50 |
RDebug::Print(printBuf);
|
|
51 |
}
|
|
52 |
|
|
53 |
|