File 0366-kernel-Clarify-file-pwrite-pread-documentation.patch of Package erlang

From 9d3a92bc6bc40be676429d06350311d4b154eec7 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Mon, 24 Aug 2020 15:10:27 +0200
Subject: [PATCH] kernel: Clarify file:pwrite/pread documentation

about ram mode
---
 lib/kernel/doc/src/file.xml | 29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)

diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml
index fc25e83d40..79c49614d1 100644
--- a/lib/kernel/doc/src/file.xml
+++ b/lib/kernel/doc/src/file.xml
@@ -1268,15 +1268,12 @@ f.txt:  {person, "kalle", 25}.
       <desc>
         <p>Combines <c>position/2</c> and <c>read/2</c> in one
           operation, which is more efficient than calling them one at a
-          time. If <c><anno>IoDevice</anno></c> is opened in <c>raw</c> mode,
-          some restrictions apply:</p>
-	  <list type="bulleted">
-	    <item><c><anno>Location</anno></c> is only allowed to be an
-            integer.</item>
-	    <item>The current position of the file is undefined after the
-	    operation.</item>
-	  </list>
-	  <p>As the position is specified as a byte-offset, take special caution
+          time.</p>
+	<p><c><anno>Location</anno></c> is only allowed to be an
+          integer for <c>raw</c> and <c>ram</c> modes.</p>
+	<p>The current position of the file after the operation
+	  is undefined for <c>raw</c> mode and unchanged for <c>ram</c> mode.</p>
+	<p>As the position is specified as a byte-offset, take special caution
 	  when working with files where <c>encoding</c> is set to something else
 	  than <c>latin1</c>, as not every byte position is a valid character
 	  boundary on such a file.</p>
@@ -1303,14 +1300,12 @@ f.txt:  {person, "kalle", 25}.
       <desc>
         <p>Combines <c>position/2</c> and <c>write/2</c> in one
           operation, which is more efficient than calling them one at a
-          time. If <c><anno>IoDevice</anno></c> has been opened in <c>raw</c> mode,
-          some restrictions apply:</p>
-	  <list type="bulleted">
-	    <item><c><anno>Location</anno></c> is only allowed to be an
-            integer.</item>
-	    <item>The current position of the file is undefined after the
-	    operation.</item>
-	  </list>
+          time.
+	</p>
+	<p><c><anno>Location</anno></c> is only allowed to be an
+          integer for <c>raw</c> and <c>ram</c> modes.</p>
+	<p>The current position of the file after the operation
+	  is undefined for <c>raw</c> mode and unchanged for <c>ram</c> mode.</p>
 	<p>When positioning in a file with other <c>encoding</c> than <c>latin1</c>,
 	caution must be taken to set the position on a correct character boundary.
 	For details, see <seemfa marker="#position/2"><c>position/2</c></seemfa>.</p>
-- 
2.26.2

openSUSE Build Service is sponsored by