1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<title>VFCreateSystemFile*</title>
9</head>
10
11<body>
12
13<h1>VFCreateSystemFile*</h1>
14
15<h2>C Specification</h2>
16<dl><dd><pre><code>
17#include &lt;revolution/vf.h&gt;
18
19typedef s32	VFDevErr;
20
21VFDevErr VFCreateSystemFileNANDFlash( const char* sysFileName, u32 fileSize );
22VFDevErr VFCreateSystemFileRam( void* memory, u32 fileSize );
23</code></pre></dd></dl>
24
25<h2>Arguments</h2>
26<p>
27<TABLE border="1" >
28  <tr>
29<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>sysFileName</EM></STRONG></CODE></TD>
30<TD width="520">The file path for the vff file being created. The file name must use 8.3 format.</TD>
31  </tr>
32  <tr>
33<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>memory</EM></STRONG></CODE></TD>
34<TD width="520">The RAM address for the vff file being created.</TD>
35  </tr>
36  <tr>
37<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>fileSize</EM></STRONG></CODE></TD>
38<TD width="520">The size of the <CODE>.vff</CODE> file being created (specify a size larger than 20KBytes that is a multiple of 32).<br></TD>
39  </tr>
40</TABLE>
41</p>
42
43<h2>Return Values</h2>
44<PRE>
45If <CODE>VFCreateSystemFileNANDFlash</CODE> was used:
46One of the <CODE>NANDCreate</CODE> values  (<CODE>NAND_RESULT_*</CODE>) is returned.
47<CODE>NAND_RESULT_OK</CODE> is returned if the function ends normally.
48For details, see <CODE>NANDCreate</CODE> in the NAND Library manual.
49
50If <CODE>VFCreateSystemFileRam</CODE> was used:
51Always returns 0 (normal termination).
52</PRE>
53
54<H2>Description</H2>
55<p>
56Run <CODE>NANDCheck</CODE> in the application when creating files in NAND memory.<br><br> Creates a <CODE>.vff</CODE> file (Virtual File system file) on each device.<br> <br>If a non-existent directory is found within the path, the target directory is not created and an error is returned here.<br><br> At present, when a <CODE>.vff</CODE> file is created with <CODE>VFCreateSystemFileNANDFlash</CODE>, the file is created such that only its owner has read/write permissions. <br>When a created <CODE>.vff</CODE> file is used for the first time after calling <CODE>VFMountDriveXXX()</CODE>, be sure to format with <CODE>VFFormatDrive( )</CODE>.<br><br> Delete the <CODE>.vff</CODE> file inside VF if this function fails while creating the system file. <br>However, since <CODE>VF_ERR_VFF_FILE_FORMAT</CODE> is returned during mounting if file deletion failed, delete the file, and then create another <CODE>.vff</CODE> file.<br>
57</p>
58
59
60<h2>See Also</h2>
61<p>
62<code><a href="./VFMountDrive.html">VFMountDrive</a></code>, <code><a href="./VFFormatDrive.html">VFFormatDrive</a></code>
63</p>
64
65<H2>Revision History</H2>
66<p>
672006/10/11<br>2007/05/08  Revised the description of Arguments and added descriptions for Return Values.
68</p>
69
70
71<hr><p>CONFIDENTIAL</p></body>
72</html>
73