mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-28 16:26:35 +00:00
923b700822
Add CAtapiWriteCmd for AHCIAtapiBlksWrite. Remove AHCIAtapiSeek and AHCIAtapiFormat.
117 lines
12 KiB
HTML
Executable file
117 lines
12 KiB
HTML
Executable file
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
|
|
<meta name="generator" content="ZealOS V0.16">
|
|
<style type="text/css">
|
|
body {background-color:#fef1f0;}
|
|
.cF0{color:#000000;background-color:#fef1f0;}
|
|
.cF1{color:#0148a4;background-color:#fef1f0;}
|
|
.cF2{color:#3b7901;background-color:#fef1f0;}
|
|
.cF3{color:#057c7e;background-color:#fef1f0;}
|
|
.cF4{color:#bb2020;background-color:#fef1f0;}
|
|
.cF5{color:#9e42ae;background-color:#fef1f0;}
|
|
.cF6{color:#b57901;background-color:#fef1f0;}
|
|
.cF7{color:#b2b6af;background-color:#fef1f0;}
|
|
.cF8{color:#555753;background-color:#fef1f0;}
|
|
.cF9{color:#678fbb;background-color:#fef1f0;}
|
|
.cFA{color:#82bc49;background-color:#fef1f0;}
|
|
.cFB{color:#0097a2;background-color:#fef1f0;}
|
|
.cFC{color:#e26a6a;background-color:#fef1f0;}
|
|
.cFD{color:#c671bc;background-color:#fef1f0;}
|
|
.cFE{color:#c7ab00;background-color:#fef1f0;}
|
|
.cFF{color:#fef1f0;background-color:#fef1f0;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<pre style="font-family:monospace;font-size:12pt">
|
|
<a name="l1"></a><span class=cF0>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>"Cmd Line (Typically)"</span><span class=cF0>
|
|
<a name="l2"></a>
|
|
<a name="l3"></a></span><span class=cF9>CDirEntry</span><span class=cF0> </span><span class=cF5>MGFind</span><span class=cF0>(</span><span class=cF9>CDirEntry</span><span class=cF0> *needle_entry, </span><span class=cF9>CDirEntry</span><span class=cF0> *haystack_list)
|
|
<a name="l4"></a>{
|
|
<a name="l5"></a> </span><span class=cF1>while</span><span class=cF0> (haystack_list)
|
|
<a name="l6"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l7"></a> </span><span class=cF1>if</span><span class=cF0> (!</span><span class=cF5>StrCompare</span><span class=cF7>(</span><span class=cF0>needle_entry->name, haystack_list->name</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l8"></a> </span><span class=cF1>return</span><span class=cF0> haystack_list;
|
|
<a name="l9"></a> haystack_list = haystack_list->next;
|
|
<a name="l10"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l11"></a>
|
|
<a name="l12"></a> </span><span class=cF1>return</span><span class=cF0> </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l13"></a>}
|
|
<a name="l14"></a>
|
|
<a name="l15"></a></span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>Merge2</span><span class=cF0>(</span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde1, </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde2, </span><span class=cF9>I64</span><span class=cF0> *_fuf_flags, </span><span class=cF9>I64</span><span class=cF0> *_df_flags)
|
|
<a name="l16"></a>{
|
|
<a name="l17"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde;
|
|
<a name="l18"></a>
|
|
<a name="l19"></a> </span><span class=cF1>while</span><span class=cF0> (tmpde1 && !</span><span class=cF7>(</span><span class=cF0>*_df_flags & </span><span class=cF3>DF_ABORT_ALL_FILES</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l20"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l21"></a> tmpde = </span><span class=cF5>MGFind</span><span class=cF0>(tmpde1, tmpde2);
|
|
<a name="l22"></a> </span><span class=cF1>if</span><span class=cF0> (!tmpde)
|
|
<a name="l23"></a> </span><span class=cF6>"$BROWN$Does Not Exist:%s$FG$\n"</span><span class=cF0>, tmpde1->full_name;
|
|
<a name="l24"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l25"></a> {
|
|
<a name="l26"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde1->attr & </span><span class=cF3>RS_ATTR_DIR</span><span class=cF0>)
|
|
<a name="l27"></a> </span><span class=cF5>Merge2</span><span class=cF0>(tmpde1->sub, tmpde->sub, _fuf_flags, _df_flags);
|
|
<a name="l28"></a> </span><span class=cF1>else</span><span class=cF0>
|
|
<a name="l29"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l30"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>AbsI64</span><span class=cF7>(</span><span class=cF0>tmpde1->datetime - tmpde->datetime</span><span class=cF7>)</span><span class=cF0> > </span><span class=cF3>CDATE_FREQ</span><span class=cF0> * </span><span class=cFE>2</span><span class=cF0>) {</span><span class=cF2>//slop</span><span class=cF0>
|
|
<a name="l31"></a> </span><span class=cF6>"\n$LTRED$%s$FG$\n"</span><span class=cF0>, tmpde->full_name;
|
|
<a name="l32"></a> </span><span class=cF6>"$LTGREEN$%s$FG$"</span><span class=cF0>, tmpde1->full_name;
|
|
<a name="l33"></a> </span><span class=cF6>'\n'</span><span class=cF0>;
|
|
<a name="l34"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>Bt</span><span class=cF7>(</span><span class=cF0>_fuf_flags, </span><span class=cF3>FUf_DIFF</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l35"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l36"></a> </span><span class=cF1>if</span><span class=cF0> (</span><span class=cF5>FilesFindMatch</span><span class=cF7>(</span><span class=cF0>tmpde1->full_name, </span><span class=cF3>FILEMASK_TXT</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l37"></a> </span><span class=cF5>Diff</span><span class=cF0>(tmpde->full_name, tmpde1->full_name, _df_flags);
|
|
<a name="l38"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l39"></a> }
|
|
<a name="l40"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l41"></a> }
|
|
<a name="l42"></a> tmpde1 = tmpde1->next;
|
|
<a name="l43"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l44"></a>}
|
|
<a name="l45"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>Merge</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *dst_files_find_mask=</span><span class=cF6>"/*"</span><span class=cF0>, </span><span class=cF1>U8</span><span class=cF0> *src_files_find_mask=</span><span class=cF6>"/*"</span><span class=cF0>, </span><span class=cF1>U8</span><span class=cF0> *fu_flags=</span><span class=cF3>NULL</span><span class=cF0>)
|
|
<a name="l46"></a>{</span><span class=cF2>/*Merge text files from one list into another.</span><span class=cF0>
|
|
<a name="l47"></a></span><span class=cF2>Report files whos date/time is different.</span><span class=cF0>
|
|
<a name="l48"></a>
|
|
<a name="l49"></a></span><span class=cF2>"+d" will do </span><a href="https://zeal-operating-system.github.io/ZealOS/System/Utils/Diff.CC.html#l260"><span class=cF4>Diff</span></a><span class=cF2>() on files and prompt to</span><span class=cF0>
|
|
<a name="l50"></a></span><span class=cF2>merge changes from source files into</span><span class=cF0>
|
|
<a name="l51"></a></span><span class=cF2>destination files.</span><span class=cF0>
|
|
<a name="l52"></a></span><span class=cF2>*/</span><span class=cF0>
|
|
<a name="l53"></a> </span><span class=cF9>I64</span><span class=cF0> df_flags = </span><span class=cFE>0</span><span class=cF0>, fuf_flags = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l54"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde1 = </span><span class=cF3>NULL</span><span class=cF0>, *tmpde2 = </span><span class=cF3>NULL</span><span class=cF0>;
|
|
<a name="l55"></a>
|
|
<a name="l56"></a> </span><span class=cF5>FlagsScan</span><span class=cF0>(&fuf_flags, </span><span class=cF5>Define</span><span class=cF7>(</span><span class=cF6>"ST_FILE_UTIL_FLAGS"</span><span class=cF7>)</span><span class=cF0>, </span><span class=cF6>"+r"</span><span class=cF0>);
|
|
<a name="l57"></a> </span><span class=cF5>FlagsScan</span><span class=cF0>(&fuf_flags, </span><span class=cF5>Define</span><span class=cF7>(</span><span class=cF6>"ST_FILE_UTIL_FLAGS"</span><span class=cF7>)</span><span class=cF0>, fu_flags);
|
|
<a name="l58"></a> </span><span class=cF1>if</span><span class=cF0> (fuf_flags & ~</span><span class=cF7>(</span><span class=cF3>FUG_FILES_FIND</span><span class=cF0> | </span><span class=cF3>FUF_DIFF</span><span class=cF7>)</span><span class=cF0>)
|
|
<a name="l59"></a> </span><span class=cF5>throw</span><span class=cF0>(</span><span class=cF6>'FUF'</span><span class=cF0>);
|
|
<a name="l60"></a> </span><span class=cF3>ST_WARN_ST</span><span class=cF0> </span><span class=cF6>"This is based strictly on file dates.\n"</span><span class=cF0>;
|
|
<a name="l61"></a> tmpde1 = </span><span class=cF5>FilesFind</span><span class=cF0>(src_files_find_mask, fuf_flags & </span><span class=cF3>FUG_FILES_FIND</span><span class=cF0>);
|
|
<a name="l62"></a> tmpde2 = </span><span class=cF5>FilesFind</span><span class=cF0>(dst_files_find_mask, fuf_flags & </span><span class=cF3>FUG_FILES_FIND</span><span class=cF0>);
|
|
<a name="l63"></a> fuf_flags &= </span><span class=cF3>FUF_DIFF</span><span class=cF0>;
|
|
<a name="l64"></a> </span><span class=cF5>Merge2</span><span class=cF0>(tmpde1, tmpde2, &fuf_flags, &df_flags);
|
|
<a name="l65"></a> </span><span class=cF5>DirTreeDel</span><span class=cF0>(tmpde1);
|
|
<a name="l66"></a> </span><span class=cF5>DirTreeDel</span><span class=cF0>(tmpde2);
|
|
<a name="l67"></a>}
|
|
<a name="l68"></a>
|
|
<a name="l69"></a>#</span><span class=cF1>help_index</span><span class=cF0> </span><span class=cF6>"Utils;Cmd Line (Typically)"</span><span class=cF0>
|
|
<a name="l70"></a>
|
|
<a name="l71"></a></span><span class=cF1>public</span><span class=cF0> </span><span class=cF1>U0</span><span class=cF0> </span><span class=cF5>NewFiles</span><span class=cF0>(</span><span class=cF1>U8</span><span class=cF0> *files_find_mask=</span><span class=cF6>"/*"</span><span class=cF0>, </span><span class=cF9>CDate</span><span class=cF0> cdt=</span><span class=cFE>0</span><span class=cF0>, </span><span class=cF1>U8</span><span class=cF0> *fu_flags=</span><span class=cF3>NULL</span><span class=cF0>)
|
|
<a name="l72"></a>{</span><span class=cF2>//Report files newer than a certain date.</span><span class=cF0>
|
|
<a name="l73"></a> </span><span class=cF9>I64</span><span class=cF0> fuf_flags = </span><span class=cFE>0</span><span class=cF0>;
|
|
<a name="l74"></a> </span><span class=cF9>CDirEntry</span><span class=cF0> *tmpde, *tmpde1;
|
|
<a name="l75"></a>
|
|
<a name="l76"></a> </span><span class=cF1>if</span><span class=cF0> (!cdt)
|
|
<a name="l77"></a> cdt = </span><span class=cFB>sys_compile_time</span><span class=cF0>;
|
|
<a name="l78"></a> </span><span class=cF5>FlagsScan</span><span class=cF0>(&fuf_flags, </span><span class=cF5>Define</span><span class=cF7>(</span><span class=cF6>"ST_FILE_UTIL_FLAGS"</span><span class=cF7>)</span><span class=cF0>, </span><span class=cF6>"+r+F"</span><span class=cF0>);
|
|
<a name="l79"></a> </span><span class=cF5>FlagsScan</span><span class=cF0>(&fuf_flags, </span><span class=cF5>Define</span><span class=cF7>(</span><span class=cF6>"ST_FILE_UTIL_FLAGS"</span><span class=cF7>)</span><span class=cF0>, fu_flags);
|
|
<a name="l80"></a> tmpde = tmpde1 = </span><span class=cF5>FilesFind</span><span class=cF0>(files_find_mask, fuf_flags);
|
|
<a name="l81"></a> </span><span class=cF1>while</span><span class=cF0> (tmpde)
|
|
<a name="l82"></a> </span><span class=cF7>{</span><span class=cF0>
|
|
<a name="l83"></a> </span><span class=cF1>if</span><span class=cF0> (tmpde->datetime > cdt)
|
|
<a name="l84"></a> </span><span class=cF6>"%s\n"</span><span class=cF0>, tmpde->full_name;
|
|
<a name="l85"></a> tmpde = tmpde->next;
|
|
<a name="l86"></a> </span><span class=cF7>}</span><span class=cF0>
|
|
<a name="l87"></a> </span><span class=cF5>DirTreeDel</span><span class=cF0>(tmpde1);
|
|
<a name="l88"></a>}
|
|
</span></pre></body>
|
|
</html>
|