Commit Graph

374 Commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen 8a4548db7d Add memory statistics to struct psctl_stat.
This is an incompatible ABI change.
2023-03-09 20:27:18 +01:00
Jonas 'Sortie' Termansen 2cd7361294 Add memusage(2).
Switch xz to memusage(2) and fix native self-cross issue.

This is a compatible ABI change.
2023-03-09 20:27:17 +01:00
Jonas 'Sortie' Termansen 4056332747 Fix missing nc.1 file. 2023-02-23 11:08:42 +01:00
Jonas 'Sortie' Termansen f875555e3e Add nc(1). 2023-02-23 01:25:15 +01:00
Jonas 'Sortie' Termansen c3a3ff86ec Add -p option to time(1). 2022-12-04 23:18:17 +01:00
Jonas 'Sortie' Termansen 71edc766e7 Add halt(8), poweroff(8), and reboot(8). 2022-10-20 23:28:48 +02:00
Juhani Krekelä 184f99e1ee Add -u option to date(1).
Co-authored-by: Dennis Wölfing <denniswoelfing@gmx.de>
2022-06-17 00:33:53 +03:00
Jonas 'Sortie' Termansen 4e56b01e9e Fix getopt error handling in pstree(1). 2022-04-26 01:08:28 +02:00
Jonas 'Sortie' Termansen 14960319a6 Fix find(1) always failing on exec plus. 2022-03-05 19:28:08 +01:00
auronandace 292aeb3fe7 Rename CLOCK_BOOT to CLOCK_BOOTTIME. 2022-02-22 18:01:57 +00:00
Jonas 'Sortie' Termansen 4ed2bb1c50 Fix unused variable warning in pstree(1). 2021-12-12 22:13:05 +01:00
Jonas 'Sortie' Termansen cd8dcdec55 Add -gp options to pstree(1). 2021-12-12 19:47:38 +01:00
Juhani Krekelä 2e193b6014 Fix possible overflow when resizing buffers and remove unncessary casts.
A line longer than 2G might overflow the size_t containing the buffer
length on 32-bit platform. Fix is to use reallocarray with second
parameter twice the size of the element to double the buffer size, since
it will error out if there was an overflow.
2021-11-02 02:11:18 +02:00
Juhani Krekelä cb4a631524 Fix indentation in switch-statement in utils/tail.c.
Sortix coding style does not indent the cases of a switch statement.
2021-10-31 00:46:13 +03:00
Juhani Krekelä d605911ddc Make command-not-found(1) data-driven.
Previously command-not-found(1) encoded all its suggestions in code.
This changes it to use a data table to make it easier to understand and
to modify with new suggestions.
2021-10-06 23:37:08 +03:00
Juhani Krekelä 79799b0084 Support historical syntax in head(1) and tail(1). 2021-08-17 00:03:32 +03:00
Juhani Krekelä 198c54ed25 Rewrite tail(1). 2021-08-15 16:16:19 +03:00
Juhani Krekelä 42c94ee36b Mark install(1) dependant on utils/cp.c and head(1) on utils/tail.c 2021-07-29 00:40:49 +03:00
Jonas 'Sortie' Termansen 63ce55e7e9 Fix reading directories not failing with EISDIR. 2021-07-28 22:21:41 +02:00
Jonas 'Sortie' Termansen 23ddc536bc Add -bdfgikhMnt options to sort(1). 2021-06-13 12:51:18 +02:00
Jonas 'Sortie' Termansen 280ba8d64d Rewrite find(1). 2021-05-29 01:04:53 +02:00
Juhani Krekelä 73e42780f4 Add more keybinds for scrolling in pager(1)
b commonly corresponds to Page Up, and f is added to match.

j and k for lines, ^F and ^B for pages, and g and G for home/end are from vi.

C-n and C-p for lines and C-v and M-v for pages are from Emacs.

