ash: in tryexec(), ensure we don't try to run embedded scripts as applets
[oweals/busybox.git] / console-tools / fgconsole.c
index 75fd98fd5635bddfbcf9f82241474b1cd9e11c39..a353becd5fb4b76cf4c8293118ad3d8b14f3023d 100644 (file)
@@ -4,8 +4,23 @@
  *
  * Copyright (C) 2010 by Grigory Batalov <bga@altlinux.org>
  *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
+//config:config FGCONSOLE
+//config:      bool "fgconsole (1.6 kb)"
+//config:      default y
+//config:      select PLATFORM_LINUX
+//config:      help
+//config:      This program prints active (foreground) console number.
+
+//applet:IF_FGCONSOLE(APPLET_NOEXEC(fgconsole, fgconsole, BB_DIR_USR_BIN, BB_SUID_DROP, fgconsole))
+
+//kbuild:lib-$(CONFIG_FGCONSOLE) += fgconsole.o
+
+//usage:#define fgconsole_trivial_usage
+//usage:       ""
+//usage:#define fgconsole_full_usage "\n\n"
+//usage:       "Get active console"
 
 #include "libbb.h"