search for: _get_error

Displaying 6 results from an estimated 6 matches for "_get_error".

Did you mean: get_error
2017 Jan 26
0
[nbdkit PATCH v2 4/6] plugins: Add new nbdkit_set_error() utility function
.../src/connections.c b/src/connections.c index c0f0567..83c863e 100644 --- a/src/connections.c +++ b/src/connections.c @@ -602,6 +602,19 @@ validate_request (struct connection *conn, return 1; /* Commands validates. */ } +/* Grab the appropriate error value. + */ +static int +_get_error (void) +{ + int err = errno; + int ret = tls_get_error (); + + if (!ret) + ret = err ? err : EIO; + return ret; +} + /* This is called with the request lock held to actually execute the * request (by calling the plugin). Note that the request fields have * been validated already in ...
2017 Jan 26
2
Re: [nbdkit PATCH v2 4/6] plugins: Add new nbdkit_set_error() utility function
On Wed, Jan 25, 2017 at 08:42:34PM -0600, Eric Blake wrote: > +eg. NULL or -1. If the call to C<nbdkit_set_error> is omitted, then > +the value of C<errno> will be used instead. [...] > +/* Grab the appropriate error value. > + */ > +static int > +_get_error (void) > +{ > + int err = errno; > + int ret = tls_get_error (); > + > + if (!ret) > + ret = err ? err : EIO; > + return ret; > +} I don't think we should use the implicit errno. The reason is that we cannot be sure that errno is meaningful in language bindings....
2017 Jan 26
10
[nbdkit PATCH v2 0/6] bind .zero to Python
Fix some things I noticed while reviewing v1, and follow Rich's idea to add a new nbdkit_set_error() utility function with a binding for Python users to request a particular error (rather than being forced to live with whatever stale value is in errno after all the intermediate binding glue code). I could not easily find out how to register a C function callable from perl bindings, and have
2017 Jan 26
0
Re: [nbdkit PATCH v2 4/6] plugins: Add new nbdkit_set_error() utility function
...Jan 25, 2017 at 08:42:34PM -0600, Eric Blake wrote: >> +eg. NULL or -1. If the call to C<nbdkit_set_error> is omitted, then >> +the value of C<errno> will be used instead. > [...] >> +/* Grab the appropriate error value. >> + */ >> +static int >> +_get_error (void) >> +{ >> + int err = errno; >> + int ret = tls_get_error (); >> + >> + if (!ret) >> + ret = err ? err : EIO; >> + return ret; >> +} > > I don't think we should use the implicit errno. Pre-patch: C plugins use implicit errno,...
2017 Jan 26
1
Re: [nbdkit PATCH v2 4/6] plugins: Add new nbdkit_set_error() utility function
...ric Blake wrote: > >> +eg. NULL or -1. If the call to C<nbdkit_set_error> is omitted, then > >> +the value of C<errno> will be used instead. > > [...] > >> +/* Grab the appropriate error value. > >> + */ > >> +static int > >> +_get_error (void) > >> +{ > >> + int err = errno; > >> + int ret = tls_get_error (); > >> + > >> + if (!ret) > >> + ret = err ? err : EIO; > >> + return ret; > >> +} > > > > I don't think we should use the implicit...
2010 Oct 01
0
Wine release 1.3.4
...D3DXCreateTextureFromFileInMemoryEx 13844 pywin32 cannot be installed 14076 UT3 Wine C++ Runtime Library 16636 Black & White 2 Graphics Glitches and Crash 16870 wine: Call from 0x7b845610 to unimplemented function ntoskrnl.exe.KeInitializeDpc, aborting 17176 msvcrt _set_error and _get_error missing from exports 17780 Symbian epoc emulator: unimplemented function hal.dll.ExTryToAcquireFastMutex 17950 Okular configuration disappears after choosing other configuration tab 18109 Race Driver: GRID Demo - not rendered correctly when multisampling enabled 18278 EVEMon: Missing T...