busybox/libbb
Ron Yorston 298ac9507b lineedit: get PWD from ash
The line editing code and ash disagree when the current directory
is changed to a symbolic link:

   ~ $ mkdir real
   ~ $ ln -s real link
   ~ $ cd link
   ~/real $ pwd
   /home/rmyf36/link

Note the prompt says we're in ~/real.  Bash does:

   [rmy@random ~]$ cd link
   [rmy@random link]$ pwd
   /home/rmyf36/link

Ash uses the name supplied by the user while the line editing code
calls getcwd(3).  The discrepancy can be avoided by fetching the
value of PWD from ash.

Hush calls getcwd(3) when the directory is changed
so there's no disagreement with the line editing code.

There is no standard how shells should handle cd'ing into
symlinks.

function                                             old     new   delta
parse_and_put_prompt                                 838     869     +31

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-07-03 21:41:38 +02:00
..
appletlib.c style fix 2022-05-01 17:06:00 +02:00
ask_confirmation.c
auto_string.c
bb_askpass.c
bb_bswap_64.c
bb_cat.c
bb_do_delay.c
bb_getgroups.c
bb_getsockname.c
bb_pwd.c
bb_qsort.c
bb_strtod.c
bb_strtonum.c
bbunit.c
capability.c
change_identity.c
chomp.c
common_bufsiz.c
compare_string_array.c
concat_path_file.c
concat_subpath_file.c
Config.src libbb/sha1: update config help text with new performance numbers 2022-02-18 17:09:51 +01:00
const_hack.c Make const ptr assign as function call in clang 2021-10-09 22:30:45 +02:00
copy_file.c cp: implement -n 2021-06-22 15:28:34 +02:00
copyfd.c
correct_password.c
crc32.c
default_error_retval.c
device_open.c
die_if_bad_username.c
dump.c *: add NOINLINEs where code noticeably shrinks 2021-10-10 13:50:53 +02:00
duration.c
endofname.c
executable.c
fclose_nonstdin.c
fflush_stdout_and_exit.c libbb: fflush_stdout_and_exit(0) still exits with _error_ (not 0!) if fflush fails 2022-01-04 23:36:16 +01:00
fgets_str.c
find_mount_point.c
find_pid_by_name.c
find_root_device.c
full_write.c
get_console.c *: slap on a few ALIGN* where appropriate 2022-02-06 19:53:10 +01:00
get_cpu_count.c
get_last_path_component.c
get_line_from_file.c
get_shell_name.c
get_volsize.c
getopt32.c *: slap on a few ALIGN_PTR where appropriate 2022-02-06 20:07:12 +01:00
getopt_allopts.c
getpty.c
hash_md5_sha256_x86-32_shaNI.S libbb/sha256: explicitly use sha256rnds2's %xmm0 (MSG) argument 2022-02-12 00:52:12 +01:00
hash_md5_sha256_x86-64_shaNI.S libbb/sha256: explicitly use sha256rnds2's %xmm0 (MSG) argument 2022-02-12 00:52:12 +01:00
hash_md5_sha_x86-32_shaNI.S libbb/sha1: revert last commit: pshufb is a SSSE3 insn, can't use it 2022-02-11 14:53:26 +01:00
hash_md5_sha_x86-64_shaNI.S libbb/sha1: revert last commit: pshufb is a SSSE3 insn, can't use it 2022-02-11 14:53:26 +01:00
hash_md5_sha_x86-64.S whitespace fixes 2022-02-11 23:03:27 +01:00
hash_md5_sha_x86-64.S.sh whitespace fixes 2022-02-11 23:03:27 +01:00
hash_md5_sha.c libbb/sha256: optional x86 hardware accelerated hashing 2022-02-03 14:58:02 +01:00
hash_md5prime.c
herror_msg.c
human_readable.c
in_ether.c
inet_cksum.c
inet_common.c
inode_hash.c
isdirectory.c
isqrt.c
iterate_on_dir.c move iterate_on_dir() from e2fsprogs to libbb 2021-06-24 11:42:55 +02:00
Kbuild.src libbb/sha256: optional x86 hardware accelerated hashing 2022-02-03 14:58:02 +01:00
kernel_version.c
last_char_is.c
lineedit_ptr_hack.c
lineedit.c lineedit: get PWD from ash 2022-07-03 21:41:38 +02:00
llist.c
logenv.c
login.c
loop.c
make_directory.c
makedev.c
match_fstype.c
messages.c
missing_syscalls.c
mode_string.c libbb: clarify what bb_mode_string() generates 2021-09-17 17:10:38 +02:00
mtab.c
nuke_str.c
obscure.c
parse_config.c
parse_mode.c libbb: code shrink bb_parse_mode 2021-09-17 00:47:23 +02:00
percent_decode.c
perror_msg.c
perror_nomsg_and_die.c libbb: restore special handling of nomsg errors 2022-06-26 17:17:02 +02:00
perror_nomsg.c libbb: restore special handling of nomsg errors 2022-06-26 17:17:02 +02:00
pidfile.c
platform.c
print_flags.c
print_numbered_lines.c
printable_string.c
printable.c
process_escape_sequence.c
procps.c
progress.c
ptr_to_globals.c
pw_encrypt_des.c libbb: code shrink in des encryption, in setup_salt() 2021-11-28 12:21:23 +01:00
pw_encrypt_md5.c
pw_encrypt_sha.c
pw_encrypt.c
read_key.c libbb: shrink lineedit_read_key() 2022-01-18 00:36:42 +01:00
read_printf.c
read.c
README
recursive_action.c
remove_file.c libbb: do not check closedir() in remove_file() 2021-06-24 17:39:57 +02:00
replace.c
rtc.c
run_shell.c
safe_gethostname.c
safe_poll.c
safe_strncpy.c
safe_write.c
securetty.c
selinux_common.c
setup_environment.c libbb: introduce and use chdir_or_warn() 2022-01-13 12:56:10 +01:00
signals.c
simplify_path.c
single_argv.c
skip_whitespace.c
speed_table.c
str_tolower.c
strrstr.c
sysconf.c
time.c libbb: code shrink parse_datestr (again) 2021-09-18 22:55:46 +02:00
trim.c
u_signal_names.c
ubi.c
udp_io.c
unicode.c
update_passwd.c
utmp.c
uuencode.c
verror_msg.c
vfork_daemon_rexec.c libbb: code shrink: introduce and use [_]exit_SUCCESS() 2022-01-05 22:16:06 +01:00
warn_ignoring_args.c
wfopen_input.c
wfopen.c
write.c
xatonum_template.c
xatonum.c
xconnect.c libbb: reuse "bad port" error message string 2021-09-10 09:48:55 +02:00
xfunc_die.c
xfuncs_printf.c libbb: introduce and use chdir_or_warn() 2022-01-13 12:56:10 +01:00
xfuncs.c libbb: code shrink: introduce and use [_]exit_SUCCESS() 2022-01-05 22:16:06 +01:00
xgetcwd.c
xgethostbyname.c
xreadlink.c libbb: better coreutils compatibility for realpath 2021-10-09 01:47:12 +02:00
xrealloc_vector.c
xregcomp.c

Please see the LICENSE file for copyright information (GPLv2)

libbb is BusyBox's utility library.  All of this stuff used to be stuffed into
a single file named utility.c.  When I split utility.c to create libbb, some of
the very oldest stuff ended up without their original copyright and licensing
information (which is now lost in the mists of time).  If you see something
that you wrote that is mis-attributed, do let me know so we can fix that up.

	Erik Andersen
	<andersen@codepoet.org>