Commit graph

1626 commits

Author SHA1 Message Date
cinap_lenrek
a7eb8b11e4 ndb(6): document " quoting 2023-06-10 19:19:48 +00:00
cinap_lenrek
09ed7a6e56 libip: Provide iplocalonifc() and ipremoteonifc() functions
These functions are analog to devip's functions
of the same name.

This is mainly to maintain consistent naming...
2023-06-10 18:45:40 +00:00
cinap_lenrek
58fe52dc8c 9boot: implement *nocga= and *nokbd= kernel boot parameters
Some embedded pcs like the pcengine apu2 has a bios
that emulates cga and ps2 keyboard using the serial
console.

This leads to doubling of characters in the bootloader
console, as the code would output on both, the uart
and on the cga "screen".

To avoid this, *nocga= boot parameter is added,
which essentially disables the cga text mode. This
boot parameter might also be usefull for no-legacy
uefi machines that generally have no cga text mode
anymore.

Second, we add *nokbd= which makes both the kernel and
9boot stop accessing the ps2 keyboard.
2023-06-10 11:47:50 +00:00
cinap_lenrek
a868b4a2d9 ndb(8): document @rattr behaviour for ndb/query -i 2023-06-05 20:14:44 +00:00
cinap_lenrek
46bac13b16 netaudit: use new ndb/query flags instead of ndb/ipquery
Query ndb with ndb/query -x $net -cia.

This allows one to import a remote systems /net
and run a netaudit on it like:

rimport foobar /net /net.alt
netaudit /net.alt
2023-06-04 21:46:23 +00:00
cinap_lenrek
98aefdfc78 ndb/query: add -i and -c flags unifying the functionality of ndb/ipqeury
I'm a bit tired of ndb/ipquery having a different interface
than ndb/query. Given that most scripts are running it in a sed
pipeline to extact just the value without the attribute name
while ndb/query does the thing one would expect.

So this allows one to do ipinfo searches (also thru ndb/cs
using the -c flag) while only getting the values (when only
one rattr is specified). And honiuring the the -a and -m
flags as well.
2023-06-04 21:42:17 +00:00
mia soweli
2531938269 scram: → /rc/bin/scram
no need for scram to be a c program and duplicate the acpi shutdown code.
try writing power off to /dev/pmctl or fall back to the new -H flag
for aux/acpi.
2023-06-04 13:52:05 +00:00
mia soweli
ace62a81f4 aux/acpi: -H is for HALT
add -H option for acpi that halts immediately,
skipping enumeration of the battery, temperature, etc.
2023-05-29 17:28:40 +00:00
Jacob Moody
5771a6ccad aux/kbdfs: use layer names in kbmap reads and document them
Also fixes one unrelated typo in the man page.
2023-05-29 02:47:33 +00:00
cinap_lenrek
ed4a0c0642 libndb: add ndbvalfmt() formatter
Some attributes such as vendor and txt require double-quoting
to be parsable by libndb. Provide the fmtinstall(2) formatter
ndbvalfmt for programs outputting ndb(6) format.
2023-05-28 16:09:18 +00:00
cinap_lenrek
ffc267c831 ip/ppp: bring back arp proxy, but with explicit -y flag 2023-05-27 21:23:08 +00:00
cinap_lenrek
5655f2e28e ip/ipconfig: add -y flag to ipconfig to set proxy-arp for an interface 2023-05-27 19:59:57 +00:00
Sigrid Solveig Haflínudóttir
845607a5dd reform/pm: several improvements and fixes
* turning trackball leds on/off via /dev/light
* give the keyboard a chance to finish shutdown animation
* report combined voltage of all cells
* instead of an error "battery is missing" just report the state as "missing"
* fix LPC shutdown fallback if keyboard failed to shut down the computer
2023-05-24 22:55:26 +00:00
Jacob Moody
e23bb0103b kbmap, kbremap: open kbmap file with OTRUNC and bugfixes
Now that kbdfs supports reseting the map to
the default itself we no longer need to
manually load the ascii maps.

This also fixes a 'bug in the making' in
the buffer read logic that would cause it
to cut lines in half when writing to the
kbmap file. All of our kbmaps are under
8k so this never showed up.

Also fix a small bug in kbremap where it
was not writing out the last null when writing out
kbd events.
2023-05-23 13:56:43 +00:00
Jacob Moody
169ace060c aux/kbdfs: reset kbmap to ascii default when opened with OTRUNC 2023-05-23 13:48:36 +00:00
Jacob Moody
4df727b57a kbremap: switch keyboard maps with a keyboard shortcut 2023-05-22 16:36:32 +00:00
cinap_lenrek
a65ab6daec ip/ppp, ip/pppoe: remove -e flag again (sorry)
This only works when we'r not already having a interface
bound to that ethernet. Otherwise ipconfig can get
confused and adds the addresses to the wrong interface.
2023-05-21 18:11:25 +00:00
cinap_lenrek
1be331f208 ip/ppp, ip/pppoe: handle ipv6 address auto-configuration, call ip/ipconfig
Change ip/ppp to call ip/ipconfig to add and remove
addresses to avoid duplicating code for removing
ndb entries and handling default routes as well as
allow ipv6 address auto-configuration.
2023-05-21 17:53:00 +00:00
cinap_lenrek
cbf5d3dc34 ip/ipconfig: initial dhcpv6 support, clean default-routes and /net/ndb on remove
This adds a very basic (probably wrong) DHCPv6 client,
to handle the "managed"-flag in IPv6 router solicitations.

