unplugged-system/external/toybox/toys/example
2025-10-06 13:59:42 +00:00
..
demo_many_options.c Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
demo_number.c Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
demo_scankey.c Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
demo_utf8towc.c Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
hello.c Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
hostid.c Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
logpath.c Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
README Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
skeleton.c Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00

Example commands

You probably don't want to deploy any of this.

The hello.c and skeleton.c commands provide templates for new commands. When
writing a new command, copying hello.c or skeleton.c to the new name may provide
a good starting point. (The minimal staring point is toys/posix/false.c)

  - hello.c is clean and simple, and an easy way to check the behavior of
    toybox library functions running in command context.

  - skeleton.c demonstrates the option parsing infrastructure and having
    multiple commands per file.

Some of the commands in here are test infrastructure:

  - logpath.c is optionally used by mkroot.sh and scripts/record-commands

  - demo_* demonstrates infrastructure, allowing tests/demo_*.test to
    regression test library functions directly.

hostid.c is an obsolete command still in posix and present on some recent
Linux systems, but not really useful on modern systems.