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.

55 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/vconfig-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/vconfig/main.c 2003-06-12 13:00:59.000000000 +0200
  23. +++ mol-2003-06-20-devfs/src/vconfig/main.c 2003-06-21 13:37:54.000000000 +0200
  24. @@ -99,10 +99,12 @@
  25. struct vt_stat vts;
  26. int fd;
  27. char vtname[32];
  28. + char vtname2[32];
  29. struct termios tio;
  30. - if ((fd = open("/dev/tty0", O_WRONLY)) < 0) {
  31. - fprintf(stderr, "failed to open /dev/tty0: %s\n", strerror(errno));
  32. + if ( (fd = open("/dev/tty0", O_WRONLY)) < 0 &&
  33. + (fd = open("/dev/vc/0", O_WRONLY)) < 0 ) {
  34. + fprintf(stderr, "failed to open /dev/tts0 or /dev/vc/0: %s\n", strerror(errno));
  35. return 1;
  36. }
  37. @@ -128,10 +130,12 @@
  38. /* open our vt */
  39. sprintf(vtname,"/dev/tty%d",vt_no);
  40. if ((console_fd = open(vtname, O_RDWR )) < 0) {
  41. - fprintf(stderr, "Cannot open %s (%s)\n",vtname, strerror(errno));
  42. - return 1;
  43. + sprintf(vtname2,"/dev/vc/%d",vt_no);
  44. + if ((console_fd = open(vtname2, O_RDWR )) < 0) {
  45. + fprintf(stderr, "Cannot open %s or %s (%s)\n",vtname, vtname, strerror(errno));
  46. + return 1;
  47. + }
  48. }
  49. -
  50. printf("Running MOL video configurator on VT%d\n", vt_no );
  51. #if 0
  52. /* set controlling tty */