unix 环境高级编程

    if (!strcmp(basename(argv[0]), "ueventd"))         return ueventd_main(argc, argv);

    /* clear the umask */     umask(0);

        /* Get the basic filesystem setup we need put          * together in the initramdisk on / and then we'll          * let the rc file figure out the rest.          */     mkdir("/dev", 0755);     mkdir("/proc", 0755);     mkdir("/sys", 0755);

    mount("tmpfs", "/dev", "tmpfs", MS_NOSUID, "mode=0755");     mkdir("/dev/pts", 0755);     mkdir("/dev/socket", 0755);     mount("devpts", "/dev/pts", "devpts", 0, NULL);     mount("proc", "/proc", "proc", 0, NULL);     mount("sysfs", "/sys", "sysfs", 0, NULL);

        /* indicate that booting is in progress to background fw loaders, etc */     close(open("/dev/.booting", O_WRONLY | O_CREAT, 0000));

转载于:https://www.cnblogs.com/hatreds/archive/2013/03/18/2967002.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值