Module Name:    src
Committed By:   tls
Date:           Sun Aug 10 06:52:29 UTC 2014

Modified Files:
        src/lib/librumpvfs [tls-earlyentropy]: rump_etfs.3

Log Message:
Rebase.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.2.1 src/lib/librumpvfs/rump_etfs.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librumpvfs/rump_etfs.3
diff -u src/lib/librumpvfs/rump_etfs.3:1.6 src/lib/librumpvfs/rump_etfs.3:1.6.2.1
--- src/lib/librumpvfs/rump_etfs.3:1.6	Thu Dec 19 15:51:39 2013
+++ src/lib/librumpvfs/rump_etfs.3	Sun Aug 10 06:52:29 2014
@@ -1,4 +1,4 @@
-.\"     $NetBSD: rump_etfs.3,v 1.6 2013/12/19 15:51:39 pooka Exp $
+.\"     $NetBSD: rump_etfs.3,v 1.6.2.1 2014/08/10 06:52:29 tls Exp $
 .\"
 .\" Copyright (c) 2010 Antti Kantee.  All rights reserved.
 .\"
@@ -23,7 +23,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 19, 2013
+.Dd June 13, 2014
 .Dt RUMP_ETFS 3
 .Os
 .Sh NAME
@@ -42,6 +42,8 @@ rump kernel (librump, \-lrump)
 .Fa "const char *key" "const char *hostpath" "enum rump_etfs_type ftype"
 .Fa "uint64_t begin" "uint64_t size"
 .Fc
+.Ft void
+.Fn rump_boot_etfs_register "struct rump_boot_etfs *eb"
 .Ft int
 .Fn rump_pub_etfs_remove "const char *key"
 .Sh DESCRIPTION
@@ -128,6 +130,56 @@ is given the special value
 the underlying file is mapped from
 .Ar begin
 to the end of the file.
+.It Fn rump_boot_etfs_register "eb"
+Unlike the above interfaces,
+.Fn rump_boot_etfs_register
+can and must be called before
+.Fn rump_init .
+It causes an etfs key to be available immediately when the root file
+system is mounted as part of
+.Fn rump_init .
+The intended use is for example for firmware images to be available
+immediately when device driver autoconfiguration is run as part of
+.Fn rump_init .
+.Pp
+To use
+.Fn rump_boot_etfs_register ,
+the client fills out
+.Fa eb .
+The layout of
+.Fa eb
+is as follows:
+.Bd -literal
+struct rump_boot_etfs {
+	/* client initializes */
+	const char *eb_key;
+	const char *eb_hostpath;
+	enum rump_etfs_type eb_type;
+	uint64_t eb_begin;
+	uint64_t eb_size;
+
+	/* rump kernel initializes */
+	struct rump_boot_etfs *_eb_next;
+	int eb_status;
+};
+.Ed
+.Pp
+All of the client fields must be initialized before the call.
+See
+.Fn rump_pub_etfs_register_withsize
+for descriptions of the fields.
+After the function has been called, the client may not touch the
+structure memory or the pathname pointers.
+After
+.Fn rump_init
+returns, the client may check the status of the registration from
+.Fa eb_status
+and free the structure.
+A value of \-1 designates that the etfs registration was not
+performed, 0 designates success and a value larger than 0 designates
+an errno.
+The client must serialize calls to
+.Fn rump_boot_etfs_register .
 .It Fn rump_pub_etfs_remove "key"
 Remove etfs mapping for
 .Fa key .

Reply via email to