We add -U option to pass the DHCPv6 client id as well as
an -s flag to manually add a dns server (because ppp
is going to call ipconfig to handle all the configuration
and write-back to /net/ndb in the future).

Have the remove command also remove default routes and
/net/ndb entries. (needed by ppp).
2023-05-21 17:48:42 +00:00
Sigrid Solveig Haflínudóttir
90a09ca00c git(1): fix quoting in .IR 2023-05-18 23:03:01 +00:00
mia soweli
93837692bb libaml: tow eisaid inside the environment 2023-05-18 20:13:14 +00:00
cinap_lenrek
1665646821 ip/ppp: ipv6 support, cleanup routes, remove source filter, and more
establish ipv6 link-local addresses if supported.
to get a full prefix, one would need to do dhcpv6
or using slaac configuration. this will come later.

remove ipv4 default route on exit.

maintain the entries in /net/ndb on ip change and
also remove them on exit.

dont filter source address, this should be done
differently.

fix various bugs in the option iteration loops.

honour primary flag (it used to just ignore that
and set it unasked in the code... what the hell...)
2023-05-14 21:24:47 +00:00
Vess Rebane
462c67a09f ftpfs: clarify usage and manpage 2023-05-12 20:14:54 +00:00
Sigrid Solveig Haflínudóttir
cc7a274d01 riow: add mod4+shift+q (delete current window) 2023-05-12 16:42:40 +00:00
cinap_lenrek
15a23fd99b ip/pppoe: Handle termination request, add retry-forever (-r) option
This implements a retry strategy (similar to ip/ipconfig -r),
continuing to attempt to connect forever.

Also handle termination request from the server.
2023-05-10 17:29:33 +00:00
Jacob Moody
c3ca13a71a mouse(2): not quite a typo (thanks Alex Musolino)
commit a04fd34272 incorrectly
changed the reference to eenter in event(2). The function in
event(2) is in fact eenter, it does stutter.
2023-05-03 16:56:01 +00:00
Igor Böhm
a04fd34272 mouse(2): fix typos 2023-04-30 23:31:50 +00:00
rodri
e93625550d 2c(1), 2l(1), tl: add thumb to the list. fix thechar: '5' → 't' 2023-04-22 20:45:41 +00:00
Jacob Moody
6118f598e0 auth/ssh2rsa: convert Unix ssh private keys to Plan 9 format. 2023-04-19 14:57:14 +00:00
Jesse Rosenstock
b76d35401c segment(3): Fix typo
hostower => hostowner, introduced in 99ed9623b5.
2023-04-13 14:02:57 +00:00
rodri
8420d3ad69 crop(1), memdraw(2): writememimage doesn't always write compressed images 2023-04-10 21:32:07 +00:00
cinap_lenrek
bd43bd6f1a libc: Add poolreset() function
This is intended for the secrmem pool in the kernel,
but could also be used for temporary pools to
recover the memory used by the arenas.
2023-04-08 20:24:44 +00:00
Jacob Moody
218f7a9ec7 qcowfs(8) 2023-04-01 18:05:27 +00:00
Ori Bernstein
4e8c031849 srv(3): improve the example (thanks mcf) 2023-03-30 04:31:53 +00:00
Jacob Moody
c8748ffbc3 srv(3): provide /srv/clone example 2023-03-29 23:56:44 +00:00
Jacob Moody
d2753b4d5f tcs: add nfc and nfd output formats 2023-03-27 03:45:32 +00:00
Jacob Moody
e0d114547c runecomp(2): clarify audience and history 2023-03-26 23:46:22 +00:00
Jacob Moody
76fb145d75 ascii(1), utf(6): /lib/unicode → /lib/ucd/UnicodeData.txt 2023-03-26 02:34:07 +00:00
Jacob Moody
04759ec9af runecomp(2) 2023-03-26 01:02:20 +00:00
Jacob Moody
2978cbac5b nusb(4): document a88179 support (thanks llamaa) 2023-03-17 22:23:37 +00:00
Jacob Moody
2d976ec561 man1: various spelling fixes 2023-03-13 21:40:44 +00:00
Alex Musolino
52ac665123 factotum(4): fix typos (thanks sirjofri) 2023-03-10 02:19:57 +00:00
rodri
1ff642d9c6 ip(3): corrections to Udphdr field descriptions 2023-03-05 15:50:04 +00:00
Humm
835d20a095 a.out(6): document dynamically loadable modules
The loaders can generate export tables in executables and build
dynamically loadable modules and there is a library to load those
floating around.  This documents the format of dynamically loadable
modules.
2021-11-27 15:38:55 +00:00
Sigrid Solveig Haflínudóttir
4d340ba0c4 test(1): add a missing space after -T 2023-03-01 17:28:25 +00:00
rodri
53d5501359 geometry(2): corrections and improvements
The dot and inner products are not the same, and neither are cross and
outer ones.
Trimmed function signatures—similar to those in draw(2)—were added to
aid in comprehension.
2023-02-25 19:24:23 +00:00
Jacob Moody
e6c6217b35 games/gb: crude serial port emulation
Timing is not as good as it needs to be,
but servicable in more forgiving scenarios.
Clock drift between two paired systems sits
around 8 - 32 cycles when tested locally.
2023-02-24 06:53:14 +00:00
Jacob Moody
89cb83a426 audio/vocdec: Creative Voice File decoder
slight correction in file.c from previous commit
2023-02-09 02:41:21 +00:00
rodri
a5c6374b77 libgeometry revamp 2023-01-29 23:11:05 +00:00
qwx
6468f848bc games/dmid(1), games/opl3(1): formatting and update for streaming
clarifications and formatting; we also now include
doom's shareware, use it in the examples.
2023-01-21 18:15:08 +00:00
Sigrid Solveig Haflínudóttir
bb36ba0617 plumb fileaddr: match with a trailing colon 2023-01-17 13:14:06 +00:00
Ori Bernstein
3a10ba9fd2 git(1): update example to work with today's github 2023-01-15 21:47:49 +00:00
fig
75b5e92d61 tiltscreen documentation
plan9.ini(8) was lacking documentation for the tiltscreen option, so i
wrote some. i based it off of how the others were written.
2023-01-13 06:29:43 +00:00
Alex Musolino
7dae737b7d upasfs(4): remove self-reference and drop trailing comma (thanks fig) 2023-01-13 12:54:53 +00:00
Sigrid Solveig Haflínudóttir
f793656039 zuke(1): replace Beats 'n Breaks icy url with aNONradio 2023-01-10 15:13:23 +00:00
cinap_lenrek
60b6400219 ssh(1): relies -> relays (thanks sigrid) 2023-01-09 19:37:38 +00:00
cinap_lenrek
3bbff3ee20 ssh(1): fix usage and document -X flag 2023-01-09 14:53:41 +00:00
cinap_lenrek
24fa514abe sshnet: mount BEFORE /net (preserving /net/tls and /net/dns) 2023-01-09 14:44:23 +00:00
Jacob Moody
b122f2c4b8 look: add -b for specifying numeric base 2023-01-08 04:18:28 +00:00
cinap_lenrek
5cf570664d authsrv(2): document readcons() function 2023-01-07 00:02:48 +00:00
cinap_lenrek
2402025982 ndb/dns: allow specifying local ip addresses for serving dns
Allow specifying the local IP addresses that
the UDP dns server will listen on when the
-s flag is given.
2023-01-04 19:25:05 +00:00
Sigrid Solveig Haflínudóttir
73f5eea7b5 dial(1): fix a typo 2023-01-03 21:04:34 +00:00
cinap_lenrek
2ea7337763 dial(1): typos 2023-01-03 19:28:59 +00:00
cinap_lenrek
8e56bd06b5 dial(1): document -o options 2023-01-03 19:24:45 +00:00
cinap_lenrek
68c88ddf3d dial(1): add dial command similar to plan9port
This is similar to plan9port dial(1), but names aux/dial
because we already have the expect(1) commands in
/bin/dial.

