The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/boot/sac.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #include <u.h>
    2 #include <libc.h>
    3 #include <../boot/boot.h>
    4 
    5 /*
    6  * HACK - take over from boot since file system is not
    7  * available on a pipe
    8  */
    9 
   10 void
   11 configsac(Method *mp)
   12 {
   13         int fd;
   14         char cmd[64];
   15 
   16         USED(mp);
   17 
   18         /*
   19          *  create the name space, mount the root fs
   20          */
   21         if(bind("/", "/", MREPL) < 0)
   22                 fatal("bind /");
   23         if(bind("#C", "/", MAFTER) < 0)
   24                 fatal("bind /");
   25 
   26         /* fixed sysname - enables correct namespace file */
   27         fd = open("#c/sysname", OWRITE);
   28         if(fd < 0)
   29                 fatal("open sysname");
   30         write(fd, "brick", 5);
   31         close(fd);
   32 
   33         fd = open("#c/hostowner", OWRITE);
   34         if(fd < 0)
   35                 fatal("open sysname");
   36         write(fd, "brick", 5);
   37         close(fd);
   38 
   39         sprint(cmd, "/%s/init", cputype);
   40         print("starting %s\n", cmd);
   41         execl(cmd, "init", "-c", 0);
   42         fatal(cmd);
   43 }
   44 
   45 int
   46 connectsac(void)
   47 {
   48         /* does not get here */
   49         return -1;
   50 }

Cache object: eafe887c6243afe8bf54c17ffaf417be


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.