Commit graph

8982 commits

Author SHA1 Message Date
cinap_lenrek
dc72530159 devgpio: make reading ctl file return 0 bytes 2022-02-05 01:25:28 +00:00
Ori Bernstein
1290c534be g: show all file names when grepping
When grep gets a single file argument, it does
not show the file name. This makes seeing the
file name in the output of 'g' difficult.

Pass a spare /dev/null to each invocation of g,
in order to force it to show the file name.
2022-02-05 00:40:45 +00:00
cinap_lenrek
251c3cfd61 acne/Mail: fix double-free (Bterm() in mesgshow()) 2022-01-29 20:50:03 +00:00
Michael Forney
2833aecc68 vmx: fix PCI ID for virtio block devices
The transitional PCI device ID for block devices is 0x1001, and the
virtio spec says that devices must have the transitional device ID or
0x1040 + the virtio device ID (2).
2022-01-24 23:48:13 +00:00
Kristo
8dc8e3a019 mothra: fix rendering of <samp> tag
Mothra does not currently render text inside <samp> tags inline
similar to <code>, but instead treats them like <pre> which is actually
incorrect behavior. The following small patch should fixes issue.
2022-01-22 18:00:22 +00:00
Michael Forney
33231f9222 g: use xargs instead of finding complete file list before greping 2022-01-01 10:26:14 +00:00
Michael Forney
4db9bebede g: fix duplicate files with directory argument
When we encounter a directory in the argument list, we don't want to
walk every argument, just that directory.
2022-01-01 22:51:39 +00:00
cinap_lenrek
60adc40118 devenv: allow environment total size of up to 1MB
Sometimes, there is the one-off occation when one needs to
pass a huge list in rc...

This change makes devenv track total memory consumption
of environment groups allowing them to grow up to 1MB in
size (including overhead).

(Before, only the variable size was restricted, but
not the amount of files being created).

The maximum value size of a single environment variable
is set to half of the total size, which allows the
occational large value. (But not many of them).

Because we track all memory consuption, it is also
now possible to create around 10k small environment
variales.

A hashtable is added for name lookups and the qid.path
was changed to allow direct indexing into the entry
array without needing a scan lookup.

All smalloc() calls have been removed, exhaustion is
handled with error(Enomem) avoiding deadlock
in case we run out of kernel memory.
2022-01-23 21:33:58 +00:00
Michael Forney
a5a8a92adf git/query: leave range commits in topological order
This prevents commits from getting reordered incorrectly during rebase
or export.
2022-01-23 00:39:21 +00:00
Michael Forney
b9adc507d2 cc: fix incorrect octal range condition in mpatov
This does not have any adverse effect, since yylex never calls mpatov
with a string with leading 0 (and not 0x) that contains non-octal
digits, but the condition was wrong regardless.
2022-01-23 01:05:27 +00:00
glenda
dadaeb584b /sys/games/lib/fortunes: GPU.js 2022-01-23 03:10:23 +00:00
glenda
27bdfccc40 /lib/theo: You obviously don't know what you are doing, and I think you don't deserve help. 2022-01-23 03:08:35 +00:00
Igor Böhm
3ba62d3cd0 man(1): reference /rc/bin/sig in SOURCE section 2022-01-23 01:14:05 +00:00
Benjamin Riefenstahl
108d74cb0a cmd/sshfs.c (recvproc): prefer error codes over error strings
Strings for existing codes in the most used server (OpenSSH) just
repeat the error code name.  OTOH we like to have wording of the
strings under our control as much as possible, so we can easier find
and process them.  Error strings are still usefull as fallback for
compatibility with future versions of the server.
2022-01-07 10:37:02 +00:00
qwx
9d43029ff9 page: performance fixes
- fix showpage1 only decrementing proc counter once limit is reached;
this blocked having more than one loadpages process after NPROC calls,
since the next one has to wait until the last has exited
- allow procs to skip pages currently being loaded by others; this
forced processes to wait for each other at the same page
- bump NPROC from 4 to 8
- (hack) immediately fork a few times after adding all pages at
startup to force loading a batch of pages in parallel
2022-01-19 22:58:53 +00:00
Sigrid Solveig Haflínudóttir
aa14ba62fd flacdec: do not loop forever on write/decode errors 2022-01-19 02:16:09 +00:00
cinap_lenrek
6f9838a6a5 kernel: make Page.txtflush into an array
To avoid a MAXMACH limit of 32 and make
txtflush into an array for the bitmap.

