[Toybox] [PATCH] Implement file(1).

enh enh at google.com
Sat Feb 13 09:56:29 PST 2016


Unlike the POSIX file(1), there's no magic file here, just hard-coded
common (non-obsolete) file formats. Personally most of my use of file(1)
is as a one-line readelf(1) summarizer, so although I assume a full POSIX
file(1) is out of scope (because just the database would likely be larger
than all the rest of toybox), a subset that only supports in-use file types
actually covers most of the use cases I encounter personally.

Also fix peek_be/peek_le.
---
 lib/lib.c           |   7 +-
 toys/pending/file.c | 237 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 240 insertions(+), 4 deletions(-)
 create mode 100644 toys/pending/file.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Implement-file-1.patch
Type: text/x-patch
Size: 7861 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20160213/86be08ea/attachment-0004.bin>


More information about the Toybox mailing list