tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: File sharing over virtio-9p
On Fri, Oct 25, 2019 at 2:38 PM Valery Ushakov <uwe%stderr.spb.ru@localhost> wrote:
>
> On Fri, Oct 25, 2019 at 12:56:43 +0900, Ryota Ozaki wrote:
>
> > > @@ -72,7 +74,7 @@ serverconnect(const char *addr, unsigned short port)
> > > [...]
> > > + err(1, "setsockopt(SO_NOSIGPIPE)");
> > >
> > > I'd just trim it down to "SO_NOSIGPIPE".
> > >
> > > + err(1, "open(%s)", path);
> > >
> > > Ditto. Just make it "%s".
> >
> > I prefer more informative messages. Why do you want to trim them?
>
> Consider that from the user perspective. As a developer it's tempting
> to dump the implementation details, but which of the following is more
> readable to the user:
>
> $ ls foo
> ls: foo: No such file or directory
>
> or
>
> $ ls foo
> ls: stat(foo): No such file or directory
Hm, the example makes sense to me (so I'll fix open's one),
but doesn't for setsockopt:
mount_9p: SO_NOSIGPIPE: Cannot allocate memory
or
mount_9p: setsockopt(SO_NOSIGPIPE): Cannot allocate memory
I think the latter looks readable/understandable to users.
ozaki-r
Home |
Main Index |
Thread Index |
Old Index