< and > for home/end allow using Emacs M-< and M->, tho they are from less(1).
2021-05-04 22:14:47 +00:00
Jonas 'Sortie' Termansen b52bfa5978 Add nl(1). 2021-04-21 22:30:21 +02:00
Jonas 'Sortie' Termansen a8f8b4cfd6 Add format support to date(1). 2021-04-06 23:22:22 +02:00
Jonas 'Sortie' Termansen 7139de4a53 Add stty(1). 2020-11-25 20:47:19 +01:00
Jonas 'Sortie' Termansen eb70062331 Fix utils/chown not being gitignored. 2020-10-28 12:47:35 +01:00
Jonas 'Sortie' Termansen 8337947058 Add chown(1). 2020-10-18 00:31:06 +02:00
Jonas 'Sortie' Termansen 6774df5756 Modernize chmod(1). 2020-10-18 00:31:06 +02:00
Jonas 'Sortie' Termansen 11ababec90 Add -h option to ln(1). 2020-04-13 15:00:25 +02:00
Jonas 'Sortie' Termansen 90180a614f Fix ln(1) behavior on empty paths and indentation. 2020-04-12 21:08:57 +02:00
Jonas 'Sortie' Termansen ff1a90c331 Rewrite ln(1) to be standards compliant. 2020-04-12 00:04:16 +02:00
Jonas 'Sortie' Termansen 8467102662 Fix ls(1) not checking stat_record()'s error correctly. 2018-08-06 23:59:34 +02:00
Jonas 'Sortie' Termansen db90720c01 Fix code relying on <stdio.h> including <stdarg.h>. 2018-08-06 23:59:34 +02:00
Jonas 'Sortie' Termansen 29555d72bb Fix <fcntl.h> including <sys/stat.h> namespace pollution.
POSIX allows <fcntl.h> to include <sys/stat.h>, but doesn't require it.
There's little reason to do that, since they are separate headers, and
<fcntl.h> just needs the mode_t constants. Fix the code accidentally
relying on <fcntl.h> including <sys/stat.h>. The mode_t constants are now
provided in their own kernel header <sortix/mode.h>.

Additionally fix <sys/stat.h> pulling in all of <sys/types.h>, which is not
allowed by POSIX, which only requires a few types to be declared. Fix the
code accidentally relying on <sys/stat.h> including <sys/types.h>.

Finally fix <dirent.h> pulling in <stdint.h> through <sortix/dirent.h>.

The <sortix/__/dt.h> and <sortix/__/stat.h> headers are no longer required
and their contents have been merged into <sortix/__/dirent.h>.
2018-08-06 23:59:34 +02:00
Shikhin Sethi 64f4f5701c Fix typos in sort(1). 2018-04-15 18:06:49 +02:00
Jonas 'Sortie' Termansen 3654b370f1 Add -R option to sort(1). 2018-04-08 20:56:46 +02:00
Jonas 'Sortie' Termansen a209c89233 Fix POSIX comformance issues in sort(1).
Fix -C disabling checking rather than checking quietly.

Fix sort(1) exiting 1 on certain errors, as POSIX requires sort(1) to only
exit if the input wasn't sorted when -c.

Fix -o opening the output file for truncation before all the input has been
read, as POSIX requires allowing -o to be an input file.

POSIX requires sort(1) to handle input errors by either erroring with no
output, or by erroring and sorting the input read so far. Change the current
behavior of continuing to the next file to simply failing hard on the first
input error.

Don't increment the last line number on the end of the standard input.

Report -c/-C as incompatible with -o.

Exit unsuccessfully on any output errors.

Update to current coding conventions and add documentation while here.
2018-04-08 20:56:46 +02:00
Jonas 'Sortie' Termansen d1c3433353 Add rw(1). 2018-03-31 00:55:33 +02:00
Jonas 'Sortie' Termansen 0bb865a7d3 Add install(1) -d support. 2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen 724c035c99 Fix failed fix to pstree(1) vertical line drawing character.
The commit 0def94568a switched to the box
drawing light vertical (U+2502) character, but did not fix the now wrong
assumption that the line drawing character encoded to a single byte.
2017-08-20 12:44:34 +02:00
Jonas 'Sortie' Termansen 326e43f3e9 Fix logname(1) not reseting errno before logname(3).
Thanks to ybden for spotting this bug.
2017-07-02 22:09:53 +02:00
Jonas 'Sortie' Termansen 723f8e964c Fix date format in manual pages. 2017-07-02 22:07:39 +02:00
Jonas 'Sortie' Termansen 0def94568a Fix pstree(1) vertical line drawing character. 2017-04-18 23:32:00 +02:00
Jonas 'Sortie' Termansen 10453f0269 Fix uname(1) referencing section 4 and not section 5. 2017-04-12 23:22:09 +02:00
Jonas 'Sortie' Termansen 9613d47496 Fix comma punctuation bugs in manual lists. 2017-03-19 17:34:19 +01:00
Nicholas De Nova d217621649 Correct manpage spacing per roff(7) convention.
roff(7) dictates that "Each sentence should terminate at the end of an
input line." Instead of doing this, Sortix manpages (incorrectly) used
double-spaces to separate sentences.

Additionally, fix a few small typos.
2017-02-16 14:42:28 -06:00
Nicholas De Nova eddc4f7407 Document chvideomode(1). 2017-02-13 13:57:16 -06:00
Jonas 'Sortie' Termansen 7de1942803 Only the tty1 login session powers off. 2017-02-12 13:26:26 +01:00
Jonas 'Sortie' Termansen b86a227f7b Fix unterminated list in pager(1). 2017-02-12 13:11:07 +01:00
Nicholas De Nova 912a5448c5 Document uname(1). 2017-02-05 13:41:07 -06:00