From 4acdb46ff17a3dd966ddccdc149cda5a18d51a48 Mon Sep 17 00:00:00 2001
From: Denis Vlasenko <vda.linux@googlemail.com>
Date: Sat, 31 Jan 2009 21:45:57 +0000
Subject: ionice: new applet, adapted from Linux kernel' example by Walter
 Harms

   text    data     bss     dec     hex filename
1050316     924   10952 1062192  103530 busybox_old
1050758     924   10952 1062634  1036ea busybox_unstripped
---
 include/applets.h |  1 +
 include/usage.h   | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

(limited to 'include')

diff --git a/include/applets.h b/include/applets.h
index 63cc73867..af21a0d4a 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -193,6 +193,7 @@ USE_INOTIFYD(APPLET(inotifyd, _BB_DIR_SBIN, _BB_SUID_NEVER))
 USE_INSMOD(APPLET(insmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
 USE_MODPROBE_SMALL(APPLET_ODDNAME(insmod, modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER, modprobe))
 USE_INSTALL(APPLET(install, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
+USE_IONICE(APPLET(ionice, _BB_DIR_BIN, _BB_SUID_NEVER))
 #if ENABLE_FEATURE_IP_ADDRESS \
  || ENABLE_FEATURE_IP_ROUTE \
  || ENABLE_FEATURE_IP_LINK \
diff --git a/include/usage.h b/include/usage.h
index 9ceb3664f..cfe12c633 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -1932,7 +1932,7 @@
 
 /* -v, -b, -c are ignored */
 #define install_trivial_usage \
-       "[-cdDsp] [-o USER] [-g GRP] [-m MODE] [source] dest|directory"
+	"[-cdDsp] [-o USER] [-g GRP] [-m MODE] [source] dest|directory"
 #define install_full_usage "\n\n" \
        "Copy files and set attributes\n" \
      "\nOptions:" \
@@ -1948,6 +1948,14 @@
      "\n	-Z	Set security context" \
 	)
 
+#define ionice_trivial_usage \
+	"[-c 1-3] [-n 0-7] [-p PID] [PROG]"
+#define ionice_full_usage "\n\n" \
+       "Change I/O scheduling class and priority\n" \
+     "\nOptions:" \
+     "\n	-c	Class. 1:realtime 2:best-effort 3:idle" \
+     "\n	-n	Priority" \
+
 /* would need to make the " | " optional depending on more than one selected: */
 #define ip_trivial_usage \
        "[OPTIONS] {" \
-- 
cgit v1.2.3-55-g6feb