Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: File sharing over virtio-9p



ozaki.ryota%gmail.com@localhost (Ryota Ozaki) writes:

>> @@ -72,7 +74,7 @@ serverconnect(const char *addr, unsigned short port)
>> +           err(1, "setsockopt(SO_NOSIGPIPE)");
>> +        err(1, "open(%s)", path);

>I prefer more informative messages.  Why do you want to trim them?


Usually the error gives enough context, e.g. SO_NOSIGPIPE is a socket option
and telling that it's setsockopt failing is redundant and printing
an input file name is enough when the error identifies the operation
or the specific operation doesn't matter.

But there is no rule for this, in particular when embedding filenames
where multiple operations are possible. Many people seem to prefer even
more verbose phrases like "Cannot open `%s'". Our code base has lots
of variants.

I personally would prefer error messages without special characters
so that you can grep them easily. :)

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index