| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rationale for the jobs builtin in POSIX notes:
The jobs utility is not dependent on the job control option,
as are the seemingly related bg and fg utilities because jobs
is useful for examining background jobs, regardless of the
condition of job control. When the user has invoked a set +m
command and job control has been turned off, jobs can still be
used to examine the background jobs associated with that current
session. Similarly, kill can then be used to kill background
jobs with kill %<background job number>.
Although ash in busybox-w32 doesn't support job control it can
handle background jobs.
Allow the ASH_JOB_CONTROL setting to enable certain features:
- the jobs builtin;
- killing of jobs by job id in the kill builtin;
- monitoring of changes to jobs.
Since process groups aren't supported it's necessary to kill the
processes constituting a background job individually. When doing
this we ask kill(2) to kill all children too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create mingw_strptime() to return timezone offset as a separate
argument (since Microsoft's struct tm doesn't have the required
member).
Import timegm() from musl.
Update parse_datestr() to use mingw_strptime().
Enable FEATURE_TIMEZONE in the default configuration.
GitHub issue #230.
|
|
|
|
| |
Disable FEATURE_TIMEZONE for now.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a limited version of the 'fileformats' option. Only the
'dos,unix' and 'unix,dos' settings are allowed with the former
as default.
When a file is read for editing its format is detected. If it
only has LF line endings it's treated as being of type 'unix'
otherwise its type is 'dos'.
When an empty edit buffer is created it's given the first file
type listed in 'fileformats'.
The file type is stored in the read-only option 'fileformat'
and is used to select the appropriate line endings when the
file is written.
See GitHub issue #220. Adds 168 bytes to the binary.
|
|
|
|
|
| |
Disable ASH_OPTIMIZE_FOR_SIZE to pick up the ${v//pattern/repl}
speed up.
|
| |
|
|
|
|
|
| |
Enable the sync applet by default. It doesn't actually do anything
useful but at least it prevents some scripts from failing.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fill the uptime member of the sysinfo structure. With this change
we can:
- use sysinfo(2) in the 'ps' applet;
- enable the 'uptime' applet (though without useful support for
load averages).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an experimental implementation of sysinfo(2)/free(1).
It uses the WIN32 API GlobalMemoryStatusEx() to obtain information
about memory.
It seems that the 'total pagefile' value includes total RAM as well
as pagefile and 'available pagefile' includes available RAM. So the
RAM values are deducted.
I've no idea what corresponds to Linux buffers and cache.
|
|
|
|
|
|
| |
Use the WIN32 API GetProcessAffinityMask() to obtain the number
of processors configured and the number available to the current
process. This only works for up to 64 processors.
|
| |
|
|
|
|
|
|
|
| |
There doesn't seem to be much advantage in having readlink(2) as a
configuration option. Making it unconditional reduces divergence from
upstream and allows the removal of a check for ENOSYS that's been in
busybox-w32 since the start.
|
|
|
|
|
|
| |
Use a more accurate technique to map RGB colours to standard
Windows console colours. Since this costs 648 bytes it's
configurable but is enabled by default.
|
|
|
|
|
|
|
|
|
| |
Change the default 'skip ANSI emulation' setting which is used when
the environment variable BB_SKIP_ANSI_EMULATION is unset. Previously
it was 0 (always emulate) now it's 2 (detect whether or not the
terminal supports ANSI escape sequences and behave accordingly).
The default value is also now a build-time option.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Attempting to set file ownership and permissions may not work
exactly as on *NIX.
|
|
|
|
|
|
|
|
|
|
| |
The chattr and lsattr utilities allow file attributes to be changed
and displayed. Modify them to support Windows file attributes using
the same names as Cygwin.
Only allow a limited subset of attributes to be changed: just most of
those supported by SetFileAttributes(). Since it isn't possible to set
all attributes the '=' operator isn't allowed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change how busybox.exe expands wildcards on the command line.
When globbing is enabled at compile time provide an implementation
of _setargv(), which is run early during startup of C programs. This:
- enables globbing by setting _dowildcard to -1
- checks for the presence of the environment BB_GLOBBING
- if it exists and is set to 0 disables globbing
- if it doesn't exist sets BB_GLOBBING=0 but continues to apply
Windows' globbing in the current process
The consequences of this are:
- When busybox.exe is initially run from a Command Prompt Windows'
globbing is applied;
- Windows' globbing is turned off for future child processes, thus
allowing the shell re-execute busybox.exe without it interfering
with wildcards;
- this behaviour can be overridden by setting BB_GLOBBING explicitly.
Globbing can still be disabled at compile time if required. In that
case BB_GLOBBING has no effect.
With these changes globbing can be enabled by default and BusyBox
will do the right thing in most circumstances.
(See GitHub issues #172 and #189.)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use ReadDirectoryChangesW to implement inotifyd for WIN32.
There are limitations:
- It's only possible to watch directories, not files.
- The notification doesn't distinguish between different changes to
file state. All changes other than creation, deletion and renaming
are reported as 'c'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the WIN32 port inetd mode is used in the same way as in NOMMU
to process each new connection. However, it shares a problem with
NOMMU mode upstream: the child process changes directory unnecessarily.
Thus, 'httpd -fvvvp 8080 -h www' fails with errors:
httpd: can't change directory to 'www': No such file or directory
Fix this in the WIN32 port by not changing directory in inetd mode.
The behaviour of inetd mode is now quite unlike upstream so the option
have been changed to '-I' and removed from the help message.
Since the -e/-d options appear in the help message unconditionally
FEATURE_HTTPD_ENCODE_URL_STR has been enabled.
|
|
|
|
|
|
|
|
| |
Port the time applet to WIN32. This requires the implemntation of
a replacement for wait3(2).
Only elapsed, user and system times are supported, not the memory
and i/o statistics reported by GNU time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable the httpd applet in WIN32 default configurations. Some
additional features have also been enabled:
'Ranges:' header
Basic HTTP authentication
Custom error pages
GZIP content encoding
Common Gateway Interface (CGI) and related features are not enabled.
Basic HTTP authentication requires bb_simplify_abs_path_inplace().
This function shouldn't be used for WIN32 paths. In this case it's
processing a URL which is OK.
|
| |
|
|
|
|
|
|
| |
- Update configuration files
- Omit unnecessary libraries
- Replace fake stime(2) with fake clock_settime(2)
|
| |
|
|
|
|
|
|
| |
Commit 195902a64 (lineedit: improvements to tab completion) disabled
tab-completion of usernames. It was too heavy-handed, in that it
also removed tab-completion of '~/'.
|
|
|
|
|
|
|
|
|
|
|
| |
The 'reset' applet attempts to reset the screen. It's more thorough
than 'clear'.
Since it tries to reset the screen buffer for the current process
it has to be a NOFORK applet.
To run the Windows executable C:/Windows/System32/reset.exe use the
full path, as the 'reset' applet will take precedence.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a drive is mapped to a network share or a path display the
mapping in the 'Filesystem' column of df's output.
Since this changes the mnt_fsname field of the mntent structure
a slight alteration is needed to print_all_cwd() in ash.
Revert the change in commit a8c63f25b that enabled FEATURE_DF_FANCY
in the default configuration. None of the additional options is
very useful.
See GitHub issue #164.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Miscellaneous improvements:
- Enable '-a' option to display all filesystems in df(1).
- Detect the UDF CDROM filesystem and display it in 'stat -f'.
- Let getmntent(3) handle CDROM and floppy devices, ignoring those
that have no media.
- Set number of inodes and filesystem flags to 0 in statfs(2).
|
|
|
|
| |
Merge FEATURE_IDENTIFY_OWNER into FEATURE_EXTRA_FILE_DATA.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the undocumented 'runas' verb in a call to ShellExecuteEx()
to run a shell with elevated privileges.
Because of the way ShellExecuteEx() works this:
- requires that you acknowledge a User Account Control prompt (if
you're an Administrator);
- requires that you enter an Administrator's password (if you aren't
an Administrator);
- creates a separate console window for the privileged shell.
Variables from the parent shell aren't passed to its privileged child,
only variables from the environment.
It's possible to specify a command to run when the shell starts.
This can be used to pass shell variables:
su -c "HELLO='hello world'; GOODBYE=$GOODBYE"
Or do fancy things like:
su -c "ls -l; read -p 'Hit return to exit: '; exit"
It's probably best to put double quotes around the command and use
single quotes inside it. Apparently ShellExecuteEx() requires
double quotes to be entered in triplicate:
su -c 'HELLO="""hello world"""'
|
|
|
|
|
|
|
|
|
|
| |
Provide an implementation of readlink(2) based on code from Git
for Windows. This version only supports symbolic links, not
mount points, as the latter seem to work well enough as-is.
With this change the ls and stat applets can display the targets
of symbolic links. The readlink applet has been enabled in the
default configuration.
|
|
|
|
|
| |
Extend stat(2) so it tries to determine whether a file belongs to
the current user or not. If not it's said to belong to root.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
BusyBox's dpkg is marginally more useful than rpm because it maintains
package status.
Run the following commands to initialise the filesystem:
mkdir -p /var/lib/dpkg/info
touch /var/lib/dpkg/status
|
|
|
|
|
|
|
|
|
| |
The manifest included here wasn't effective in telling Windows
about version compatibility. Use the default manifest provided
by MinGW-w64 instead.
On Fedora this requires installing the mingw32-windows-default-manifest
and/or mingw64-windows-default-manifest packages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify the WIN32 implementation of stat(2) to fetch inode number,
device id and number of hardlinks. This requires opening a handle
to the target file so it will be slower.
A number of features can be enabled or start to work:
- tar can detect if an archive is being stored in itself;
- find can support the -inum and -links options;
- ls can display inode numbers;
- diff can detect attempts to compare a file with itself;
- du has better support for hardlinked files;
- cp can detect attempts to copy a file over itself.
|
| |
|
|
|
|
|
| |
Continue to use old version of dc; add definition of LONG_BIT from
xopen_lim.h.
|
|
|
|
|
| |
Source imported from https://github.com/win-iconv/win-iconv and
modified to build in busybox-w32.
|
|
|
|
|
|
|
|
|
|
| |
Since getpwent isn't implemented for WIN32 there's no point in
enabling FEATURE_USERNAME_COMPLETION.
Use case-insensitive comparisons when matching filenames.
The code to exclude non-executables when tab completing executables
is WIN32-specific and shouldn't omit directories.
|