Re: partial failures in write(2) (and read(2))

2021-02-11 Thread Edgar Fuß
> I suppose libc could set a default handler for the new signal, and do some 
> extra work to set errno.
Then the libc routine could better use a new syscall, no?


Re: partial failures in write(2) (and read(2))

2021-02-11 Thread John Franklin
On Feb 10, 2021, at 18:28, Thor Lancelot Simon  wrote:
> 
> On Fri, Feb 05, 2021 at 08:10:06PM -0500, Mouse wrote:
>>> It is possible for write() calls to fail partway through, after
>>> already having written some data.
>> 
>> It is.  As you note later, it's also possible for read().
>> 
>> The rightest thing to do, it seems to me, would be to return the error
>> indication along with how much was successfully written (or read).  But
>> that, of course, requires a completely new API, which I gather is more
>> intrusive than you want to get into here.
> 
> I think it could be done with a signal in combination with the existing
> API.


From the application’s perspective of calling write() in libc, when there is 
such an error the libc function could return a short response and set errno.  
That doesn’t work so much for the kernel’s system call.  I suppose libc could 
set a default handler for the new signal, and do some extra work to set errno.  
Apps that need more control can override the signal hander.

jf
-- 
John Franklin
frank...@elfie.org

Re: X vs serial console?

2021-02-11 Thread RVP

On Wed, 10 Feb 2021, Mouse wrote:


What would be involved in switching to genfb?  Just disable i915drmkms,
or is there more to it?



Yes, disable i915drmkms, then set your screen resolution using
`gop' (UEFI/amd64) or `vesa' (BIOS/x86) in the bootloader.

https://www.unitedbsd.com/d/271-wfsb/6

-RVP