]> xenbits.xensource.com Git - osstest/rumprun.git/commitdiff
Finish genfs -> cookfs rename.
authorAntti Kantee <pooka@iki.fi>
Wed, 10 Feb 2016 18:15:21 +0000 (18:15 +0000)
committerAntti Kantee <pooka@iki.fi>
Wed, 10 Feb 2016 18:17:19 +0000 (18:17 +0000)
Call the runtime counterpart, which prepares the cooked fs
for consumption, "platefs".

app-tools/cookfs.in
lib/librumprun_base/Makefile
lib/librumprun_base/genfs.c [deleted file]
lib/librumprun_base/genfs.h [deleted file]
lib/librumprun_base/platefs.c [new file with mode: 0644]
lib/librumprun_base/platefs.h [new file with mode: 0644]

index 1de45a36ce5aa517668223d8fccc0ac63bc4f054..d315d791028dfa56ba48646ae4058a57532e9bb5 100644 (file)
@@ -59,7 +59,7 @@ nuketmpdir ()
        rm -rf ${nukeme}
 }
 
-TMPDIR=$(mktemp -d /tmp/rumprun-genfs.XXXXXX)
+TMPDIR=$(mktemp -d /tmp/rumprun-cookfs.XXXXXX)
 trap nuketmpdir 0 INT TERM
 LINKPATH=${TMPDIR}/linkme
 LINKPATH_BIN="_binary_$(echo ${LINKPATH} | tr '/.-' '_')"
@@ -199,7 +199,7 @@ printhead ()
        printf 'static struct rumprun_extfile files[] = {\n' 1>&4
 
        printf '#include <sys/types.h>\n\n'
-       printf '#include <rumprun/genfs.h>\n\n'
+       printf '#include <rumprun/platefs.h>\n\n'
 }
 
 printtail ()
@@ -211,7 +211,7 @@ printtail ()
        printf 'static void __attribute__((constructor))\n'
        printf 'rumpfs_externatilize(void)\n'
        printf '{\n\n'
-       printf '\trumprun_genfs(dirlist, __arraycount(dirlist),\n'
+       printf '\trumprun_platefs(dirlist, __arraycount(dirlist),\n'
        printf '\t    files, __arraycount(files));\n'
        printf '}\n'
 }
index e6c556cabafdd49356fa5c5505ca7e5d05594a9b..1426205dd5f07f885961e77dbd98fcee8b86f5db 100644 (file)
@@ -10,9 +10,9 @@ SRCS+=                sysproxy.c
 
 # doesn't really belong here, but at the moment we don't have
 # a rumpkernel-only "userspace" lib
-SRCS+=         genfs.c
+SRCS+=         platefs.c
 
-INCS=          genfs.h
+INCS=          platefs.h
 INCSDIR=       /usr/include/rumprun
 
 WARNS=         5
diff --git a/lib/librumprun_base/genfs.c b/lib/librumprun_base/genfs.c
deleted file mode 100644 (file)
index 7416a71..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-
- * Copyright (c) 2016 Antti Kantee <pooka@fixup.fi>
- * All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/types.h>
-
-#include <bmk-core/core.h>
-#include <bmk-core/sched.h>
-
-#include <rump/rump.h>
-#include <rump/rumpfs.h>
-#include <rump/rump_syscalls.h>
-
-#include <rumprun/genfs.h>
-
-void
-rumprun_genfs(const char **dirs, size_t ndirs,
-       struct rumprun_extfile *refs, size_t nrefs)
-{
-       unsigned i;
-       int fd;
-
-       for (i = 0; i < ndirs; i++) {
-               if (rump_sys_mkdir(dirs[i], 0777) == -1) {
-                       if (*bmk_sched_geterrno() != RUMP_EEXIST)
-                               bmk_platform_halt("genfs: mkdir");
-               }
-       }
-
-
-       for (i = 0; i < nrefs; i++) {
-               if ((fd = rump_sys_open(refs[i].ref_fname,
-                   RUMP_O_CREAT | RUMP_O_RDWR | RUMP_O_EXCL, 0777)) == -1)
-                       bmk_platform_halt("genfs: open");
-               if (rump_sys_fcntl(fd, RUMPFS_FCNTL_EXTSTORAGE_ADD,
-                   &refs[i].ref_es) == -1)
-                       bmk_platform_halt("genfs: fcntl");
-               rump_sys_close(fd);
-       }
-}
diff --git a/lib/librumprun_base/genfs.h b/lib/librumprun_base/genfs.h
deleted file mode 100644 (file)
index 93aa480..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-
- * Copyright (c) 2016 Antti Kantee <pooka@fixup.fi>
- * All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef _RUMPRUN_GENFS_H_
-#define _RUMPRUN_GENFS_H_
-
-#include <rump/rumpfs.h>
-
-struct rumprun_extfile {
-        const char *ref_fname;
-        struct rumpfs_extstorage ref_es;
-};
-
-void   rumprun_genfs(const char **, size_t, struct rumprun_extfile *, size_t);
-
-#endif /* _RUMPRUN_GENFS_H_ */
diff --git a/lib/librumprun_base/platefs.c b/lib/librumprun_base/platefs.c
new file mode 100644 (file)
index 0000000..15d5c63
--- /dev/null
@@ -0,0 +1,62 @@
+/*-
+ * Copyright (c) 2016 Antti Kantee <pooka@fixup.fi>
+ * All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/types.h>
+
+#include <bmk-core/core.h>
+#include <bmk-core/sched.h>
+
+#include <rump/rump.h>
+#include <rump/rumpfs.h>
+#include <rump/rump_syscalls.h>
+
+#include <rumprun/platefs.h>
+
+void
+rumprun_platefs(const char **dirs, size_t ndirs,
+       struct rumprun_extfile *refs, size_t nrefs)
+{
+       unsigned i;
+       int fd;
+
+       for (i = 0; i < ndirs; i++) {
+               if (rump_sys_mkdir(dirs[i], 0777) == -1) {
+                       if (*bmk_sched_geterrno() != RUMP_EEXIST)
+                               bmk_platform_halt("platefs: mkdir");
+               }
+       }
+
+
+       for (i = 0; i < nrefs; i++) {
+               if ((fd = rump_sys_open(refs[i].ref_fname,
+                   RUMP_O_CREAT | RUMP_O_RDWR | RUMP_O_EXCL, 0777)) == -1)
+                       bmk_platform_halt("platefs: open");
+               if (rump_sys_fcntl(fd, RUMPFS_FCNTL_EXTSTORAGE_ADD,
+                   &refs[i].ref_es) == -1)
+                       bmk_platform_halt("platefs: fcntl");
+               rump_sys_close(fd);
+       }
+}
diff --git a/lib/librumprun_base/platefs.h b/lib/librumprun_base/platefs.h
new file mode 100644 (file)
index 0000000..45d8bfe
--- /dev/null
@@ -0,0 +1,40 @@
+/*-
+ * Copyright (c) 2016 Antti Kantee <pooka@fixup.fi>
+ * All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _RUMPRUN_GENFS_H_
+#define _RUMPRUN_GENFS_H_
+
+#include <rump/rumpfs.h>
+
+struct rumprun_extfile {
+        const char *ref_fname;
+        struct rumpfs_extstorage ref_es;
+};
+
+void   rumprun_platefs(const char **, size_t,
+                       struct rumprun_extfile *, size_t);
+
+#endif /* _RUMPRUN_GENFS_H_ */