One difference is that our dial allows specifying a
command, similar to aux/listen1 that will get connected
it standard input and output to the network connection.
2023-01-03 19:18:48 +00:00
Sigrid Solveig Haflínudóttir
49b5472ee7 evdump(1): a program to dump input and window events 2023-01-02 00:49:48 +00:00
cinap_lenrek
705885553c mouse: Make /dev/mousein readable to get mouse status without blocking
There is currently no way to get the current mouse position
and button states without blocking.
2023-01-01 18:37:08 +00:00
cinap_lenrek
7f3498b6e1 pushtls(2): client certificates got implemented in 2012 2022-12-25 18:26:57 +00:00
cinap_lenrek
3bd5ff9583 srv(3): use /srv instead of #s in SYNOPSIS 2022-12-25 17:43:44 +00:00
cinap_lenrek
1720551fd6 /lib/namespace: add bind -c #s$srvspec /srv bind
This makes it possible to start a new namespace
using a specific service directory as the
starting point (see srv(3)).
2022-12-18 14:56:03 +00:00
cinap_lenrek
cff0ebade5 audio/scream: multicast audio protocol 2022-12-05 15:46:27 +00:00
cinap_lenrek
3932622c29 iconv: revert copying extra data on input
I think this is better done by a shell script
doing the extra copying as it breaks use cases
where we want to consume bitmaps in a loop
from a file-descriptor.
2022-12-03 00:25:58 +00:00
Sigrid Solveig Haflínudóttir
27d3b4682f git(1): The/ → The 2022-12-03 00:00:34 +00:00
Jacob Moody
e483c61242 kernel: private srv boards 2022-12-02 07:16:10 +00:00
Sigrid Solveig Haflínudóttir
87fa1a78e3 iconv: copy extra data verbatim to allow font conversion/compression 2022-11-29 16:53:01 +00:00
Ori Bernstein
d376fac66c gitfs(4): clean up junk in manpage 2022-11-28 04:55:41 +00:00
sl
24bccc805c /sys/man/8/trampoline: fix typo 2022-11-27 16:38:33 +00:00
cinap_lenrek
839f58e99a trampoline: Add -o option to send protocol-specific ctl string 2022-11-27 16:13:33 +00:00
Sigrid Solveig Haflínudóttir
fc55d67456 riow(1): no. I give up trying to understand wtf is wrong with rio 2022-11-23 01:16:06 +00:00
Sigrid Solveig Haflínudóttir
614da5fcf6 riow(1): running via window(1) requires rfork n 2022-11-23 01:11:07 +00:00
Sigrid Solveig Haflínudóttir
9d6d327871 riow(1): remove window(1) invocation
window '...' does not work the same way as running the
command in a window manually (for whatever reason).
2022-11-23 01:02:07 +00:00
Sigrid Solveig Haflínudóttir
09bb5b77bc riow(1): provide better examples of how to run it (thanks be0ba) 2022-11-21 23:23:15 +00:00
cinap_lenrek
c78384333e aux/listen: add -o and -O options 2022-11-20 15:40:12 +00:00
qwx
7a5a9b592a history(1): update SOURCE, formatting 2022-11-12 07:35:44 +00:00
Sigrid Solveig Haflínudóttir
e5d29a2bd9 reform(1): fix a missing space char 2022-11-08 22:11:29 +00:00
Sigrid Solveig Haflínudóttir
744475a503 read: add -r to read runes instead of bytes (thanks umbraticus) 2022-11-05 23:41:43 +00:00
Ori Bernstein
4e75dd52d6 plan9.ini(8): document the *debug option 2022-11-05 00:38:09 +00:00
Sigrid Solveig Haflínudóttir
e2e8551eda bar(1): explain the items separation better, mention the default separator char 2022-11-04 17:41:52 +00:00
Ori Bernstein
cc692fa3e8 import(4), oexportfs(4): more empty files removed. 2022-10-16 18:46:56 +00:00
Ori Bernstein
1680778851 cpu(1): why did we have an empty file? (thanks llamaa) 2022-10-16 18:25:20 +00:00
Sigrid Solveig Haflínudóttir
7e0179bad8 zuke: basic replay gain support 2022-10-15 19:01:46 +00:00
Jacob Moody
b4e31923d4 ktrans(1): remove README files
While the logic described in these has been
preserved carefully and still accurate,
the man page now covers all that is presented
and includes documentation on newer features.
2022-10-12 18:48:51 +00:00
Jacob Moody
f337516664 ktrans: revisit grammer handling and do some spring cleaning
Revisiting the man page example and README from the
original ktrans there was some descripency on how
to handle punction marks and special characters.

