Port-sparc64 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Console output on sun4v
I'm running the following custom init process in sun4v LDOM with
NetBSD-11
#include <fcntl.h>
#include <unistd.h>
int main(void)
{
int fd;
fd = open("/dev/console", O_WRONLY);
if (fd != 1) {
dup2(fd, 1);
close(fd);
}
while (1)
{
write(STDOUT_FILENO, "test\n", 5);
sleep(2);
}
}
But write() syscalls return error:
[ 2.1132573] init path (default /sbin/init): /myinit
[ 4.0965763] init: copying out path `/myinit' 8
...
[ 70.5317095] proc 1 (myinit): netbsd num 4 call: write(0x1, 0x1921d8, 0x5)
[ 70.5317095] proc 1 (myinit): netbsd num 4 ret write: err = 9, rv = 0x0,0x0
[ 70.5317095] proc 1 (myinit): netbsd num 430 call: __nanosleep50(0xffffffffffffd7a0, 0xffffffffffffd7b0)
Same code works correctly on sun4u NetBSD-9.4
Any idea if the errors are related to unfinished console drivers for
sun4v or something else?
Home |
Main Index |
Thread Index |
Old Index