xf86OpenSerial: Add support server managed fds
Try to get a server managed fd from the Options before trying to open the device node ourselves. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
d9a4059d40
commit
bf3543739d
|
@ -124,7 +124,11 @@ xf86OpenSerial(XF86OptionPtr options)
|
|||
return -1;
|
||||
}
|
||||
|
||||
SYSCALL(fd = open(dev, O_RDWR | O_NONBLOCK));
|
||||
fd = xf86CheckIntOption(options, "fd", -1);
|
||||
|
||||
if (fd == -1)
|
||||
SYSCALL(fd = open(dev, O_RDWR | O_NONBLOCK));
|
||||
|
||||
if (fd == -1) {
|
||||
xf86Msg(X_ERROR,
|
||||
"xf86OpenSerial: Cannot open device %s\n\t%s.\n",
|
||||
|
|
Loading…
Reference in New Issue
Block a user