Просмотр исходного кода

src/helpers.rs: rename constant for `bpf_trace_printk` helper

On second thought, this constant is better named after the Linux kernel
version of the helper, since this is where the offset value comes from.
Quentin Monnet 8 лет назад
Родитель
Сommit
3ccc8483db
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/helpers.rs

+ 1 - 1
src/helpers.rs

@@ -29,7 +29,7 @@ use std::u64;
 
 /// Index of helper `bpf_trace_printk()`, equivalent to `bpf_trace_printf()`, in Linux kernel, see
 /// <https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/bpf.h>.
-pub const BPF_TRACE_PRINTF_IDX: u32 = 6;
+pub const BPF_TRACE_PRINTK_IDX: u32 = 6;
 
 /// Prints its **last three** arguments to standard output. The **first two** arguments are
 /// **unused**. Returns 0.