search for: errnum

Displaying 20 results from an estimated 102 matches for "errnum".

Did you mean: errno
2013 Oct 26
2
[PATCH] 1. changes for vdiskadm on illumos based platform
...!= 0) { + grub_printf("zio_read decompression failed\n"); + return (ERR_FSYS_CORRUPT); + } + } return (0); } @@ -446,7 +466,7 @@ dmu_read(dnode_phys_t *dn, uint64_t blki grub_memset(buf, 0, dn->dn_datablkszsec << SPA_MINBLOCKSHIFT); break; - } else if ((errnum = zio_read(bp, tmpbuf, stack))) { + } else if (errnum = zio_read(bp, tmpbuf, stack)) { return (errnum); } @@ -465,13 +485,13 @@ dmu_read(dnode_phys_t *dn, uint64_t blki * errnum - failure */ static int -mzap_lookup(mzap_phys_t *zapobj, int objsize, char *name, +mzap_lookup(mzap_phys_...
2019 Jun 28
1
Re: [PATCH libnbd v3] python: Raise a custom exception containing error string and errno.
...rest. > > - The .errno attribute returns a (Python module) errno value, not a > number, so the number is effectively lost, should that really be an > issue. Maybe we want two fields, both .errno (string name, or None if Python errno.errorcode couldn't map it to a name), and .errnum (raw numeric value, accessible no matter what). Maybe as simple as this (or with one further tweak to __str__ to at least output .errnum when .errno is None): diff --git i/generator/generator w/generator/generator index 7c2fb59..9192988 100755 --- i/generator/generator +++ w/generator/generator @...
2019 Jun 28
3
[libnbd PATCH] tests: Enhance errors test
...s/errors.c +++ b/tests/errors.c @@ -27,12 +27,40 @@ #include <libnbd.h> +#define MAXSIZE (65 * 1024 * 1024) /* Oversize on purpose */ + +static char *progname; +static char buf[MAXSIZE]; + +static void +check (int experr, const char *prefix) +{ + const char *msg = nbd_get_error (); + int errnum = nbd_get_errno (); + + printf ("error: \"%s\"\n", msg); + printf ("errno: %d (%s)\n", errnum, strerror (errnum)); + if (strncmp (msg, prefix, strlen (prefix)) != 0) { + fprintf (stderr, "%s: test failed: missing context prefix: %s\n", + pro...
2012 May 04
0
[PATCH] add (errnum) in front of windows error messages
On localized, non-English versions of windows, it is common to have two active charsets -- for console applications and for GUI applications, together with localized error messages returned by windows. But two charsets are rarely compatible, so sending the same byte sequence to console and to windows event log makes one or another to be unreadable. So at least include the error number, this way
2017 Jun 27
0
[PATCH v3 3/5] threads: Use thread-local storage for errors.
...error_cb_data; +}; + +/* Error data, stored in thread-local storage in g->error_data key. */ +struct error_data { + /* Linked list of error_data structs allocated for this handle. */ + struct error_data *next; + + char *last_error; /* Last error on handle. */ + int last_errnum; /* errno, or 0 if there was no errno */ + + /* Error handler and stack of old error handlers. */ + guestfs_error_handler_cb error_cb; + void * error_cb_data; + struct error_cb_stack *error_cb_stack; +}; + +static void +free_error_data (struct error_data *...
2015 Jun 06
0
[PATCH 3/5] threads: Use thread-local storage for errors.
...error_cb_data; +}; + +/* Error data, stored in thread-local storage in g->error_data key. */ +struct error_data { + /* Linked list of error_data structs allocated for this handle. */ + struct error_data *next; + + char *last_error; /* Last error on handle. */ + int last_errnum; /* errno, or 0 if there was no errno */ + + /* Error handler and stack of old error handlers. */ + guestfs_error_handler_cb error_cb; + void * error_cb_data; + struct error_cb_stack *error_cb_stack; +}; + +static void +free_error_data (struct error_data *...
2013 Jul 17
2
Redirecting libguestfs error messages
Hi, When I register a callback for events with this function call: eh = guestfs_set_event_callback(g, message_callback, GUESTFS_EVENT_ALL, 0, dev); Shouldnt it capture and redirect messages like this to message_callback(): "libguestfs: error: lstat: /.Trash: No such file or directory" I still get them in stderr .. Thanks, Or
2009 Aug 03
0
[PATCH] guestfs: fix typo in my recent change
...;s what I've pushed. >From ad7818c34d4d6ef6b0959ef7dbbf006968166030 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering at redhat.com> Date: Mon, 3 Aug 2009 15:39:09 +0200 Subject: [PATCH] guestfs: fix typo in my recent change * src/guestfs.c (guestfs_perrorf): Rename former err to errnum, to avoid compilation error. --- src/guestfs.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/guestfs.c b/src/guestfs.c index 802c1d2..40e702e 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -440,7 +440,7 @@ guestfs_perrorf (guestfs_h *g, const char *fs, ...)...
2012 Mar 20
13
[PATCH 0 of 3 v2] PV-GRUB: add support for ext4 and btrfs
Hi, The following patches add support for ext4 and btrfs to PV-GRUB. These patches are taken nearly verbatim from those provided by Fedora and Gentoo. We''ve been using these patches for the PV-GRUB images available in EC2 for some time now with no problems. Changes from v1: - Makefile has been changed to check the exit code from patch - The btrfs patch has been rebased to apply
1999 Nov 21
1
openssh 1.2pre13 on Linux/i386 RH4.2 problems
...sshd.c:231: warning: passing arg 1 of `pam_strerror' makes integer from pointer without a cast sshd.c:231: too many arguments to function `pam_strerror' ... more of these... make: *** [sshd.o] Error 1 >From the 4.2 box: grep pam_strerror _pam_types.h extern const char *pam_strerror(int errnum); >From a 5.2 box: grep pam_strerror _pam_types.h extern const char *pam_strerror(pam_handle_t *pamh, int errnum); If I do the obvious patch of just removing the pam_handle parameter in sshd.c, there are still non-pam warnings, and compilation breaks: gcc -g -O2 -Wall -I/usr/local/ssl/include...
2023 May 30
2
[libnbd PATCH v3 04/22] states: Prepare to send 64-bit requests
...t obviously its interaction with emacs is a bit botched when it comes to Makefile syntax. Will clean up. > > +++ b/tests/pwrite-extended.c > > +static void > > +check (int experr, const char *prefix) > > +{ > > + const char *msg = nbd_get_error (); > > + int errnum = nbd_get_errno (); > > + > > + fprintf (stderr, "error: \"%s\"\n", msg); > > + fprintf (stderr, "errno: %d (%s)\n", errnum, strerror (errnum)); > > + if (strncmp (msg, prefix, strlen (prefix)) != 0) { > > + fprintf (stderr, "%s...
2013 Jul 17
0
Re: Redirecting libguestfs error messages
...(guestfs_parse_environment (g) == -1) { /* see below ... */ (4) For guestfs_parse_environment and all other libguestfs calls, you should check the return codes, and handle errors, like this: if (guestfs_parse_environment (g) == -1) { const char *errstr = guestfs_last_error (g); int errnum = guestfs_last_errno (g); fprintf (logfp, "error: %s", errstr); if (errnum > 0) fprintf (logfp, " (%s)", strerror (errnum)); fprintf (logfp, "\n"); } It's usually helpful to put all of that in a separate utility function or macro. Note that...
2013 Jul 17
1
Re: Redirecting libguestfs error messages
...{ > /* see below ... */ > > (4) For guestfs_parse_environment and all other libguestfs calls, you > should check the return codes, and handle errors, like this: > > if (guestfs_parse_environment (g) == -1) { > const char *errstr = guestfs_last_error (g); > int errnum = guestfs_last_errno (g); > fprintf (logfp, "error: %s", errstr); > if (errnum > 0) > fprintf (logfp, " (%s)", strerror (errnum)); > fprintf (logfp, "\n"); > } > > It's usually helpful to put all of that in a separate uti...
2002 Jan 07
0
rsync-2.5.1 / zlib patches
...R >= 600 # define fdopen(fd,type) _fdopen(fd,type) #endif +#endif /* Common defaults */ @@ -155,7 +162,11 @@ /* functions */ #ifdef HAVE_STRERROR +#ifdef __VMS + /* defined in string.h */ +#else extern char *strerror OF((int)); +#endif # define zstrerror(errnum) strerror(errnum) #else # define zstrerror(errnum) ""
2019 Jun 28
2
Re: [PATCH libnbd v3] python: Raise a custom exception containing error string and errno.
On 6/28/19 1:27 PM, Richard W.M. Jones wrote: > Previously errors caused a RuntimeException to be raised. This commit > defines a custom exception (nbd.Error) which has two parameters, the > required error string, and the optional errno (which may be 0 if > unavailable). > > For example: > > $ ./run nbdsh -c 'h.pread(0, 0)' > Traceback (most recent call last):
2015 Jun 16
5
[PATCH threads v2 0/5] Add support for thread-safe handle.
Previous discussion here: https://www.redhat.com/archives/libguestfs/2015-June/thread.html#00048 v2: - Use a cleanup handler to release the lock. - Rebase to upstream. Note I have not fixed the problem(s) with error handling (patch 3).
2023 Jul 13
2
[libnbd PATCH 0/2] Fix docs and testing of completion callback
This is my proposal for fixing the documentation to match practice (namely, that completion.callback is not invoked in the cases where the aio call itself reports errors); we could instead try to go the other direction and tweak the generator to guarantee that both completion.callback and completion.free are reached no matter what, but that felt more invasive to me. Eric Blake (2): api: Tighten
2007 May 05
2
Manager API Output
...he result in some text file for further processing. <?php $strHost = "127.0.0.1"; $strUser = "cron"; $strSecret = "1234"; $oSocket = fsockopen($strHost, 5038, $errnum, $errdesc) or die("Connection to host failed"); fputs($oSocket, "Action: Login\r\n"); fputs($oSocket, "Username: $strUser\r\n"); fputs($oSocket, "Secret: $strSecret\r\...
2007 Jul 06
1
Asterisk Manager
Hi this is my code for * manager: $oSocket = fsockopen($strHost, 5038, $errnum, $errdesc) or die("Connection to host failed"); fputs($oSocket, "Action: login\r\n"); fputs($oSocket, "Username: $strUser\r\n"); fputs($oSocket, "Secret: $strSecret\r\n...
2007 Jul 08
1
Asterisk Help
...e time and dial if gets connected and answered by customer wants to play a sequence of message . Please help . I've tried here is my code to place calls but in this I see no of failure calls are more than 50%. so please advise. $oSocket = fsockopen($strHost, 5038, $errnum, $errdesc) or die("Connection to host failed"); fputs($oSocket, "Action: login\r\n"); fputs($oSocket, "Username: $strUser\r\n"); fputs($oSocket, "Secret: $strSecret\r\n...