Date: Fri, 24 Oct 2008 15:34:31 -0700 From: "Steve Franks" <stevefranks@ieee.org> To: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: neophyte: tcsetattr() gives 22 error in i386, not in amd64? Message-ID: <539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi, I'm getting a 22 errno from tcsetattr() on 7-STABLE i386 in code which was working under 7-STABLE amd64. Serial device is a ucom (silabs cp2103). Permissions on /dev/cuaU0 look fine. Cutecom/Minicom appears to open the port without error... Ideas? Thanks, Steve if(cfsetspeed(&IspEnvironment->newtio,(speed_t) strtol(IspEnvironment->baud_rate,NULL,10))) { DebugPrintf(1, "baudrate %s not supported\n", IspEnvironment->baud_rate); exit(3); }; switch (atol(IspEnvironment->baud_rate)) { case 1152000: NEWTERMIOS_SETBAUDARTE(B1152000); break; default: { DebugPrintf(1, "unknown baudrate %s\n", IspEnvironment->baud_rate); exit(3); } } IspEnvironment->newtio.c_iflag = IGNPAR | IGNBRK | IXON | IXOFF; IspEnvironment->newtio.c_oflag = 0; /* set input mode (non-canonical, no echo,...) */ IspEnvironment->newtio.c_lflag = 0; cfmakeraw(&IspEnvironment->newtio); IspEnvironment->newtio.c_cc[VTIME] = 1; /* inter-character timer used */ IspEnvironment->newtio.c_cc[VMIN] = 0; /* blocking read until 0 chars received */ tcflush(IspEnvironment->fdCom, TCIFLUSH); int err = tcsetattr(IspEnvironment->fdCom, TCSANOW, &IspEnvironment->newtio);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?539c60b90810241534l6bedc5e3s1c2e3162c2a7ff38>