• source navigation • diff markup • identifier search • freetext search •
Version: 2.6.29 2.6.30 2.6.31 2.6.32 2.6.33 2.6.34 2.6.35 2.6.36 2.6.37 2.6.38 2.6.39 3.0 3.1 3.2 3.3 3.4
Architecture: x86 arm avr32 blackfin m68k m68knommu microblaze mips powerpc sh
1 /* 2 * Functions for saving/restoring console. 3 * 4 * Originally from swsusp. 5 */ 6 7 #include <linux/vt_kern.h> 8 #include <linux/kbd_kern.h> 9 #include <linux/vt.h> 10 #include <linux/module.h> 11 #include "power.h" 12 13 #define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1) 14 15 static int orig_fgconsole, orig_kmsg; 16 17 int pm_prepare_console(void) 18 { 19 orig_fgconsole = vt_move_to_console(SUSPEND_CONSOLE, 1); 20 if (orig_fgconsole < 0) 21 return 1; 22 23 orig_kmsg = vt_kmsg_redirect(SUSPEND_CONSOLE); 24 return 0; 25 } 26 27 void pm_restore_console(void) 28 { 29 if (orig_fgconsole >= 0) { 30 vt_move_to_console(orig_fgconsole, 0); 31 vt_kmsg_redirect(orig_kmsg); 32 } 33 } 34
This page was automatically generated by LXR 0.3.1. • Linux is a registered trademark of Linus Torvalds