<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://scarlet.deltasoft.com/index.php?action=history&amp;feed=atom&amp;title=QMfs</id>
	<title>QMfs - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://scarlet.deltasoft.com/index.php?action=history&amp;feed=atom&amp;title=QMfs"/>
	<link rel="alternate" type="text/html" href="https://scarlet.deltasoft.com/index.php?title=QMfs&amp;action=history"/>
	<updated>2026-04-19T06:30:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://scarlet.deltasoft.com/index.php?title=QMfs&amp;diff=416&amp;oldid=prev</id>
		<title>Karaken12: /* Installation instructions */ Gotta run in debug mode</title>
		<link rel="alternate" type="text/html" href="https://scarlet.deltasoft.com/index.php?title=QMfs&amp;diff=416&amp;oldid=prev"/>
		<updated>2009-05-08T07:52:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Installation instructions: &lt;/span&gt; Gotta run in debug mode&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 07:52, 8 May 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l29&quot; &gt;Line 29:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 29:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Create a directory to mount to (e.g. &amp;#039;qmfstest&amp;#039;).&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Create a directory to mount to (e.g. &amp;#039;qmfstest&amp;#039;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Make sure qm is running.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Make sure qm is running.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Start the demo with &amp;lt;pre&amp;gt;./qmfs qmfstest&amp;lt;/pre&amp;gt; (where qmfstest is the mountpoint)&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Start the demo with &amp;lt;pre&amp;gt;./qmfs qmfstest&amp;lt;/pre&amp;gt; (where qmfstest is the mountpoint)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.   &amp;#039;&amp;#039;&amp;#039;Warning&amp;#039;&amp;#039;&amp;#039; for some reason, I&amp;#039;m not sure why, it breaks unless you run in debug mode.  Add a &amp;#039;-d&amp;#039; to the line above to enable it.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Test it!  Try &amp;lt;pre&amp;gt;ls qmfstest&amp;lt;/pre&amp;gt; and &amp;lt;pre&amp;gt;cat qmfstest/SOMEITEM&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Test it!  Try &amp;lt;pre&amp;gt;ls qmfstest&amp;lt;/pre&amp;gt; and &amp;lt;pre&amp;gt;cat qmfstest/SOMEITEM&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# To unmount the filesystem, use &amp;lt;pre&amp;gt;fusermount -u qmfstest&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# To unmount the filesystem, use &amp;lt;pre&amp;gt;fusermount -u qmfstest&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Karaken12</name></author>
		
	</entry>
	<entry>
		<id>https://scarlet.deltasoft.com/index.php?title=QMfs&amp;diff=415&amp;oldid=prev</id>
		<title>Karaken12: Changed sectioning</title>
		<link rel="alternate" type="text/html" href="https://scarlet.deltasoft.com/index.php?title=QMfs&amp;diff=415&amp;oldid=prev"/>
		<updated>2009-05-07T11:42:59Z</updated>

		<summary type="html">&lt;p&gt;Changed sectioning&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 11:42, 7 May 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot; &gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Current status: &amp;#039;&amp;#039;&amp;#039;proof-of-concept&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Current status: &amp;#039;&amp;#039;&amp;#039;proof-of-concept&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Development Plan==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Limitations===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Limitations===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The account and filename are hardcoded&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* The account and filename are hardcoded&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Karaken12</name></author>
		
	</entry>
	<entry>
		<id>https://scarlet.deltasoft.com/index.php?title=QMfs&amp;diff=414&amp;oldid=prev</id>
		<title>Karaken12: More info about the current status</title>
		<link rel="alternate" type="text/html" href="https://scarlet.deltasoft.com/index.php?title=QMfs&amp;diff=414&amp;oldid=prev"/>
		<updated>2009-05-07T11:41:00Z</updated>

		<summary type="html">&lt;p&gt;More info about the current status&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 11:41, 7 May 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A Fuse-based filesystem that uses QMClient to access dynamic files.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A Fuse-based filesystem that uses QMClient to access dynamic files.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Current status: proof-of-concept&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Current status: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#039;&amp;#039;&amp;#039;&lt;/ins&gt;proof-of-concept&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#039;&amp;#039;&amp;#039;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;===Limitations===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* The account and filename are hardcoded&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* The filesystem is read-only&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* It does not deal with multifiles&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* It probably leaks memory (any good resources for how to check?)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* It will fail badly if things go wrong (e.g. qm isn&amp;#039;t started)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;===Future Improvements===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* &amp;#039;&amp;#039;Deal with the problems above&amp;#039;&amp;#039;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* Set it up to mount over the top of the system directory&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* Change it to allow a persistent QM connection ?&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* Remove dependencies on Fuse (you can package it up, I think)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* Add a preference for mark mapping&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* Export item names with special characters changed to their QM equivalents (e.g. &amp;#039;=&amp;#039; ⟼ &amp;#039;%E&amp;#039;)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Installation instructions==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Installation instructions==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Karaken12</name></author>
		
	</entry>
	<entry>
		<id>https://scarlet.deltasoft.com/index.php?title=QMfs&amp;diff=413&amp;oldid=prev</id>
		<title>Karaken12: A demo for QMfs</title>
		<link rel="alternate" type="text/html" href="https://scarlet.deltasoft.com/index.php?title=QMfs&amp;diff=413&amp;oldid=prev"/>
		<updated>2009-05-07T11:27:00Z</updated>

		<summary type="html">&lt;p&gt;A demo for QMfs&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A Fuse-based filesystem that uses QMClient to access dynamic files.&lt;br /&gt;
&lt;br /&gt;
Current status: proof-of-concept&lt;br /&gt;
&lt;br /&gt;
==Installation instructions==&lt;br /&gt;
# Install Fuse, along with the development files.  In Ubuntu, that&amp;#039;s fuse and fuse-dev.&lt;br /&gt;
# Make sure there&amp;#039;s a copy of libqmcli.so somewhere in your library paths (I did &amp;lt;pre&amp;gt;ln -s /usr/qmsys/bin/libqmcli.so /usr/lib/&amp;lt;/pre&amp;gt;, but it might already be there depending on your installation).&lt;br /&gt;
# Copy to code below to a file called qmfs.c (it doesn&amp;#039;t matter where).&lt;br /&gt;
# Compile: &amp;lt;pre&amp;gt;gcc -Wall `pkg-config fuse --cflags --libs` -lqmcli -I/usr/qmsys/gplsrc qmfs.c -o qmfs&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Create an account called TESTACC in the usual way.&lt;br /&gt;
# Create a (dynamic) file called TESTFILE in that account.&lt;br /&gt;
# Put some test data in it.&lt;br /&gt;
# Create a directory to mount to (e.g. &amp;#039;qmfstest&amp;#039;).&lt;br /&gt;
# Make sure qm is running.&lt;br /&gt;
# Start the demo with &amp;lt;pre&amp;gt;./qmfs qmfstest&amp;lt;/pre&amp;gt; (where qmfstest is the mountpoint)&lt;br /&gt;
# Test it!  Try &amp;lt;pre&amp;gt;ls qmfstest&amp;lt;/pre&amp;gt; and &amp;lt;pre&amp;gt;cat qmfstest/SOMEITEM&amp;lt;/pre&amp;gt;&lt;br /&gt;
# To unmount the filesystem, use &amp;lt;pre&amp;gt;fusermount -u qmfstest&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==File==&lt;br /&gt;
This is C code -- qmfs.c&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// QMFS -- an OpenQM filesystem wrapper, built on Fuse and QMConnect&lt;br /&gt;
&lt;br /&gt;
#define FUSE_USE_VERSION 26&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;fuse.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;fcntl.h&amp;gt;&lt;br /&gt;
#include &amp;lt;qmclient.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Some consts -- should stop being consts later.  :o)&lt;br /&gt;
static const char* account = &amp;quot;TESTACC&amp;quot;;&lt;br /&gt;
static const char* fileName = &amp;quot;TESTFILE&amp;quot;;&lt;br /&gt;
#define LIST_NO 1&lt;br /&gt;
#define QM_MARK (char) 254&lt;br /&gt;
&lt;br /&gt;
#define debugging 1&lt;br /&gt;
&lt;br /&gt;
/* Returns true if the item exists, false if not.&lt;br /&gt;
 * Requires there to be an open QMConnection first.&lt;br /&gt;
 */&lt;br /&gt;
static int itemExists(const int fileNo, const char* itemId) {&lt;br /&gt;
#ifdef debugging&lt;br /&gt;
printf(&amp;quot;itemExists(%d,\&amp;quot;%s\&amp;quot;)\n&amp;quot;, fileNo, itemId);&lt;br /&gt;
#endif&lt;br /&gt;
    int ret;&lt;br /&gt;
    // Get the list of items&lt;br /&gt;
    QMSelect(fileNo, LIST_NO);&lt;br /&gt;
    char* readList = QMReadList(LIST_NO);&lt;br /&gt;
    char* curPos = readList;&lt;br /&gt;
&lt;br /&gt;
    while(1) {&lt;br /&gt;
        curPos = strstr(curPos, itemId);&lt;br /&gt;
        if (curPos == NULL) {&lt;br /&gt;
            // the string was not found&lt;br /&gt;
            ret = 0;&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        // This is safe, since we know it contains the whole string&lt;br /&gt;
        curPos += strlen(itemId);&lt;br /&gt;
        if (strlen(curPos) == 0) {&lt;br /&gt;
            // we are at the end of the list, and the item matched.&lt;br /&gt;
            ret = 1;&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        if (curPos[0] == QM_MARK) {&lt;br /&gt;
            // the next char is a delimeter, so the string was found&lt;br /&gt;
            ret = 1;&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        // otherwise the itemid matched, but only the first part (e.g. &amp;#039;bob&amp;#039; matched &amp;#039;bobo&amp;#039;).&lt;br /&gt;
        // try again further up the list&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    QMFree(readList);&lt;br /&gt;
    return ret;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Gets the permissions (&amp;#039;attributes&amp;#039;) of a path.&lt;br /&gt;
 */&lt;br /&gt;
static int qm_getattr(const char *path, struct stat *stbuf) {&lt;br /&gt;
#ifdef debugging&lt;br /&gt;
printf(&amp;quot;qm_getattr(\&amp;quot;%s\&amp;quot;,stbuf)\n&amp;quot;, path);&lt;br /&gt;
#endif&lt;br /&gt;
    // An int representation of the perms.&lt;br /&gt;
    int res = 0;&lt;br /&gt;
    // Reset the stats&lt;br /&gt;
    memset(stbuf, 0, sizeof(struct stat));&lt;br /&gt;
    // If the path is just the root:&lt;br /&gt;
    if (strcmp(path, &amp;quot;/&amp;quot;) == 0) {&lt;br /&gt;
        // Permissions, and set as directory&lt;br /&gt;
        stbuf-&amp;gt;st_mode = S_IFDIR | 0775;&lt;br /&gt;
        // Number of hardlinks&lt;br /&gt;
        // Not quite sure how this works, but I think it&amp;#039;s -- &amp;#039;/&amp;#039; and &amp;#039;/.&amp;#039;&lt;br /&gt;
        stbuf-&amp;gt;st_nlink = 2;&lt;br /&gt;
    } else {&lt;br /&gt;
        // Get a connection&lt;br /&gt;
        int connect = QMConnectLocal(account);&lt;br /&gt;
        // QMConnectLocal returns 1 if connected and 0 if not&lt;br /&gt;
        // if not, can use QMError to retrive error message&lt;br /&gt;
        if (connect == 0) {&lt;br /&gt;
//            printf(&amp;quot;Could not get a connection.\n&amp;quot;);&lt;br /&gt;
            return -EIO;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        int fileNo = QMOpen(fileName);&lt;br /&gt;
        if (fileNo == 0) {&lt;br /&gt;
            // couldn&amp;#039;t open the file&lt;br /&gt;
//            printf(&amp;quot;Couldn&amp;#039;t open the file.\n&amp;quot;);&lt;br /&gt;
// TODO: this is bad; it leaks!&lt;br /&gt;
            return -EIO;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        char* itemId = path+1;&lt;br /&gt;
// IMPORTANT: might this cause an overflow if &amp;#039;path&amp;#039; is too small?&lt;br /&gt;
        if (itemExists(fileNo, itemId)) {&lt;br /&gt;
            // read the item to get the size&lt;br /&gt;
            int errNo;&lt;br /&gt;
            char* item = QMRead(fileNo, itemId, &amp;amp;errNo);&lt;br /&gt;
            // errNo contains SV_OK if it&amp;#039;s okay, SV_ELSE if it can&amp;#039;t be found (and&lt;br /&gt;
            // returns an empty string) or SV_ON_ERROR if there&amp;#039;s a real problem&lt;br /&gt;
            if (errno == SV_ON_ERROR) {&lt;br /&gt;
               // Do something drastic...&lt;br /&gt;
               //TODO decide what goes here!&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            // A regular file, and permissions&lt;br /&gt;
            stbuf-&amp;gt;st_mode = S_IFREG | 0444;&lt;br /&gt;
            // Number of hardlinks (just one)&lt;br /&gt;
            stbuf-&amp;gt;st_nlink = 1;&lt;br /&gt;
            // The filesize, in bytes&lt;br /&gt;
            stbuf-&amp;gt;st_size = strlen(item);&lt;br /&gt;
            &lt;br /&gt;
            // deallocate the item&lt;br /&gt;
            QMFree(item);&lt;br /&gt;
        } else {&lt;br /&gt;
            // An error value, to say (a component of) the path does not exist&lt;br /&gt;
            // (or the path is empty)&lt;br /&gt;
            res = -ENOENT;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // Close the connection&lt;br /&gt;
        QMDisconnect();&lt;br /&gt;
    }&lt;br /&gt;
    return res;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* List a directory&amp;#039;s contents.&lt;br /&gt;
 */&lt;br /&gt;
static int qm_readdir(const char *path, void *buf, fuse_fill_dir_t filler,&lt;br /&gt;
                      off_t offset, struct fuse_file_info *fi) {&lt;br /&gt;
    // path is the path, buf is where we put the file info&lt;br /&gt;
    // filler is a function which &amp;#039;fills&amp;#039; the buffer&lt;br /&gt;
    // I don&amp;#039;t know what offset or fi do.&lt;br /&gt;
#ifdef debugging&lt;br /&gt;
printf(&amp;quot;qm_readdir(\&amp;quot;%s\&amp;quot;, buf, filler, offset, fi)\n&amp;quot;, path);&lt;br /&gt;
//printf(&amp;quot;qm_readdir(\&amp;quot;%s\&amp;quot;, buf, filler, %d, fi)\n&amp;quot;, path, offset);&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
    (void) offset;&lt;br /&gt;
    (void) fi;&lt;br /&gt;
&lt;br /&gt;
    // Check if a real directory is begin asked for&lt;br /&gt;
    if (strcmp(path, &amp;quot;/&amp;quot;) != 0) {&lt;br /&gt;
        // No such path&lt;br /&gt;
        return -ENOENT;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Add the two standard dirs&lt;br /&gt;
    filler(buf, &amp;quot;.&amp;quot;, NULL, 0);&lt;br /&gt;
    filler(buf, &amp;quot;..&amp;quot;, NULL, 0);&lt;br /&gt;
&lt;br /&gt;
    // Get a connection&lt;br /&gt;
    int connect = QMConnectLocal(account);&lt;br /&gt;
    // QMConnectLocal returns 1 if connected and 0 if not&lt;br /&gt;
    // if not, can use QMError to retrive error message&lt;br /&gt;
    if (connect == 0) {&lt;br /&gt;
//        printf(&amp;quot;Could not get a connection.\n&amp;quot;);&lt;br /&gt;
        return -EIO;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    // Get the list of items&lt;br /&gt;
    int fileNo = QMOpen(fileName);&lt;br /&gt;
    if (fileNo == 0) {&lt;br /&gt;
        // couldn&amp;#039;t open the file&lt;br /&gt;
//        printf(&amp;quot;Couldn&amp;#039;t open the file.\n&amp;quot;);&lt;br /&gt;
// TODO: this is bad; it leaks!&lt;br /&gt;
        return -EIO;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    QMSelect(fileNo, LIST_NO);&lt;br /&gt;
    char* readList = QMReadList(LIST_NO);&lt;br /&gt;
    char* item;&lt;br /&gt;
&lt;br /&gt;
    for ( item = strtok(readList, &amp;quot;\xFE&amp;quot;);&lt;br /&gt;
          item != NULL;&lt;br /&gt;
          item = strtok(NULL, &amp;quot;\xFE&amp;quot;) ) {&lt;br /&gt;
        // Add them to the list&lt;br /&gt;
        filler(buf, item, NULL, 0);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Close the connection&lt;br /&gt;
    QMFree(readList);&lt;br /&gt;
    QMDisconnect();&lt;br /&gt;
    &lt;br /&gt;
    // No errors&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Open files for reading / writing.&lt;br /&gt;
 */&lt;br /&gt;
static int qm_open(const char *path, struct fuse_file_info *fi) {&lt;br /&gt;
#ifdef debugging&lt;br /&gt;
printf(&amp;quot;qm_open(\&amp;quot;%s\&amp;quot;, fi)\n&amp;quot;, path);&lt;br /&gt;
#endif&lt;br /&gt;
    // path -- path to open&lt;br /&gt;
    // fi -- how the file should be opened&lt;br /&gt;
    &lt;br /&gt;
    // Return value -- 0 for success&lt;br /&gt;
    int ret = 0;&lt;br /&gt;
&lt;br /&gt;
    // [Check path exists]&lt;br /&gt;
    // If the path is empty or is the directory&lt;br /&gt;
    if ((strlen(path) == 0) || strcmp(path, &amp;quot;/&amp;quot;) == 0) {&lt;br /&gt;
        // File does not exist&lt;br /&gt;
        return -ENOENT;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    // Get a connection&lt;br /&gt;
    int connect = QMConnectLocal(account);&lt;br /&gt;
    // QMConnectLocal returns 1 if connected and 0 if not&lt;br /&gt;
    // if not, can use QMError to retrive error message&lt;br /&gt;
    if (connect == 0) {&lt;br /&gt;
//        printf(&amp;quot;Could not get a connection.\n&amp;quot;);&lt;br /&gt;
        return -EIO;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    int fileNo = QMOpen(fileName);&lt;br /&gt;
    if (fileNo == 0) {&lt;br /&gt;
        // couldn&amp;#039;t open the file&lt;br /&gt;
//        printf(&amp;quot;Couldn&amp;#039;t open the file.\n&amp;quot;);&lt;br /&gt;
// TODO: this is bad; it leaks!&lt;br /&gt;
        return -EIO;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    char* itemId = path+1;&lt;br /&gt;
    if (itemExists(fileNo, itemId)) {&lt;br /&gt;
        // if the user wants to do anything other than reading&lt;br /&gt;
        if ((fi-&amp;gt;flags &amp;amp; 3) != O_RDONLY) {&lt;br /&gt;
            // permission denied&lt;br /&gt;
            ret = -EACCES;&lt;br /&gt;
        }&lt;br /&gt;
    } else {&lt;br /&gt;
        // set an error&lt;br /&gt;
        // file does not exist&lt;br /&gt;
        ret = -ENOENT;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Close the connection&lt;br /&gt;
    QMDisconnect();&lt;br /&gt;
&lt;br /&gt;
    return ret;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Read the contents of a file&lt;br /&gt;
 */&lt;br /&gt;
static int qm_read(const char *path, char *buf, size_t size, off_t offset,&lt;br /&gt;
                   struct fuse_file_info *fi) {&lt;br /&gt;
#ifdef debugging&lt;br /&gt;
printf(&amp;quot;qm_read(\&amp;quot;%s\&amp;quot;, buf, size, offset, fi)\n&amp;quot;, path);&lt;br /&gt;
//printf(&amp;quot;qm_read(\&amp;quot;%s\&amp;quot;, buf, %d, %d, fi)\n&amp;quot;, path, size, offset);&lt;br /&gt;
#endif&lt;br /&gt;
    // path   -- path to the file&lt;br /&gt;
    // buf    -- buffer into which to copy the info&lt;br /&gt;
    // size   -- size of buf / how much to read&lt;br /&gt;
    // offset -- read offset&lt;br /&gt;
    // fi     -- more file info (e.g. open for read only, write, etc.)&lt;br /&gt;
&lt;br /&gt;
    // ignore fi&lt;br /&gt;
    (void) fi;&lt;br /&gt;
    &lt;br /&gt;
    // number of bytes read&lt;br /&gt;
    size_t len;&lt;br /&gt;
&lt;br /&gt;
    // [Check path exists]&lt;br /&gt;
    // If the path is empty or is the directory&lt;br /&gt;
    if ((strlen(path) == 0) || strcmp(path, &amp;quot;/&amp;quot;) == 0) {&lt;br /&gt;
        // File does not exist&lt;br /&gt;
        return -ENOENT;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Get a connection&lt;br /&gt;
    int connect = QMConnectLocal(account);&lt;br /&gt;
    // QMConnectLocal returns 1 if connected and 0 if not&lt;br /&gt;
    // if not, can use QMError to retrive error message&lt;br /&gt;
    if (connect == 0) {&lt;br /&gt;
//        printf(&amp;quot;Could not get a connection.\n&amp;quot;);&lt;br /&gt;
        return -EIO;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Read the item&lt;br /&gt;
    int fileNo = QMOpen(fileName);&lt;br /&gt;
    if (fileNo == 0) {&lt;br /&gt;
        // couldn&amp;#039;t open the file&lt;br /&gt;
//        printf(&amp;quot;Couldn&amp;#039;t open the file.\n&amp;quot;);&lt;br /&gt;
// TODO: this is bad; it leaks!&lt;br /&gt;
        return -EIO;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    char* itemId = path+1;&lt;br /&gt;
    int errNo;&lt;br /&gt;
    char* item = QMRead(fileNo, itemId, &amp;amp;errNo);&lt;br /&gt;
    // errNo contains SV_OK if it&amp;#039;s okay, SV_ELSE if it can&amp;#039;t be found (and&lt;br /&gt;
    // returns an empty string) or SV_ON_ERROR if there&amp;#039;s a real problem&lt;br /&gt;
    if (errNo == SV_ON_ERROR) {&lt;br /&gt;
        // do something drastic!&lt;br /&gt;
        //TODO decide what goes here!&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // TODO: is this right?&lt;br /&gt;
    // If the item does not exist:&lt;br /&gt;
    if (errNo == SV_ELSE) {&lt;br /&gt;
        // file does not exist&lt;br /&gt;
        return -ENOENT;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Divide the data into chunks&lt;br /&gt;
    len = strlen(item);&lt;br /&gt;
&lt;br /&gt;
    if (offset &amp;lt; len) {&lt;br /&gt;
        if (offset + size &amp;gt; len) {&lt;br /&gt;
            size = len - offset;&lt;br /&gt;
        }&lt;br /&gt;
        memcpy(buf, item + offset, size);&lt;br /&gt;
    } else {&lt;br /&gt;
        size = 0;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Close connection&lt;br /&gt;
    QMFree(item);&lt;br /&gt;
    QMDisconnect();&lt;br /&gt;
    &lt;br /&gt;
    // return how much was actually read&lt;br /&gt;
    return size;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Structure containing the fuse operations implemented&lt;br /&gt;
 */&lt;br /&gt;
static struct fuse_operations qm_oper = {&lt;br /&gt;
    .getattr = qm_getattr,&lt;br /&gt;
    .readdir = qm_readdir,&lt;br /&gt;
    .open    = qm_open,&lt;br /&gt;
    .read    = qm_read,&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[]) {&lt;br /&gt;
    return fuse_main(argc, argv, &amp;amp;qm_oper, NULL);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Karaken12</name></author>
		
	</entry>
</feed>