Provide portable macros for testing and clearing
the bits: needtxtflush(), donetxtflush().

On pc/pc64, define inittxtflush()/settxtflush()
as no-op macros, avoiding the storage overhead of
the txtflush array alltogether.
2022-01-16 19:25:11 +00:00
glenda
6e64d30454 fortunes: MY NAME IS BEING USED IN A PHISHING ATTACK. DO NOT RESPOND TO MAIL OFFERING MONEY FOR UNDERGRAD RESEARCH ASSISTANTS. -- bwk 2022-01-12 04:13:08 +00:00
cinap_lenrek
538b810712 rc: fix pwrd() regression, forgot <= ' ' case from needsrcquote()... sorry :( 2022-01-10 17:41:46 +00:00
cinap_lenrek
85bfb0e9eb reduce: use if() to test for exit status of pipeline
The new rc's exit status will be '' for a successfull
pipeline execution instead of '|'.

This is a bit too tightly coupled, so just use if()
statement instead, handling this in a portable way.
2022-01-10 02:01:11 +00:00
Ori Bernstein
4d872079d3 iostats: bind /srv into the namespace, its magic
programs that try to use /srv would choke when running
under iostats, because we intercepted operations on the
special, magic fd passing; we should instead give them
access to the real /srv.
2022-01-09 17:38:58 +00:00
Ori Bernstein
9e79aaceba git/commit: squelch error when run outside repository
when running outside of a repository, we would try to
remove '$msgfile.tmp', but we had never actually set
'$msgfile'.

the error is harmless, but annoying.
2022-01-09 17:37:29 +00:00
Igor Böhm
47b7dc5ccd acme: fix window and scrollbar display glitches at bottom fringe of column
The following patch fixes acme display glitches at the bottom fringe
of columns when adding/moving/resizing windows.

Here an example of an easy to reproduce case:

• https://invidio.xamh.de/watch?v=iLekQrxycaM

…opening acme and resizing a column to the right is all that is needed.

The functions winresize(…) and textresize(…) are extended with an
additional parameter `fillfringe` to indicate if a window/tag shall
fill a potential fringe area that would otherwise remain white.

The changes have been inspired by the approach taken in plan9port
acme.
2022-01-04 19:11:07 +00:00
cinap_lenrek
369cba5f93 rc: read heredoc when receiving '\n' (thanks Eckard Brauer)
Eckard's test case:

cat <<! | cat
asdf
!

The issue is that we have to continue parsing until we see
the '\n' before consuming the here document.

So we revert to the old approach of having two functions:

heredoc() which remembers if we'v seen a heredoc redirection
and a second readhere() function that reads the doc from
the lexers input and sets Tree.str on thee REDIR node.
2022-01-07 20:50:00 +00:00
Ori Bernstein
70edb7fbae git/fs: remove trailing null bytes from parent file (thanks mcf)
due to the way the size of buf was calculated, the parent
file had one trailing null byte for each parent. also, while
we're here, replace the sprint with seprint, and compute the
size from how much we printed in.
2022-01-07 01:43:52 +00:00
Benjamin Riefenstahl
bf322dfbf3 ape/mkstemp: better options
Use O_EXCL and make the file descriptor writeable.  This is more
usefull and it conforms to Single Unix and other specs.
2021-12-10 20:44:26 +00:00
Ori Bernstein
370bfd26ce git: fix typo in git/log output
Commiter => Committer
2022-01-06 06:38:56 +00:00
cinap_lenrek
3568e27ec8 rc: only have single instance of a symbol, extern in header (thanks mcf) 2022-01-04 00:19:36 +00:00
cinap_lenrek
699d2e0ed9 rc: simplify Makefile, use yacc default rule (thanks k0ga) 2022-01-03 22:48:44 +00:00
cinap_lenrek
1a90e04c05 ape: export mktemp() in <stdlib.h> when _BSD_SOURCE is set 2022-01-03 18:49:40 +00:00
cinap_lenrek
b34fc2a9cf ape: allow exporting rc functions in environ[] 2022-01-03 18:47:56 +00:00
cinap_lenrek
3ec59c7b70 ape/psh: provide /dev/fd 2022-01-03 18:44:22 +00:00
cinap_lenrek
189731aad0 rc: make it portable (for UNIX)
Fixup remaining Plan9 dependencies (chartorune()).
Add Makefile for UNIX-like systems (tested with Linux and APE).
Make error printing consistent, use Errstr() explicitely.
Get rid of NSTATUS buffer limit, just malloc it.
2022-01-03 18:41:48 +00:00
cinap_lenrek
c51a5cfa06 rc: Xerror is not a instruction, remove from pfnc 2022-01-03 18:22:29 +00:00
Ori Bernstein
f63d1d3ced git: size cache in bytes, not objects
git used to track cache size in object
count, rather than bytes. This had the
unfortunate effect of making memory use
depend on the size of objects -- repos
with lots of large objects could cause
out of memory deaths.

now, we track sizes in bytes, which should
keep our memory usage flatter.
2022-01-02 03:37:23 +00:00
cinap_lenrek
99d54e420e rc: add Xhereq instruction to trace 2022-01-02 03:35:50 +00:00
cinap_lenrek
11d573d7f9 rc: rstr() shouldnt skip trailing NUL bytes (thanks ori) 2022-01-02 03:33:34 +00:00
qwx
c4e30bede2 remove ssl from zynq and remaining kernel configurations 2022-01-01 15:23:46 +00:00
cinap_lenrek
2025214dfc rc: fix here document handling with quoted end-marker (thanks sigrid)
when end marker is quoted, we should not substitute.
also, pcmd() needs to print the end marker without quotes.
2021-12-31 23:26:59 +00:00
cinap_lenrek
d0c9127b10 remove devssl.c 2021-12-31 16:21:54 +00:00
cinap_lenrek
49e991eaed /rc/lib/rcmain: remove useless exit $staus at the end 2021-12-31 16:15:20 +00:00
cinap_lenrek
b00b3d3739 rc(1): fix synopsis 2021-12-31 16:08:30 +00:00
cinap_lenrek
9773f55318 rc: add err != nil check for early exit 2021-12-31 16:05:28 +00:00
cinap_lenrek
44a5f4d2ef remove pushssl(2) 2021-12-31 15:59:13 +00:00
cinap_lenrek
8bebe3ab19 remove ssl(3) 2021-12-31 15:56:40 +00:00
cinap_lenrek
2d105c2d32 0intro(1), acme(1), con(1), rcpu(1), rio(1), namespace(4), authsrv(6), aan(8): cpu -> rcpu 2021-12-31 15:53:00 +00:00
cinap_lenrek
31f66da433 ftpfs(4): import -> rimport 2021-12-31 15:51:22 +00:00
cinap_lenrek
917f57b6c3 consolefs(4): import -> rimport 2021-12-31 15:50:22 +00:00
cinap_lenrek
aa781bfda2 listen(8): get rid of old ports 2021-12-31 15:44:55 +00:00
cinap_lenrek
a33e93a752 listen(8): remove old cpu, exportfs and rexec listeners 2021-12-31 15:43:16 +00:00