Simplify serial_open
* src/sysdep.c (serial_open): On failure, simply return -1 and set errno; do not call report_file_error, as the caller is supposed to do that if needed.
This commit is contained in:
parent
b3b3e203cc
commit
fe33900747
1 changed files with 2 additions and 3 deletions
|
|
@ -2980,10 +2980,9 @@ int
|
|||
serial_open (Lisp_Object port)
|
||||
{
|
||||
int fd = emacs_open (SSDATA (port), O_RDWR | O_NOCTTY | O_NONBLOCK, 0);
|
||||
if (fd < 0)
|
||||
report_file_error ("Opening serial port", port);
|
||||
#ifdef TIOCEXCL
|
||||
ioctl (fd, TIOCEXCL, (char *) 0);
|
||||
if (0 <= fd)
|
||||
ioctl (fd, TIOCEXCL, (char *) 0);
|
||||
#endif
|
||||
|
||||
return fd;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue