in ndb, we use the ethernet mac to identify the client.
in dhcpv6, there is just a uniqueue device id that
might even be generated randomly. to find the ethernet
address of a client, check the duid type and only use
it when the dudid is of type 1 (link layer) or 3 (link
layer address + time) and the link layer address type
is 1 (ethernet). otherwise, assume the source ip is
a link local address and extract it from that.
this hack works for thinkpad t495, which uses random
uuid based client duid.
the previous mkfile had a sneaky hack that would use
sed to delete the first 2 lines of hex output to strip
the 32 byte long a.out header for apbootstrap and rebootcode.
use 8l -H3 flag to strip the header from the output file.
Output buffering is automatically disabled when reading from stdin.
In this case, supplying the -b flag ought to be redundant. However,
since Bflag was being XORed into the flag set - rather than simply
ORed - supplying -b would actually enable output buffering.
while technically a 32 bit ptrdiff_t is in spec on
systems with 64 bit ponters as long as we guarantee
that individual objects are small enough, this can
confuse legitimate code, so lets fix this.
This fixes token pasting, making it expand when
it should expand, and paste before expansion when
it should paste before expanding.
#define CAT(a, b) a ## b
#define BAR 3
#define FOO CAT(BAR, 3)
FOO
now produces 33, while
#define CAT(a, b) a ## b
#define EOF (-1)
#define NOP(x) x
NOP(CAT(foo, EOF))
CAT(,EOF)
CAT(,)
produces
fooEOF
(-1)
<empty>
respectively.
ccom may be called multiple times on the same
node, via 'goto loop' calls from the commute
label, OADD, and a few other places.
Casts to void could null out the LHS of the
node, which would cause the compiler to crash
if the cast was revisited due to one of these
cases, because we tried frobbing n->left.
Now, if n->left is nil, we just return.w
Fix inconsistencies between programs and their usage
messages, correct instances where information seems
to be missing or lost. This includes missing arguments,
making usage consistent with manuals, and so on.
we emitted an error on heredoc tags, but we
continued on, and added a heredoc entry to
the list, with a tag that we couldn't handle.
when processing this heredoc, rc would segfault.
fix: don't add a heredoc to the list on error.
We used to have a padding int in the structure
after the next pointer, to align it to 16 bytes.
On 64 bit architectures, the pointer was already
8 bits, so the padding misaligned things to 20
bytes.
This fixes it so that we're explcit about the
data alignment we want, instead of hoping that
the various sizes line up.
with the latest changes to shr(3), we can use ORCLOSE on
the control file to get the mount in the share automatically
removed when the server exits or something goes wrong during
postsharesrv().
do not expose postfd() and sharefd() functions. they where
undocumented and leak the control file descriptors.
the rc & operator changes stdin to /dev/null, so we
have to do the <[0=1] inside the {}
this never showed up as an issue because many
fileservers just read 9p messages from standard
output.
When redirecting output from "", it prints the command
to stdout, which garbles things like:
% foo
<inspect output>
% "" > /dev/snarf
Now, we send it to stderr.
when the control mountpoint side gets removed, close
mount channel immediately. this is usefull for implementing
automatic cleanup with ORCLOSE create mode.
this makes sure that when postsharesrv() fails (for
example because the shr file already exists), the
worker process gets killed and all file descriptors
to devusb get closed.
allow reading the control file of a process and return
its pid number. if the process has exited, return an error.
this can be usefull as a way to test if a process is
still alive. and also makes it behave similar to
network protocol directories.
another side effect is that processes who erroneously
open the ctl file ORDWR would be allowed todo so as
along as they have write permission and the process is
not a kernel process.
it appears that too many fileservers rely on the fileserver
process sharing the filedescriptors with children of the
caller to postmntsrv() or threadpostmntsrv().
restoring previous behaviour for now.
sshreadproc() needs to be started after opening the sshfd file
descriptor.
fsnetproc() needs to run in the same filedescriptor group as
the fileserver.
run the usb hub poll "work()" proc in the same filedescriptor
group as the fileserver by forking the process in Srv.start
callback.
this also prevents the usbbusy filedescriptor from being kept
open by the fileserver process.
mike from eff0ff.net reported the following:
> I was running a second instance of rio inside a rio window and
> suddenly weird things started happening. The second instance started
> imposing arbitrary limits on the size of its windows and refused to
> resize some of its windows when its own window was resized.
> Turns out this happens if rio's screen is 3 times as high as wide
> because of a tiny mistake in its goodrect function.
... and kindly provided a patch. thanks!