- if ((err = (statement))) { \
- syslog(2, #statement " failed: %d", err); \
- return err; \
+ if ((err = (statement)) < 0) { \
+ syslog(2, #statement " failed: %d", err); \
+ _exit(1); \
term.c_iflag = ICRNL | IGNBRK;
term.c_oflag = ONLCR | OPOST;
term.c_cflag = CREAD | CLOCAL | CS8 | CPARENB;
term.c_iflag = ICRNL | IGNBRK;
term.c_oflag = ONLCR | OPOST;
term.c_cflag = CREAD | CLOCAL | CS8 | CPARENB;
must_mount(NULL, "/sys", "twifs", MNT_RO);
must_mount(NULL, "/task", "taskfs", MNT_RO);
must_mount(NULL, "/sys", "twifs", MNT_RO);
must_mount(NULL, "/task", "taskfs", MNT_RO);
- if ((err = open("/dev/tty", 0)) < 0) {
- syslog(2, "fail to open tty (%d)\n", errno);
- return err;
- }
+ int fd = check(open("/dev/tty", 0));
- if ((err = symlink("/usr", "/mnt/lunaix-os/usr"))) {
- syslog(2, "symlink /usr:/mnt/lunaix-os/usr (%d)\n", errno);
- return err;
- }
+ check(symlink("/usr", "/mnt/lunaix-os/usr"));
if (!(pid = fork())) {
err = execve("/usr/bin/sh", NULL, NULL);
printf("fail to execute (%d)\n", errno);
if (!(pid = fork())) {
err = execve("/usr/bin/sh", NULL, NULL);
printf("fail to execute (%d)\n", errno);