+ char buf[st.st_size];
+ long offset = 0;
+ do {
+ long rc = read (fd, buf + offset, st.st_size - offset);
+ if (rc == -1) {
+ perror ("insmod: read");
+ exit (EXIT_FAILURE);
+ }
+ offset += rc;
+ } while (offset < st.st_size);
+ close (fd);
+
+ if (init_module (buf, st.st_size, "") != 0) {
+ fprintf (stderr, "insmod: init_module: %s: %m\n", filename);
+ /* However ignore the error because this can just happen because
+ * of a missing device.
+ */
+ }
+}
+
+/* Mount /proc unless it's mounted already. */
+static void
+mount_proc (void)
+{
+ if (access ("/proc/uptime", R_OK) == -1) {
+ mkdir ("/proc", 0755);
+
+ if (verbose)
+ fprintf (stderr, "febootstrap: mounting /proc\n");