Displaying 7 results from an estimated 7 matches for "strerr".
Did you mean:
stderr
2009 Jul 16
0
Re: Xen-devel Digest, Vol 52, Issue 178
...dev['slot'] = int(lst[0], 16)
- dev['func'] = int(lst[1], 16)
+ dev['slot'] = '%02x' % int(lst[0], 16)
+ dev['func'] = '%x' % int(lst[1], 16)
return dev
except OSError, (errno, strerr):
raise PciDeviceParseError('Can not locate the parent of %s',
------------------------------
Message: 3
Date: Wed, 17 Jun 2009 21:31:08 +1000
From: Simon Horman <horms@verge.net.au >
Subject: [Xen-devel] Re: [PATCH] xend: pci: find_parent: should return
string rather...
2010 Nov 19
3
File Offsets for SCP (patch)
...usage();
+ break;
+ case 'Z':
+ fd_inset = strtod(optarg, &endp);
+ if (fd_inset < 0 || *endp != '\0')
+ usage();
+ break;
default:
usage();
}
@@ -680,6 +694,16 @@ syserr: run_err("%s: %s", name, strerr
run_err("%s: %s", name, "Negative file size");
goto next;
}
+ if (fd_offset > stb.st_size) {
+ run_err("Offset greater than file size");
+ goto next;
+ }
+ if (fd_inset > stb.st_size) {
+ run_err("Inset greater than file size");
+...
2019 Aug 31
1
[PATCH libnbd] Add bindings for Rust language
Still not working, but I took the latest patch and:
- rebased it against libnbd 1.0
- fixed it so it handles new args and cbargs
The generator now runs without warnings.
This patch doesn't handle optargs at all. In C these are converted to
non-optional parameter. Rust doesn't (AFAIK) have optional or
labelled arguments unfortunately.
Rich.
2014 Jun 29
0
[PATCH 3/6] chain/partiter: adjust error reporting
Use <0 for errors, 0 for normal state, and >0 for clean completion.
In future this would be necessary if it's decided to make partiter
a generic lib (similar to disklib) - though it has to be quieted first
and provide strerr()-like functionality in place of its verbosity.
diff --git a/com32/chain/chain.c b/com32/chain/chain.c
index ae95d45..c08ec6e 100644
--- a/com32/chain/chain.c
+++ b/com32/chain/chain.c
@@ -352,7 +352,7 @@ int find_dp(struct part_iter **_iter)
} while (!pi_next(iter));
/* broken part st...
2019 Jul 07
2
[libnbd PATCH] RFC: Add bindings for Rust language
...src/nbd_error.rs
new file mode 100644
index 000000000000..0a7f667d5ab7
--- /dev/null
+++ b/rust/libnbd/src/nbd_error.rs
@@ -0,0 +1,31 @@
+use libnbd_sys::{nbd_get_errno, nbd_get_error};
+use std::ffi::CStr;
+use std::fmt;
+
+#[derive(Debug, Copy, Clone)]
+pub struct NbdError {
+ errno: i32,
+ strerr: &'static CStr,
+}
+
+impl NbdError {
+ pub fn from_libnbd() -> Self {
+ Self {
+ errno: unsafe { nbd_get_errno() },
+ strerr: unsafe { CStr::from_ptr(nbd_get_error()) },
+ }
+ }
+}
+
+impl std::error::Error for NbdError {}
+
+impl fmt::Display f...
2000 Aug 18
0
[PATCH] Support symlinks in scp of openssh 2
...yserr;
- if (fstat(fd, &stb) < 0) {
+ if (linkflag) {
+ fd = -1;
+ result = lstat(name, &stb);
+ }
+ else {
+ if ((fd = open(name, O_RDONLY, 0)) < 0)
+ goto syserr;
+ result = fstat(fd, &stb);
+ }
+ if (result < 0) {
syserr: run_err("%s: %s", name, strerror(errno));
goto next;
}
switch (stb.st_mode & S_IFMT) {
+ case S_IFLNK:
+ /* readlink later */
+ break;
case S_IFREG:
+ if (fd < 0 && (fd = open(name, O_RDONLY, 0)) < 0)
+ goto syserr;
break;
case S_IFDIR:
@@ -586,6 +606,7 @@ syserr: run_err("%...
2014 Jun 29
10
[PATCH 0/6] chain.c32 patches
This small set fixes few bugs, improves gpt handling (under buggy conditions)
and implements strict flag with more fine grained control which should fix
issues with sanity checks against disk sizes.
If this set is allright I'd want to do what I mentioned in older discussion
with Ady - backport missing patches from 6.x to 5.x and 4.x so all versions
have up to date chain version.
Michal