mirror of
https://github.com/X11Libre/xserver.git
synced 2026-11-15 05:23:40 +00:00
kdrive/fbdev: Try the /dev/fb symlink first
Signed-off-by: stefan11111 <stefan11111github@gmail.com>
This commit is contained in:
parent
7fecda3074
commit
d2c26a5be0
1 changed files with 3 additions and 2 deletions
|
|
@ -51,8 +51,9 @@ fbdevInitialize(KdCardInfo * card, FbdevPriv * priv)
|
|||
card->mynum, config->fbdevDevicePath);
|
||||
} else {
|
||||
char devbuf[] = "/dev/fbxx";
|
||||
priv->fd = -1;
|
||||
for (int i = 0; i < 32 && priv->fd < 0; i++) {
|
||||
memcpy(devbuf, "/dev/fb", sizeof("/dev/fb"));
|
||||
priv->fd = open("/dev/fb", O_RDWR);
|
||||
for (int i = 0; i < 32 && (priv->fd < 0); i++) {
|
||||
snprintf(devbuf, sizeof(devbuf),
|
||||
"/dev/fb%d", i);
|
||||
priv->fd = open(devbuf, O_RDWR);
|
||||
|
|
|
|||
Loading…
Reference in a new issue