Implement support for the POSIX `type` command. Only POSIX stuff is
supported here, no bash extensions like -p or -P.
In the process, split the $PATH searching code out of builtin_source() and
into its own find_in_path() function so we don't duplicate it.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Attached a start for POSIX conformance documentation for busybox (see
TODO file and discussion last week).
A table of all options as defined by POSIX and as implemented by
busybox (see for a FreeBSD example
http://people.freebsd.org/~schweikh/posix-utilities.html).
Only the tools that are stand-alone applets are documented (not ash
built-ins as 'read'), as there are multiple shells.
When there are two versions (echo) the stand-alone version was
checked. I think this may be the wrong way to go, as most users will
probably use the built-in version - but which shell?
The table was auto-generated by running, for each POSIX utility,
latest git allyesconfig* "busybox <tool> --help" and parsing the
output, and comparing that to tool options extracted from its man page
at http://www.opengroup.org/onlinepubs/9699919799/.
This means that it the usage string is not correct, the table is also
wrong. I noticed that for 'kill', for example, the usage string does
not mention the -s, -q, -o options.
For each option is set whether it exists in busybox and if it is, is
it compliant to the standard. Of course, checking compliance can only
be done manually - a process which will probably take some time (see
'cat' for example).
I didn't post the auto-generation script (python, ugly) because the
table will now change manually; I can post it if there is anyone
interested.
As for the tools not implemented by busybox at all, I think most of
them are indeed fairly esotetic. Some I was suprised to see missing
are link, file, newgrp, unlink.
* Well, almost allyesconfig - but nothing very POSIX-y was disabled.
Signed-off-by: David Krakov <krakov@gmail.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
login: consider platforms having no domainname field in the utsname struct
include/platform.h: define IUCLC to 0 on platforms where it is not defined
Signed-off-by: Luca Favatella <slackydeb@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This makes line editing able to recognize case when
cursor was not at the beginning of the line. It may also
be adapted later to find out display size (serial line users
would love it).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
The helper script needs updating to match latest busybox modprobe behavior
in that all dependencies need to be listed, not just the immediate ones.
Along the way, fix symbol prefixed ports, optimize the output, and add
some more depmod compatible options.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
We can't use C if(...) with ENABLE_FEATURE_TAR_UNAME_GNAME because it
relies on conditional members in the file_header_t structure:
archival/libunarchive/data_extract_all.c: In function ‘data_extract_all’:
archival/libunarchive/data_extract_all.c:123: error: ‘file_header_t’ has no member named ‘uname’
archival/libunarchive/data_extract_all.c:124: error: ‘file_header_t’ has no member named ‘uname’
archival/libunarchive/data_extract_all.c:127: error: ‘file_header_t’ has no member named ‘gname’
archival/libunarchive/data_extract_all.c:128: error: ‘file_header_t’ has no member named ‘gname’
make[1]: *** [archival/libunarchive/data_extract_all.o] Error 1
Signed-off-by: Mike Frysinger <vapier@gentoo.org>