diff options
Diffstat (limited to 'runtime/docs/html/group__copy.html')
-rw-r--r-- | runtime/docs/html/group__copy.html | 99 |
1 files changed, 80 insertions, 19 deletions
diff --git a/runtime/docs/html/group__copy.html b/runtime/docs/html/group__copy.html index 83928d95..72321187 100644 --- a/runtime/docs/html/group__copy.html +++ b/runtime/docs/html/group__copy.html @@ -4,7 +4,7 @@ <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.1 --> -<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> +<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> <h1>Functions to copy from user space.</h1>Functions to copy from user space. <a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> @@ -12,18 +12,21 @@ <tr><td class="memItemLeft" nowrap align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="group__copy.html#ga0">_stp_strncpy_from_user</a> (char *dst, const char __user *src, long count)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Copy a NULL-terminated string from userspace. <a href="#ga0"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="group__copy.html#ga1">_stp_copy_from_user</a> (char *dst, const char __user *src, unsigned long count)</td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__copy.html#ga1">_stp_string_from_user</a> (String str, const char __user *src, long count)</td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy a block of data from user space. <a href="#ga1"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__copy.html#ga2">_stp_copy_argv_from_user</a> (<a class="el" href="structmap__root.html">MAP</a> list, char __user *__user *argv)</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy a String from userspace. <a href="#ga1"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="group__copy.html#ga2">_stp_copy_from_user</a> (char *dst, const char __user *src, unsigned long count)</td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy an argv from user space to a List. <a href="#ga2"></a><br></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy a block of data from user space. <a href="#ga2"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__copy.html#ga3">_stp_copy_argv_from_user</a> (<a class="el" href="group__maps.html#ga1">MAP</a> list, char __user *__user *argv)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Copy an argv from user space to a List. <a href="#ga3"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Functions to copy from user space. <p> None of these functions will sleep (for example to allow pages to be swapped in). It is possible (although rare) that the data in user space will not present and these functions will return an error. <hr><h2>Function Documentation</h2> -<a class="anchor" name="ga2" doxytag="copy.c::_stp_copy_argv_from_user"></a><p> +<a class="anchor" name="ga3" doxytag="copy.c::_stp_copy_argv_from_user"></a><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> @@ -31,7 +34,7 @@ None of these functions will sleep (for example to allow pages to be swapped in) <tr> <td class="md" nowrap valign="top">int _stp_copy_argv_from_user </td> <td class="md" valign="top">( </td> - <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="md" nowrap valign="top"><a class="el" href="group__maps.html#ga1">MAP</a> </td> <td class="mdname" nowrap> <em>list</em>, </td> </tr> <tr> @@ -66,27 +69,27 @@ Copy an argv from user space to a List. </table> </dl> <dl compact><dt><b>Returns:</b></dt><dd>number of elements in <em>list</em></dd></dl> -<b>Example:</b> <div class="fragment"><pre class="fragment"><a class="code" href="structmap__root.html">MAP</a> arglist ; +<b>Example:</b> <div class="fragment"><pre class="fragment"><a class="code" href="group__maps.html#ga1">MAP</a> arglist ; <span class="keywordtype">int</span> inst_do_execve (<span class="keywordtype">char</span> * filename, <span class="keywordtype">char</span> __user *__user *argv, <span class="keywordtype">char</span> __user *__user *envp, <span class="keyword">struct</span> pt_regs * regs) { - <span class="keyword">struct </span><a class="code" href="structmap__node__str.html">map_node_str</a> *ptr; + <span class="keyword">struct </span>map_node_str *ptr; <a class="code" href="group__lists.html#ga1">_stp_list_clear</a> (arglist); - <a class="code" href="group__copy.html#ga2">_stp_copy_argv_from_user</a> (arglist, argv); + <a class="code" href="group__copy.html#ga3">_stp_copy_argv_from_user</a> (arglist, argv); - <a class="code" href="group__maps.html#ga31">foreach</a> (arglist, ptr) + <a class="code" href="group__maps.html#ga32">foreach</a> (arglist, ptr) printk ("%s ", ptr->str); printk ("\n"); } </pre></div> <p> -Definition at line <a class="el" href="copy_8c-source.html#l00130">130</a> of file <a class="el" href="copy_8c-source.html">copy.c</a>. +Definition at line <a class="el" href="copy_8c-source.html#l00154">154</a> of file <a class="el" href="copy_8c-source.html">copy.c</a>. <p> -References <a class="el" href="map_8c-source.html#l00853">_stp_list_add_str()</a>, <a class="el" href="copy_8c-source.html#l00094">_stp_strncpy_from_user()</a>, and <a class="el" href="map_8h-source.html#l00075">map_root::num</a>. </td> +References <a class="el" href="map_8c-source.html#l00872">_stp_list_add_str()</a>, and <a class="el" href="copy_8c-source.html#l00096">_stp_strncpy_from_user()</a>. </td> </tr> </table> -<a class="anchor" name="ga1" doxytag="copy.c::_stp_copy_from_user"></a><p> +<a class="anchor" name="ga2" doxytag="copy.c::_stp_copy_from_user"></a><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> @@ -112,7 +115,7 @@ References <a class="el" href="map_8c-source.html#l00853">_stp_list_add_str()</a <tr> <td class="md"></td> <td class="md">) </td> - <td class="md" colspan="2"><code> [inline]</code></td> + <td class="md" colspan="2"></td> </tr> </table> </td> @@ -139,7 +142,63 @@ If some data could not be copied, this function will pad the copied data to the <dl compact><dt><b>Returns:</b></dt><dd>number of bytes that could not be copied. On success, this will be zero. </dd></dl> <p> -Definition at line <a class="el" href="copy_8c-source.html#l00115">115</a> of file <a class="el" href="copy_8c-source.html">copy.c</a>. </td> +Definition at line <a class="el" href="copy_8c-source.html#l00139">139</a> of file <a class="el" href="copy_8c-source.html">copy.c</a>. </td> + </tr> +</table> +<a class="anchor" name="ga1" doxytag="copy.c::_stp_string_from_user"></a><p> +<table class="mdTable" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_string_from_user </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">String </td> + <td class="mdname" nowrap> <em>str</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>const char __user * </td> + <td class="mdname" nowrap> <em>src</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>long </td> + <td class="mdname" nowrap> <em>count</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Copy a String from userspace. +<p> +Copies a string of up to <em>count</em> bytes from userspace into a String. If access to userspace fails, returns -EFAULT (some data may have been copied). <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>str</em> </td><td>Destination String. </td></tr> + <tr><td valign="top"></td><td valign="top"><em>src</em> </td><td>Source address, in user space. </td></tr> + <tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>Maximum number of bytes to copy, including the trailing NULL. </td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="copy_8c-source.html#l00113">113</a> of file <a class="el" href="copy_8c-source.html">copy.c</a>. +<p> +References <a class="el" href="string_8c-source.html#l00020">STP_STRING_SIZE</a>. </td> </tr> </table> <a class="anchor" name="ga0" doxytag="copy.c::_stp_strncpy_from_user"></a><p> @@ -192,11 +251,13 @@ If access to userspace fails, returns -EFAULT (some data may have been copied). <tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>Maximum number of bytes to copy, including the trailing NULL.</td></tr> </table> </dl> -If <em>count</em> is smaller than the length of the string, copies <em>count</em> bytes and returns <em>count</em>. +If <em>count</em> is smaller than the length of the string, copies <em>count</em> bytes and returns <em>count</em>. <p> +<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>I can't think of why you wouldn't use <a class="el" href="group__copy.html#ga1">_stp_string_from_user()</a> instead. </dd></dl> + <p> -Definition at line <a class="el" href="copy_8c-source.html#l00094">94</a> of file <a class="el" href="copy_8c-source.html">copy.c</a>. +Definition at line <a class="el" href="copy_8c-source.html#l00096">96</a> of file <a class="el" href="copy_8c-source.html">copy.c</a>. <p> -Referenced by <a class="el" href="copy_8c-source.html#l00130">_stp_copy_argv_from_user()</a>. </td> +Referenced by <a class="el" href="copy_8c-source.html#l00154">_stp_copy_argv_from_user()</a>. </td> </tr> </table> </body></html> |