]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[terminal] don't treat ttySx as VT
authorScott James Remnant <scott@ubuntu.com>
Thu, 18 Mar 2010 04:34:31 +0000 (04:34 +0000)
committerScott James Remnant <scott@ubuntu.com>
Thu, 18 Mar 2010 20:01:25 +0000 (20:01 +0000)
Only devices with TTY_MAJOR and minor from 0-63 are VTs, 64 onwards
are serial consoles.

src/libply-splash-core/ply-terminal.c

index 3e54075aad7febad3c0ed351882cece044f5ec77..aeb6159be8537c65248f7817122c31f94962ecb3 100644 (file)
@@ -292,7 +292,7 @@ ply_terminal_check_for_vt (ply_terminal_t *terminal)
   major_number = major (file_attributes.st_rdev);
   minor_number = minor (file_attributes.st_rdev);
 
-  if (major_number == TTY_MAJOR)
+  if ((major_number == TTY_MAJOR) && (minor_number <= MAX_NR_CONSOLES))
     terminal->vt_number = minor_number;
   else
     terminal->vt_number = -1;