bernhard's patch to handle new style device names as well as old.

SVN revision: 11630
This commit is contained in:
Carsten Haitzler 2004-09-13 23:46:47 +00:00
parent f0c4481bdf
commit 95892eebdf
1 changed files with 8 additions and 2 deletions

View File

@ -450,8 +450,14 @@ fb_init(int vt, int device)
#if 0
if (vt != 0) fb_setvt(vt);
#endif
sprintf(dev, "/dev/fb%i", device);
if ((fb = open(dev, O_RDWR)) == -1)
sprintf(dev, "/dev/fb/%i", device);
fb = open(dev, O_RDWR);
if ( fb == -1 )
{
sprintf(dev, "/dev/fb%i", device);
fb = open(dev, O_RDWR);
}
if (fb == -1)
{
fprintf(stderr,"open %s: %s\n", dev, strerror(errno));
fb_cleanup();