Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2009-08-03 19:21:22 -0400
committereutarass2009-08-03 19:21:22 -0400
commitffc4fe052136d8a434ccb6aa811846ece34d8fcc (patch)
tree391807005a71016c7e0e9103b369b421e030d319
parent8f2a5ca08634758f7fedb09d43d107cbb5e4fe4f (diff)
downloadorg.eclipse.tcf-ffc4fe052136d8a434ccb6aa811846ece34d8fcc.tar.gz
org.eclipse.tcf-ffc4fe052136d8a434ccb6aa811846ece34d8fcc.tar.xz
org.eclipse.tcf-ffc4fe052136d8a434ccb6aa811846ece34d8fcc.zip
TCF Agent: module asyncreq.c now uses POSIX Asynchronous I/O when available.
File System service read and write commands now allow offset = -1, which means no seek. Useful for reading/writing pipes and serial devices.
-rw-r--r--docs/TCF Service - File System.html6
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java2
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/TCF Service - File System.html b/docs/TCF Service - File System.html
index 8bef5f3f6..51666f56e 100644
--- a/docs/TCF Service - File System.html
+++ b/docs/TCF Service - File System.html
@@ -243,7 +243,7 @@ C &bull; <i>&lt;token&gt;</i> &bull; FileSystem &bull; read &bull; <i>&lt;string
<p>The command reads bytes from an open file.
In response to this request, the server will read as many bytes as it
-can from the file (up to `len'), and return them in a byte array.
+can from the file (up to `size'), and return them in a byte array.
If an error occurs or EOF is encountered, the server may return
fewer bytes then requested. Replay argument 'error report'
will be not null in case of error, and argument 'eof' will be
@@ -251,6 +251,8 @@ true in case of EOF. For normal disk files, it is guaranteed
that this will read the specified number of bytes, or up to end of file
or error. For e.g. device files this may return fewer bytes than requested.</p>
+<p>If 'offset' < 0 then reading will start from current position in the file.</p>
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
@@ -272,6 +274,8 @@ It is legal to write way beyond the end of the file; the semantics
are to write zeroes from the end of the file to the specified offset
and then the data. <i>&lt;string: data&gt;</i> is Base64 encoded array of data bytes.</p>
+<p>If 'offset' < 0 then writing will start from current position in the file.</p>
+
<p>Reply:</p>
<pre><b><font face="Courier New" size=2 color=#333399>
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java
index 0c4e62ed4..944ad252e 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IFileSystem.java
@@ -378,6 +378,7 @@ public interface IFileSystem extends IService {
* @param handle is an open file handle returned by open().
* @param offset is the offset (in bytes) relative
* to the beginning of the file from where to start reading.
+ * If offset < 0 then reading starts from current position in the file.
* @param len is the maximum number of bytes to read.
* @param done is call back object.
* @return pending command handle.
@@ -398,6 +399,7 @@ public interface IFileSystem extends IService {
* @param handle is an open file handle returned by open().
* @param offset is the offset (in bytes) relative
* to the beginning of the file from where to start writing.
+ * If offset < 0 then writing starts from current position in the file.
* @param data is byte array that contains data for writing.
* @param data_pos if offset in 'data' of first byte to write.
* @param data_size is the number of bytes to write.

Back to the top