Notably 。(.) and 、(,) need special casing. If we
have anything in the buffer we need to tack on
these characters as an Okuri tail and avoid the actual
punction from entering the Kanji buffer.

Newlines were previously modified to be taken as a completion
if there was runes in the buffer. This has been backed out,
instead Shift + Space can serve this role via kbmap should they
prefer (and as is done in the jp kbmap). Instead we treat newlines
as hints to reset the buffer.

There was also a bug in where after cycling through all options the
original hiragana was not printed back. This has been corrected.

The max number of candidates has been bumped to 32 and moved to an enum.
This does nearly double our resident memory size, but we reguarly had
matches exceed this limit. A better solution is slated.

The man page now makes an attempt to explain the rules around Okuri and
Joshi input modes.
2022-10-12 18:17:49 +00:00
Jacob Moody
3092ac09e4 ktrans(1): typo 2022-10-10 00:42:22 +00:00
Jacob Moody
88b9bda96c ktrans: gui and man page rework
Graphical display shows current candidate list.
2022-10-09 22:26:09 +00:00
cinap_lenrek
a3f3953ab2 usbsdmux: Add program to control usb-sd-mux device 2022-10-09 12:12:13 +00:00
Sigrid Solveig Haflínudóttir
5f87804393 reform/pm: kbdoled: allow any size/depth of uncompressed image - convert ourselves 2022-10-08 20:37:25 +00:00
Sigrid Solveig Haflínudóttir
0d0a879d7e reform/pm: kbdoled: clear the OLED on zero-length write 2022-10-08 02:10:05 +00:00
Sigrid Solveig Haflínudóttir
4f6e074f97 reform/pm: provide /dev/kbdoled to display a 126x32x1 bitmap on the keyboard OLED 2022-10-08 01:20:32 +00:00
Sigrid Solveig Haflínudóttir
e1949eedf6 reform/pm: add keyboard light level controlling to /dev/light 2022-10-06 23:21:16 +00:00
Igor Böhm
74dfb591e1 rsa(2): fix X509reqtoRSApub(…) signature 2022-10-06 22:07:27 +00:00
Sigrid Solveig Haflínudóttir
c5f79f5371 reform/shortcuts: use media keys for LCD brightness control 2022-10-06 19:56:01 +00:00
Ori Bernstein
6960465997 git(1): remove documentation for deleted '-b' option (thanks llamaa) 2022-10-06 04:53:13 +00:00
Sigrid Solveig Haflínudóttir
b293372ee1 reform/shortcuts: change to use available media keys via Hyper 2022-10-04 23:48:54 +00:00
Sigrid Solveig Haflínudóttir
d2049c206c aux/kbdfs, nusb/kb: add basic media keys support; add /dev/hidNctl to change repeat/delay; fix a race condition 2022-10-04 23:47:47 +00:00
Sigrid Solveig Haflínudóttir
188dea1f2b riow(1): remove the filter warning as it passes unknown keys now 2022-10-04 22:57:51 +00:00
qwx
325c81416b /sys/man: fix minor complaints from checkman 2022-10-02 03:48:31 +00:00
qwx
8237f8c583 camv(1), nusb(4): add more details on camera operation 2022-10-02 03:30:43 +00:00
Sigrid Solveig Haflínudóttir
4ba285fb7d audio/zuke: fix/enable playlist loading via plumber "audio" port 2022-09-20 16:54:36 +00:00
Ori Bernstein
43a3a80be3 mpc(1): fix typo 2022-09-20 01:39:17 +00:00
Sigrid Solveig Haflínudóttir
518be82da3 audio/zuke: "r" key - "repeat one" mode, based on the patch from qwx (thanks) 2022-09-19 19:35:53 +00:00
Sigrid Solveig Haflínudóttir
91791a03db audio/zuke: use digits to enter exact seek position 2022-09-19 19:14:33 +00:00
cinap_lenrek
373daa759c snoopy: add "ippkt" protocol to demux ip packet interfaces without media header.
When using a packet interface, such as /net/ipifc/x as the
packet-soucre, there is no media header and the ip protocol
version has to be determined from the first byte.

