From: ori@eigenstate.org
To: ori@eigenstate.org, kvik@a-b.xyz, 9front@9front.org
Subject: Re: [9front] [PATCH] syscall: utility overhaul
Date: Sat, 19 Sep 2020 17:07:45 -0700 [thread overview]
Message-ID: <A47EE2A1E72C1D01F57CD55C87E0A8BD@eigenstate.org> (raw)
In-Reply-To: <C57616044A37A39E79D151137FF611BF@eigenstate.org>
> Following is a list of functional changes:
>
> * The -o flag outputs the entire buffer to the length returned
> by the syscall, or, in case of fd2path(2) and errstr(2), to '\0'.
> * The -x flag is removed; the above makes it possible to pipe
> into xd(1) to get the same result.
> * The -s flag uses dirfmt(2) to format the stat message, instead
> of trying to imitate ls(1).
> * Stderr reports are normalized and made easier to parse.
>
> The code also suffered a number of stylistic changes.
>
> diff -r d947a4c5d7fa sys/man/1/syscall
> --- a/sys/man/1/syscall Thu Sep 03 20:07:44 2020 -0700
> +++ b/sys/man/1/syscall Sat Sep 19 15:04:17 2020 +0200
>
> + switch(i){
> + case _ERRSTR: case ERRSTR: case FD2PATH:
> + nbuf = strlen(buf);
> }
>
> Is buf guaranteed to be nul terminated here? I think
> we're likely to be ok here, but I'd be more comfortable
> if we had the last byte explicitly set before calling
> strlen.
>
> Other than that, it lkooks good to me.
(Actually, ignore that, those syscalls nul terminate)
next prev parent reply other threads:[~2020-09-20 0:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-19 13:05 ori
2020-09-20 0:07 ` ori [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-09-19 13:05 kvik
2020-09-20 13:01 ` [9front] " Ethan Gardener
2020-09-20 13:13 ` kvik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A47EE2A1E72C1D01F57CD55C87E0A8BD@eigenstate.org \
--to=ori@eigenstate.org \
--cc=9front@9front.org \
--cc=kvik@a-b.xyz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).