Skip to content

Commit 927478e

Browse files
authored
Merge branch 'master' into shadow
2 parents 72ed1f1 + d401c6f commit 927478e

File tree

7 files changed

+19
-20
lines changed

7 files changed

+19
-20
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
77
### Added
88
- Added `shadow.h` functions
99
(#[1173](https://github.com/nix-rust/nix/pull/1173))
10+
- Add `CLK_TCK` to `SysconfVar`
11+
(#[1177](https://github.com/nix-rust/nix/pull/1177))
1012
### Changed
1113
### Fixed
1214
### Removed
15+
- Removed deprecated Error::description from error types
16+
(#[1175](https://github.com/nix-rust/nix/pull/1175))
1317

1418
## [0.16.1] - 23 December 2019
1519
### Added

src/errno.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,7 @@ impl ErrnoSentinel for libc::sighandler_t {
111111
fn sentinel() -> Self { libc::SIG_ERR }
112112
}
113113

114-
impl error::Error for Errno {
115-
fn description(&self) -> &str {
116-
self.desc()
117-
}
118-
}
114+
impl error::Error for Errno {}
119115

120116
impl fmt::Display for Errno {
121117
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

src/lib.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -154,16 +154,7 @@ impl From<std::string::FromUtf8Error> for Error {
154154
fn from(_: std::string::FromUtf8Error) -> Error { Error::InvalidUtf8 }
155155
}
156156

157-
impl error::Error for Error {
158-
fn description(&self) -> &str {
159-
match *self {
160-
Error::InvalidPath => "Invalid path",
161-
Error::InvalidUtf8 => "Invalid UTF-8 string",
162-
Error::UnsupportedOperation => "Unsupported Operation",
163-
Error::Sys(ref errno) => errno.desc(),
164-
}
165-
}
166-
}
157+
impl error::Error for Error {}
167158

168159
impl fmt::Display for Error {
169160
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

src/sys/ioctl/linux.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ mod consts {
3333
target_arch = "arm",
3434
target_arch = "s390x",
3535
target_arch = "x86_64",
36-
target_arch = "aarch64"))]
36+
target_arch = "aarch64",
37+
target_arch = "riscv64"))]
3738
mod consts {
3839
#[doc(hidden)]
3940
pub const NONE: u8 = 0;

src/sys/ioctl/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
//! Historically `ioctl` numbers were arbitrary hard-coded values. In Linux (before 2.6) and some
3030
//! unices this has changed to a more-ordered system where the ioctl numbers are partitioned into
3131
//! subcomponents (For linux this is documented in
32-
//! [`Documentation/ioctl/ioctl-number.txt`](http://elixir.free-electrons.com/linux/latest/source/Documentation/ioctl/ioctl-number.txt)):
32+
//! [`Documentation/ioctl/ioctl-number.rst`](http://elixir.free-electrons.com/linux/latest/source/Documentation/ioctl/ioctl-number.rst)):
3333
//!
3434
//! * Number: The actual ioctl ID
3535
//! * Type: A grouping of ioctls for a common purpose or driver

src/sys/ptrace/linux.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,31 @@ libc_enum!{
4646
target_arch = "mips",
4747
target_arch = "mips64",
4848
target_arch = "x86_64",
49+
target_arch = "riscv64",
4950
target_pointer_width = "32"))))]
5051
PTRACE_GETREGS,
5152
#[cfg(any(all(target_os = "android", target_pointer_width = "32"),
5253
all(target_os = "linux", any(target_env = "musl",
5354
target_arch = "mips",
5455
target_arch = "mips64",
5556
target_arch = "x86_64",
57+
target_arch = "riscv64",
5658
target_pointer_width = "32"))))]
5759
PTRACE_SETREGS,
5860
#[cfg(any(all(target_os = "android", target_pointer_width = "32"),
5961
all(target_os = "linux", any(target_env = "musl",
6062
target_arch = "mips",
6163
target_arch = "mips64",
6264
target_arch = "x86_64",
65+
target_arch = "riscv64",
6366
target_pointer_width = "32"))))]
6467
PTRACE_GETFPREGS,
6568
#[cfg(any(all(target_os = "android", target_pointer_width = "32"),
6669
all(target_os = "linux", any(target_env = "musl",
6770
target_arch = "mips",
6871
target_arch = "mips64",
6972
target_arch = "x86_64",
73+
target_arch = "riscv64",
7074
target_pointer_width = "32"))))]
7175
PTRACE_SETFPREGS,
7276
PTRACE_ATTACH,
@@ -75,13 +79,15 @@ libc_enum!{
7579
target_arch = "mips",
7680
target_arch = "mips64",
7781
target_arch = "x86",
78-
target_arch = "x86_64")))]
82+
target_arch = "x86_64",
83+
target_arch = "riscv64")))]
7984
PTRACE_GETFPXREGS,
8085
#[cfg(all(target_os = "linux", any(target_env = "musl",
8186
target_arch = "mips",
8287
target_arch = "mips64",
8388
target_arch = "x86",
84-
target_arch = "x86_64")))]
89+
target_arch = "x86_64",
90+
target_arch = "riscv64")))]
8591
PTRACE_SETFPXREGS,
8692
PTRACE_SYSCALL,
8793
PTRACE_SETOPTIONS,

src/unistd.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1994,7 +1994,8 @@ pub enum SysconfVar {
19941994
BC_STRING_MAX = libc::_SC_BC_STRING_MAX,
19951995
/// Maximum number of simultaneous processes per real user ID.
19961996
CHILD_MAX = libc::_SC_CHILD_MAX,
1997-
// _SC_CLK_TCK is obsolete
1997+
// The number of clock ticks per second.
1998+
CLK_TCK = libc::_SC_CLK_TCK,
19981999
/// Maximum number of weights that can be assigned to an entry of the
19992000
/// LC_COLLATE order keyword in the locale definition file
20002001
COLL_WEIGHTS_MAX = libc::_SC_COLL_WEIGHTS_MAX,

0 commit comments

Comments
 (0)