Skip to content

Commit ff2e147

Browse files
sgasseAkhilTThomas
authored andcommitted
Add klogctl to linux and android
For android, we also add the `KLOG_*` constants. For linux, they are defined in source but not exported to user space. (backport <rust-lang#3777>) (cherry picked from commit ece907b)
1 parent fafd9e6 commit ff2e147

File tree

1 file changed

+12
-0
lines changed
  • src/unix/linux_like/android

1 file changed

+12
-0
lines changed

src/unix/linux_like/android/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3526,6 +3526,18 @@ pub const AT_RSEQ_ALIGN: c_ulong = 28;
35263526
pub const AT_EXECFN: c_ulong = 31;
35273527
pub const AT_MINSIGSTKSZ: c_ulong = 51;
35283528

3529+
pub const KLOG_CLOSE: ::c_int = 0;
3530+
pub const KLOG_OPEN: ::c_int = 1;
3531+
pub const KLOG_READ: ::c_int = 2;
3532+
pub const KLOG_READ_ALL: ::c_int = 3;
3533+
pub const KLOG_READ_CLEAR: ::c_int = 4;
3534+
pub const KLOG_CLEAR: ::c_int = 5;
3535+
pub const KLOG_CONSOLE_OFF: ::c_int = 6;
3536+
pub const KLOG_CONSOLE_ON: ::c_int = 7;
3537+
pub const KLOG_CONSOLE_LEVEL: ::c_int = 8;
3538+
pub const KLOG_SIZE_UNREAD: ::c_int = 9;
3539+
pub const KLOG_SIZE_BUFFER: ::c_int = 10;
3540+
35293541
// Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the
35303542
// following are only available on newer Linux versions than the versions
35313543
// currently used in CI in some configurations, so we define them here.

0 commit comments

Comments
 (0)