mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
2.0 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/powerpc/mol/console-driver-devfs.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. --- mol-2003-06-20/src/drivers/console.c 2003-06-12 13:00:59.000000000 +0200
  23. +++ mol-2003-06-20-devfs/src/drivers/console.c 2003-06-21 19:43:11.000000000 +0200
  24. @@ -359,11 +359,13 @@
  25. {
  26. struct vt_stat vts;
  27. char vtname[32];
  28. + char vtname2[32];
  29. int vt_no = get_numeric_res( "vt" ); /* -1 if missing */
  30. int fd;
  31. - if( (fd=open("/dev/tty0", O_WRONLY)) < 0 ) {
  32. - printm("failed to open /dev/tty0: %s\n", strerror(errno));
  33. + if( (fd=open("/dev/tty0", O_WRONLY)) < 0 &&
  34. + (fd=open("/dev/vc/0", O_WRONLY)) < 0) {
  35. + printm("failed to open /dev/tty0 or /dev/vc/0: %s\n", strerror(errno));
  36. return 1;
  37. }
  38. @@ -396,8 +398,11 @@
  39. /* open our vt */
  40. sprintf( vtname, "/dev/tty%d", vt_no );
  41. if( (fd=open(vtname, O_RDWR | O_NONBLOCK )) < 0) {
  42. - perrorm("Cannot open %s", vtname );
  43. - return 1;
  44. + sprintf( vtname2, "/dev/vc/%d", vt_no );
  45. + if( (fd=open(vtname2, O_RDWR | O_NONBLOCK )) < 0) {
  46. + perrorm("Cannot open %s or %s", vtname, vtname2 );
  47. + return 1;
  48. + }
  49. }
  50. /* set controlling tty */