The ippkt protocol solves this, allowing one to decode
both ipv4 and ipv6, such as:

snoopy -h ippkt /net/ipifc/2
2022-09-18 12:35:47 +00:00
sl
ccb06791e3 /sys/man/8/smtp: document missing flags (thanks, chris) 2022-09-18 01:18:44 +00:00
Sigrid Solveig Haflínudóttir
05b08f6665 pc: remove -n option and check if stdin is cons instead 2022-09-16 18:46:46 +00:00
Chris A. Frschl
64df254ce8 tlssrv(8): update example path to imap4d 2022-09-16 12:02:59 +00:00
Chris A. Frschl
3986186c31 nusb(4), camv(1): add nusb/cam description, introduce camv manpage 2022-09-16 11:29:42 +00:00
Sigrid Solveig Haflínudóttir
e02e1188e4 fontsel: a font selector program 2022-09-14 23:40:08 +00:00
Sigrid Solveig Haflínudóttir
afc5d2b7f9 bar: a status bar program 2022-09-14 23:17:47 +00:00
Sigrid Solveig Haflínudóttir
fec45947f0 riow: keyboard-controller for rio 2022-09-14 23:16:35 +00:00
Sigrid Solveig Haflínudóttir
f949591aed aux/acpi: simplify/rework; support "power off" via pmctl 2022-09-14 21:33:26 +00:00
Sigrid Solveig Haflínudóttir
247d5183c7 reform(1): add a note about battery readings 2022-09-07 23:13:02 +00:00
Sigrid Solveig Haflínudóttir
25ad7eef2c fshalt: optionally use /dev/pmctl to shut down the machine 2022-09-07 19:49:38 +00:00
Sigrid Solveig Haflínudóttir
79293e820d reform: add pmctl to read more info and to turn power rails off; manpages 2022-09-07 19:45:20 +00:00
Sigrid Solveig Haflínudóttir
ff1f02c316 aux/acpi: mount -a on /dev instead of /mnt/pm; ctl → pmctl 2022-09-07 19:43:43 +00:00
Ori Bernstein
e7f003c920 git(1), gitfs(4): fix style and typos (thanks schwindl) 2022-09-06 03:42:53 +00:00
cinap_lenrek
e3920d71c6 devip: make Rproxy flag explicit 2022-09-03 19:29:06 +00:00
Sigrid Solveig Haflínudóttir
96601790b2 reform/shortcuts: use Kmod4+esc to (un)mute the audio 2022-08-29 20:57:14 +00:00
Sigrid Solveig Haflínudóttir
a786a79acf reform/shortcuts: negative step values 2022-08-24 13:55:44 +00:00
Sigrid Solveig Haflínudóttir
cc861074b4 reform: add reform/shortcuts 2022-08-24 13:45:51 +00:00
Sigrid Solveig Haflínudóttir
5a51e900dd zuke(1): document current track printout on stdout 2022-08-23 19:17:47 +00:00
Jacob Moody
8dcf65f21e ktrans: xin chào
Add telex Vietnamese input.
2022-08-23 04:53:11 +00:00
Sigrid Solveig Haflínudóttir
39aabc9f7a reform: tweak manpage and reform/audio a bit 2022-08-21 07:46:15 +00:00
Sigrid Solveig Haflínudóttir
a78b71b143 move and rename MNT Reform 2 support utilies, cat manpages into one
Aux/imx8pm and aux/wm8960 had pretty cryptic names and it made
more sense to use a reform/pm and reform/audio naming, accordingly.

Instead of having special mount points /mnt/pm and /mnt/wm8960,
/dev is used directly, removing the need to do any manual work -
stats(1) will continue showing the CPU temperature, and zuke(1)
will still be able to control the volume, etc.

Brightness controls were changed to a better interface -
/dev/light, where each line contains a "a_thing its_light_value".
This way more parts can be controlled. Right now it's only "lcd",
but later it might be "kbd" and "trackball" as well.

Example of lib/profile:

reform/audio
echo master 80 > /dev/volume

reform/pm
echo lcd 100 > /dev/light
2022-08-21 01:30:03 +00:00
Sigrid Solveig Haflínudóttir
3e58068cc5 aux/wm8960: relative volume adjustment through the fs interface 2022-08-20 17:05:20 +00:00
Sigrid Solveig Haflínudóttir
95206ac7e5 aux/imx8pm: add relative brightness setting (-+N), useful for key bindings 2022-08-20 13:39:49 +00:00
Sigrid Solveig Haflínudóttir
c3a430e682 wm8960(8): fix wrong source and see also 2022-08-19 02:48:25 +00:00
Sigrid Solveig Haflínudóttir
19f18b5dce man: wm8960(8) and imx8pm(8) 2022-08-19 02:46:06 +00:00
Jacob Moody
7828ffb8a4 ktrans: use stdio by default
The kbdtap is now given as the first argument instead.
The use of stdio allows for multiple taps to be chained
together in something like:

