aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2017-10-31 15:51:02 -0500
committerRob Landley <rob@landley.net>2017-10-31 15:51:02 -0500
commite913247fec162437920266182834aedadcb03004 (patch)
tree8f61ef4d6dfdb0d256279d4e5e34347f498aa13b /toys
parentb2d8cf906502226904e149e20279a899ba22e035 (diff)
downloadtoybox-e913247fec162437920266182834aedadcb03004.tar.gz
Rename test_*.c to demo_*.c (because "make test_$CMD" means something already),
fluff out README, and add a comment to hostid explaining its deprecation.
Diffstat (limited to 'toys')
-rw-r--r--toys/example/README10
-rw-r--r--toys/example/demo_human_readable.c (renamed from toys/example/test_human_readable.c)0
-rw-r--r--toys/example/demo_many_options.c (renamed from toys/example/test_many_options.c)0
-rw-r--r--toys/example/demo_scankey.c (renamed from toys/example/test_scankey.c)0
-rw-r--r--toys/example/demo_utf8towc.c (renamed from toys/example/test_utf8towc.c)0
-rw-r--r--toys/example/hostid.c3
6 files changed, 13 insertions, 0 deletions
diff --git a/toys/example/README b/toys/example/README
index d0f6631a..a3af8519 100644
--- a/toys/example/README
+++ b/toys/example/README
@@ -2,3 +2,13 @@ Example commands
You probably don't want to deploy this, but it shows how to use the
toybox infrastructure and provides templates for new commands.
+
+The hello.c and skeleton.c commands provide templates: hello.c is clean and
+simple, skeleton.c demonstrates the option parsing infrastructure and having
+multiple commands per file. When writing a new command, copying hello.c or
+skeleton.c to the new name may provide a good starting point.
+
+The demo_* commands demonstrate infrastructure.
+
+Other commands in here are obsolete versions still in some recent Linux systems
+(and often still in posix), but not really useful on modern systems.
diff --git a/toys/example/test_human_readable.c b/toys/example/demo_human_readable.c
index 9fff2626..9fff2626 100644
--- a/toys/example/test_human_readable.c
+++ b/toys/example/demo_human_readable.c
diff --git a/toys/example/test_many_options.c b/toys/example/demo_many_options.c
index e071d26c..e071d26c 100644
--- a/toys/example/test_many_options.c
+++ b/toys/example/demo_many_options.c
diff --git a/toys/example/test_scankey.c b/toys/example/demo_scankey.c
index db900270..db900270 100644
--- a/toys/example/test_scankey.c
+++ b/toys/example/demo_scankey.c
diff --git a/toys/example/test_utf8towc.c b/toys/example/demo_utf8towc.c
index f939eaa7..f939eaa7 100644
--- a/toys/example/test_utf8towc.c
+++ b/toys/example/demo_utf8towc.c
diff --git a/toys/example/hostid.c b/toys/example/hostid.c
index feef61bf..3d7a8a8c 100644
--- a/toys/example/hostid.c
+++ b/toys/example/hostid.c
@@ -3,6 +3,9 @@
* Copyright 2015 Ranjan Kumar <ranjankumar.bth@gmail.com>
*
* No Standard.
+ *
+ * This is still in coreutils and gethostid() in posix, but a "globally unique
+ * 32 bit identifier" is a concept the Linux world has outgrown.
USE_HOSTID(NEWTOY(hostid, ">0", TOYFLAG_USR|TOYFLAG_BIN))