; </dev/kbdtap ktrans | progB | progC >/dev/kbdtap
2022-08-17 14:20:56 +00:00
Ori Bernstein
d86a7ed412 git/rebase: allow rebase without a clean tree
Here, patch grows a dry run option (-n), which allows
git/import to bail out early if it would patch files
that are dirty in tree.

Once git/import refuses to patch dirty files, git/rebase
can skip checking if the whole tree is clean, which is
both convenient and much faster on large trees.
2022-08-16 23:50:28 +00:00
Jacob Moody
69352f6668 ktrans: tow inside the environment 2022-08-15 03:45:42 +00:00
Jacob Moody
79c1842979 rio(4): talk about kbdtap 2022-08-15 03:34:17 +00:00
ori@eigenstate.org
bb2060028e upas/dkim: dkim signing for upas
This change adds support for dkim signing to upas.

It has2 pieces:

1. Adding support for different asn1 formats to auth/rsa2asn1;
   we can now generate SubjectPublicKeyInfo RSA keys, which
   wrap the keys up with an algorithm identifier.
2. Adding a upas/dkim command which filters a message and signs
   it using dkim.

To configure dkim, you need to generate a (small-ish) rsa key;
large keys do not fit into DNS text records:

	# generate the private key and add it to factotum
	ramfs -p
	cd /tmp
	auth/rsagen -b 2048 -t 'service=dkim role=sign hash=sha256 domain=orib.dev owner=*' > dkim.key
	cat dkim.key > factotum.ctl

	# extract the public key, encode it, and strip out the junk
	pubkey=`{
		<dkim.key auth/rsa2asn1 -f spki | \
		auth/pemencode WHATEVER | \
		grep -v 'WHATEVER' | \
		ssam 'x/\n/d'
	}
	domain=example.org
	# then add it to /lib/ndb.local
	echo 'dom=dkim._domainkey.'$domain' soa=
		ip=144.202.1.203
		refresh=600 ttl=600
		ns=ns.orib.dev
		txt="k=rsa; v='$pubkey \
	>> /lib/ndb/local

Then, finally, insert it into your outgoing mail pipeline. One
thing to be careful of is that upas will do some outgoing 'From:'
rewriting, so you may need to make sure that either '$upasname'
is set, or 'upas/dkim' is inserted after the rewrite stage.
A good place is in /mail/lib/qmail, in place of upas/vf:

	% cat /mail/lib/qmail
	rfork s
	upas/dkim -d example.com | upas/qer /mail/queue mail $* || exit 'qer failed'
	upas/runq -n 10 /mail/queue /mail/lib/remotemail </dev/null >/dev/null >[2=1] &
2022-06-24 00:08:34 +00:00
cinap_lenrek
a1c3c34c70 fshalt(8): document -r kernelpath feature 2022-08-13 22:33:50 +00:00
Ori Bernstein
0e9c5f30ea auth(8): sync usage messages for auth/box 2022-08-12 20:54:45 +00:00
Josiah Frentsos
ec98c2e178 ls(1): Make man page synopsis consistent with usage output 2022-08-09 22:29:32 +00:00
Roberto E. Vargas Caballero
e55b6a5aff Rewrite history: 9front was first
History was built using a heuristic where a file not present in
the dump in 30 days was considered as a deleted file, without
being important if those days had an actual dump. Having the file
server off 30 days made all the files to be deleted from the
history point of view. This new version is rewriten from scratch
in rc and it does not try to detect deleted files since it can
be derived only with fragile assumptions.
2022-08-08 16:56:11 +00:00
Sigrid Solveig Haflínudóttir
55e5418e69 acpi: /mnt/acpi → /mnt/pm 2022-08-08 13:12:45 +00:00
Angelo Papenhoff
909323e92a fix paqfs manpage 2022-08-05 14:29:59 +00:00
Jacob Moody
0541a434cb ktrans: 新しい降り
Rewrite of ktrans to act as an overlay to kbdfs.
Move map files outside of the binary in to /lib/ktrans
and get our dictionaries out of /lib while we're at it.

Use \n as an alias for ctrl-\ for first lookup, use ^w
to clear okurigana input. This also in general changes
the logic to never us to 'swallow' a character and always echo
them out, using backspaces for cleaning us up.
2022-08-03 11:14:44 +00:00
Ori Bernstein
8f109ae113 auth(8): specify what gets put into the environemnt with '-s'
Understanding the environment is important for security critical
applications.
2022-08-03 02:57:22 +00:00
Ori Bernstein
30dcf55ee2 bind, mount: stop returning mount id
The mount ID is a sequence number in a 32 bit integer, which means that
it can't be unique. This is largely harmless, because there is no way to
use the mount id, beyond checking if it's negative.

However, there's no overflow check, so the mount ID can wrap negative,
which will break error checks on mount calls.

Because it's useless, let's just stop returning it.
2022-07-30 16:09:27 +00:00
Ori Bernstein
bc64cc50ac auth/box: preserve cwd name, but clear it out
Auth/box previously switched to /, rather than
preserving the cwd. This would break relative
paths to items that would get pulled into the
namespace.

This change removes the '-.' flag, and causes
auth/box to keep the current working directory,
making it more usable for scripting.
2022-07-26 04:57:40 +00:00
Ori Bernstein
520a39efcd sysproc: raise limit on #! lines, and allow quoted args
Our #! line length is very short, and the naïve quoting
makes it difficult to pass more complicated arguments to
the programs being run. This is fine for simple interpreters,
but it's often useful to pass arguments to more complicated
interpreters like auth/box or awk.

This change raises the limit, but also switches to tokenizing
via tokenize(2), rather than hand rolled whitespace splitting.

The limits chosen are arbitrary, but they leave approximately
3 KiB of stack space on 386, and 13k on amd64. This is a lot
of stack used, but it should leave enough for fairly deep
devtab chan stacks.
2022-07-25 04:48:44 +00:00
Benjamin Riefenstahl
b3dc2af6d6 man/3/ip (ip): Discuss local IP addresses for "announce" and "bind". 2022-06-11 13:00:05 +00:00
cinap_lenrek
ccbabf1c16 i2c(3): fix typos, thanks quinq 2022-07-17 14:43:46 +00:00
cinap_lenrek
06d7118e94 i2c(3): Add documentation for kernels devi2c 2022-07-17 14:22:47 +00:00
Sigrid Solveig Haflínudóttir
1c585c2cc2 sam(1): clarify "<rio>" works on dot just like "look" 2022-07-14 21:12:37 +00:00
rodri
76f8d642ee ktrans(1): added a history section (thanks moody!) 2022-07-11 20:24:24 +00:00
Jacob Moody
cd64b7129c auth/box: -s, -. flags
-. decides where we chdir to before execing, we can't
sit where we are because our directory may not exist.
If not specified we go to '/'.

-s is used to source a rc script instead of execing cmd.
This is primarily to enable:
	'#!/bin/auth/box -s'
Shebang line size is a bit tight(32), so we have this shorthand
to use rc along with setting up the required namespace components.
2022-07-10 13:13:03 +00:00
rodri
739e15c178 ktrans(1): documented $jisho and made some improvements. (thanks to Kenji Okamoto, cinap, BurnZez, romi and Aaron for your work on ktrans!) 2022-07-10 12:54:09 +00:00
Jacob Moody
c539d64d22 man: turn on troff -mnihongo if JP font is used
This specifically fixes
	% man -P ktrans

We dont have font widths for kanji in our troff
font files, so we can use aux/mnihongo to render
the character using libdraw, and grab the bitmap from
there. It's not pretty, but aux/mnihongo exists so
lets at least use it.

This also updates /sys/man/1/ktrans to specify the
Jp font to comply with aux/mnihongo.
2022-07-09 03:43:33 +00:00
rodri
566c512106 add ktrans. こんにちは! 2022-07-06 20:19:14 +00:00
Ori Bernstein
21aac62c1f git/log: support -n option to restrict log counts
this is useful for scripting, and convenient for
interactive use.
2022-07-03 04:38:13 +00:00
Jacob Moody
cac03f355c kernel: revert /srv/clone 2022-06-29 17:35:27 +00:00
Jacob Moody
fa0c807bfb kernel: add /srv/clone to get seperate /srv bulletin boards. 2022-06-21 13:21:38 +00:00
Jacob Moody
c12022fd8c skel(3) → skelfs(4)
The original intention was to put devskel in to the
kernel to detach what it provides from devsrv.
That is not a good reason, just move it to userspace.

auth/box has been changed to exec skelfs instead
of relying on '#z'.
2022-06-15 06:42:05 +00:00
Jacob Moody
be1789d78b kernel: bootrc: add bootloop= 2022-06-14 08:16:57 +00:00
Ori Bernstein
306e7ca618 devsrv: revert 'add /srv/clone'
this leaks /srvs, revert until we can fix it.
2022-06-12 15:23:19 +00:00
Jacob Moody
c3e1346bbc kernel: add /srv/clone
/srv/clone allows a namespace to get their
own private /srv session.
2022-06-12 00:44:10 +00:00
Jacob Moody
13065e16b3 auth/box: don't bother switching to none
Changing the user to none doesn't do much for us
here. For kernel drivers that check the user of the
current proc we'll be none, but anything from devmnt
will still be accessed using creds from the original
attachment. Instead, running with none can be done
by chaining with auth/none:

auth/none auth/box ...
2022-06-10 04:10:54 +00:00
Jacob Moody
056ad652a4 auth/box: build restricted namespaces using components from the parent. 2022-06-07 05:38:08 +00:00
Jacob Moody
f4840cdba5 kernel: add devskel for pc and pc64 2022-06-07 05:25:44 +00:00
Ori Bernstein
9eb9c9e560 patch(1): remove options that don't exist
the summary mentions options that existed during
development, but no longer do.
2022-06-04 02:13:58 +00:00
Ori Bernstein
9e547f50d1 patch(1): add the manpage
forgot it in the last commit
2022-06-04 02:12:12 +00:00
Jacob Moody
47cff2e833 auth(8): bugs have been squashed 2022-06-02 16:51:55 +00:00
Jacob Moody
57fa781188 aux/listen: Allow per service namespace files 2022-05-28 02:34:43 +00:00
Jacob Moody
774529e440 kernel: add /rc to devroot
This makes it much easier to run a rc
program without needing to bind in all of '#s/boot'.
2022-05-28 02:31:26 +00:00
Jacob Moody
eaa1949ba0 auth/newns: add chdev command 2022-05-28 02:27:59 +00:00
Jacob Moody
6926080a2d add chdev(1) 2022-05-28 02:25:56 +00:00
Jacob Moody
e9bb7876e1 kernel: add chdev command to devcons 2022-05-28 02:23:29 +00:00
Ori Bernstein
a59e61a6a4 patch(1): remove bell labs patch scripts
bell labs is dead, and nobody is listening; 9front
has our own patch submission proces.
2022-05-22 17:27:31 +00:00
Jacob Moody
4ee54b1416 fork(2): fix commas in RFNOMNT references 2022-05-15 16:14:36 +00:00
Jacob Moody
2c67fb9794 fork(2): fix parens in RFNOMNT references (thanks Amavect) 2022-05-15 03:01:49 +00:00
Jacob Moody
e614e819e3 fork(2): Document RFNOMNT edge cases. 2022-05-12 17:50:08 +00:00
Ori Bernstein
a271f62bf2 git/pull: remove '-b' and '-a' option
we do the right thing by default now, let's not
add knobs that nobody cares about.
2022-04-28 03:35:54 +00:00
umbraticus@prosimetrum.com
d606d83ed8 make = command's output plumbable
This patch makes sam's = cmd output what seems to me a more
useful (plumbable) format: /full/path/to/file:addr , where
addr is line(s) under = and rune(s) under =#.
2022-04-16 06:53:35 +00:00
rodri
70e2b4f7ec 9pqueue(2): fix typo 2022-04-19 20:21:37 +00:00
cinap_lenrek
56c86739a8 sol(8): fix example (vncv vs vnc) 2022-04-19 02:09:06 +00:00
cinap_lenrek
1a4e03cf93 ip/sol: kvm (vnc) redirect, bring back plain authentication as a fallback (when unsupported) 2022-04-03 04:19:46 +00:00
cinap_lenrek
31294b6c1a ip/sol: use httpdigest authentication
httpdigest authentication allows one to share the key
in factotum with the amt webserver on https://target:16993
2022-04-02 21:47:00 +00:00
Sigrid Solveig Haflínudóttir
4a401e7703 draw(3): add a missing .br 2022-04-02 21:37:51 +00:00
Sigrid Solveig Haflínudóttir
30f5752710 draw(3): .IR on memlorigin(2), fix wrong "t" param name (should be "top") 2022-04-02 10:37:39 +00:00
cinap_lenrek
ca60e03c5b ip/sol: add intel AMT serial-over-lan console program 2022-04-01 21:24:42 +00:00
cinap_lenrek
ca313087c1 ip(3): use flags instead of tag for 8 column route add/remove
This avoids ipconfig having to explicitely specify the tag
when we want to set route type, as the tag can be provided
implicitely thru the "tag" command.
2022-03-14 18:45:27 +00:00
cinap_lenrek
5186cb3b99 ip(3): document the trans argument for add/try. 2022-03-13 17:38:06 +00:00
cinap_lenrek
c8507f428f ipconfig(8): add -t flag to enable source address translation 2022-03-13 17:29:16 +00:00
cinap_lenrek
d2a7d88662 devip: implement network address translation routes
This adds a new route "t"-flag that enables network address translation,
replacing the source address (and local port) of a forwarded packet to
one of the outgoing interface.

The state for a translation is kept in a new Translation structure,
which contains two Iphash entries, so it can be inserted into the
per protocol 4-tuple hash table, requiering no extra lookups.

Translations have a low overhead (~200 bytes on amd64),
so we can have many of them. They get reused after 5 minutes
of inactivity or when the per protocol limit of 1000 entries
is reached (then the one with longest inactivity is reused).

The protocol needs to export a "forward" function that is responsible
for modifying the forwarded packet, and then handle translations in
its input function for iphash hits with Iphash.trans != 0.

This patch also fixes a few minor things found during development:

- Include the Iphash in the Conv structure, avoiding estra malloc
- Fix ttl exceeded check (ttl < 1 -> ttl <= 1)
- Router should not reply with ttl exceeded for multicast flows
- Extra checks for icmp advice to avoid protocol confusions.
2022-03-12 20:53:17 +00:00
cinap_lenrek
065d601916 nusb: Fix handling of interface altsetting.
The altsetting was handled only for a single endpoint
(per interface number), but has to be handled for each
endpoint (per interface *AND* altsetting number).

A multi function device (like a disk) can have
multiple interfaces, all with the same interface number
but varying altsetting numbers and each of these
interfaces would list distict endpoint configurations.

Multiple interfaces can even share some endpoints (they
use the same endpoint addresses), but
we still have to duplicate them for each
interface+altsetting number (as they'r part of
actually distict interfaces with distict endpoint
configurations).

It is also important to *NOT* make endpoints bi-directional
(dir == Eboth) when only one direction is used in a
interface/altsetting and the other direction in another.
This was the case for nusb/disk with some seagate drive
where endpoints where shared between the UAS and
usb storage class interface (but with distict altsettings).

The duplicate endpoints (as in using the same endpoint address)
are chained together by a next pointer and the head
is stored in Usbdev.ep[addr], where addr is the endpoint
address. These Ep structures will have distinct endpoint
numbers Ep.id (when they have conflicting types), but all
will share the endpoint address (lower 4 bits of the
endpoint number).

The consequence is that all of the endpoints configuration
(attributes, interval) is now stored in the Ep struct and
no more Altc struct is present.

A pointer to the Ep struct has to be passed to openep()
for it to configure the endpoint.

For the Iface struct, we will now create multiple of them:
one for each interface *AND* altsetting nunber,
chained together on a next pointer and the head being
stored in conf->iface[ifaceid].

--
cinap
2022-02-21 19:50:16 +00:00
cinap_lenrek
4b637a24f9 devbridge: implement experimental vlan support 2022-02-16 22:38:03 +00:00