diff --git a/devices/src/virtio/video/protocol.rs b/devices/src/virtio/video/protocol.rs index 843d112d2e..eee8aa7074 100644 --- a/devices/src/virtio/video/protocol.rs +++ b/devices/src/virtio/video/protocol.rs @@ -6,8 +6,8 @@ //! //! ```shell //! $ bindgen virtio_video.h \ -//! --whitelist-type "virtio_video.*" \ -//! --whitelist-var "VIRTIO_VIDEO_.*" \ +//! --allowlist-type "virtio_video.*" \ +//! --allowlist-var "VIRTIO_VIDEO_.*" \ //! --with-derive-default \ //! --no-layout-tests \ //! --no-prepend-enum-name > protocol.rs diff --git a/gpu_display/src/generated/xlib_generator.sh b/gpu_display/src/generated/xlib_generator.sh index 304904a7a6..24eac0935c 100755 --- a/gpu_display/src/generated/xlib_generator.sh +++ b/gpu_display/src/generated/xlib_generator.sh @@ -21,70 +21,70 @@ extern "C" {} EOF bindgen --no-layout-tests --no-derive-debug \ - --whitelist-function XAllocSizeHints \ - --whitelist-function XBlackPixelOfScreen \ - --whitelist-function XClearWindow \ - --whitelist-function XCloseDisplay \ - --whitelist-function XConnectionNumber \ - --whitelist-function XCreateGC \ - --whitelist-function XCreateSimpleWindow \ - --whitelist-function XDefaultDepthOfScreen \ - --whitelist-function XDefaultScreenOfDisplay \ - --whitelist-function XDefaultVisualOfScreen \ - --whitelist-function XDestroyImage \ - --whitelist-function XDestroyWindow \ - --whitelist-function XFlush \ - --whitelist-function XFree \ - --whitelist-function XFreeGC \ - --whitelist-function XGetVisualInfo \ - --whitelist-function XInternAtom \ - --whitelist-function XKeycodeToKeysym \ - --whitelist-function XMapRaised \ - --whitelist-function XNextEvent \ - --whitelist-function XOpenDisplay \ - --whitelist-function XPending \ - --whitelist-function XRootWindowOfScreen \ - --whitelist-function XScreenNumberOfScreen \ - --whitelist-function XSelectInput \ - --whitelist-function XSetWMNormalHints \ - --whitelist-function XSetWMProtocols \ - --whitelist-function XShmAttach \ - --whitelist-function XShmCreateImage \ - --whitelist-function XShmDetach \ - --whitelist-function XShmGetEventBase \ - --whitelist-function XShmPutImage \ - --whitelist-function XShmQueryExtension \ - --whitelist-var 'XK_.*' \ - --whitelist-var ButtonPress \ - --whitelist-var ButtonPressMask \ - --whitelist-var Button1 \ - --whitelist-var Button1Mask \ - --whitelist-var ButtonRelease \ - --whitelist-var ButtonReleaseMask \ - --whitelist-var ClientMessage \ - --whitelist-var Expose \ - --whitelist-var ExposureMask \ - --whitelist-var KeyPress \ - --whitelist-var KeyPressMask \ - --whitelist-var KeyRelease \ - --whitelist-var KeyReleaseMask \ - --whitelist-var MotionNotify \ - --whitelist-var PMaxSize \ - --whitelist-var PMinSize \ - --whitelist-var PointerMotionMask \ - --whitelist-var ShmCompletion \ - --whitelist-var VisualBlueMaskMask \ - --whitelist-var VisualDepthMask \ - --whitelist-var VisualGreenMaskMask \ - --whitelist-var VisualRedMaskMask \ - --whitelist-var VisualScreenMask \ - --whitelist-var ZPixmap \ - --whitelist-type Display \ - --whitelist-type GC \ - --whitelist-type Screen \ - --whitelist-type XShmCompletionEvent \ - --whitelist-type ShmSeg \ - --whitelist-type Visual \ - --whitelist-type Window \ - --whitelist-type XVisualInfo \ + --allowlist-function XAllocSizeHints \ + --allowlist-function XBlackPixelOfScreen \ + --allowlist-function XClearWindow \ + --allowlist-function XCloseDisplay \ + --allowlist-function XConnectionNumber \ + --allowlist-function XCreateGC \ + --allowlist-function XCreateSimpleWindow \ + --allowlist-function XDefaultDepthOfScreen \ + --allowlist-function XDefaultScreenOfDisplay \ + --allowlist-function XDefaultVisualOfScreen \ + --allowlist-function XDestroyImage \ + --allowlist-function XDestroyWindow \ + --allowlist-function XFlush \ + --allowlist-function XFree \ + --allowlist-function XFreeGC \ + --allowlist-function XGetVisualInfo \ + --allowlist-function XInternAtom \ + --allowlist-function XKeycodeToKeysym \ + --allowlist-function XMapRaised \ + --allowlist-function XNextEvent \ + --allowlist-function XOpenDisplay \ + --allowlist-function XPending \ + --allowlist-function XRootWindowOfScreen \ + --allowlist-function XScreenNumberOfScreen \ + --allowlist-function XSelectInput \ + --allowlist-function XSetWMNormalHints \ + --allowlist-function XSetWMProtocols \ + --allowlist-function XShmAttach \ + --allowlist-function XShmCreateImage \ + --allowlist-function XShmDetach \ + --allowlist-function XShmGetEventBase \ + --allowlist-function XShmPutImage \ + --allowlist-function XShmQueryExtension \ + --allowlist-var 'XK_.*' \ + --allowlist-var ButtonPress \ + --allowlist-var ButtonPressMask \ + --allowlist-var Button1 \ + --allowlist-var Button1Mask \ + --allowlist-var ButtonRelease \ + --allowlist-var ButtonReleaseMask \ + --allowlist-var ClientMessage \ + --allowlist-var Expose \ + --allowlist-var ExposureMask \ + --allowlist-var KeyPress \ + --allowlist-var KeyPressMask \ + --allowlist-var KeyRelease \ + --allowlist-var KeyReleaseMask \ + --allowlist-var MotionNotify \ + --allowlist-var PMaxSize \ + --allowlist-var PMinSize \ + --allowlist-var PointerMotionMask \ + --allowlist-var ShmCompletion \ + --allowlist-var VisualBlueMaskMask \ + --allowlist-var VisualDepthMask \ + --allowlist-var VisualGreenMaskMask \ + --allowlist-var VisualRedMaskMask \ + --allowlist-var VisualScreenMask \ + --allowlist-var ZPixmap \ + --allowlist-type Display \ + --allowlist-type GC \ + --allowlist-type Screen \ + --allowlist-type XShmCompletionEvent \ + --allowlist-type ShmSeg \ + --allowlist-type Visual \ + --allowlist-type Window \ + --allowlist-type XVisualInfo \ xlib_wrapper.h >>xlib.rs diff --git a/kernel_loader/src/elf.rs b/kernel_loader/src/elf.rs index c591e52e31..cc6dcf899d 100644 --- a/kernel_loader/src/elf.rs +++ b/kernel_loader/src/elf.rs @@ -7,7 +7,7 @@ * From chromeos-linux v4.19 include/uapi/linux/elf.h * $ bindgen \ * --no-layout-tests --with-derive-default \ - * --whitelist-type Elf64_Ehdr --whitelist-type Elf64_Phdr --whitelist-var .+ \ + * --allowlist-type Elf64_Ehdr --allowlist-type Elf64_Phdr --allowlist-var .+ \ * include/uapi/linux/elf.h */ diff --git a/libvda/src/bindings.rs b/libvda/src/bindings.rs index bf67a44054..546ec9f326 100644 --- a/libvda/src/bindings.rs +++ b/libvda/src/bindings.rs @@ -16,7 +16,7 @@ generated with the command: cd ${CHROMEOS_DIR}/src/platform2 && \ bindgen arc/vm/libvda/libvda_common.h \ -o ../platform/crosvm/libvda/src/common/bindings.rs \ - --whitelist-type "video_.*" + --allowlist-type "video_.*" */ pub type __int32_t = ::std::os::raw::c_int; diff --git a/libvda/src/decode/bindings.rs b/libvda/src/decode/bindings.rs index 9562436b8d..06afae00d5 100644 --- a/libvda/src/decode/bindings.rs +++ b/libvda/src/decode/bindings.rs @@ -17,14 +17,14 @@ cd ${CHROMEOS_DIR}/src/platform2/ && \ bindgen arc/vm/libvda/libvda_decode.h \ -o ../platform/crosvm/libvda/src/decode/bindings.rs \ --raw-line 'pub use crate::bindings::*;' \ - --whitelist-function "initialize" \ - --whitelist-function "deinitialize" \ - --whitelist-function "get_vda_capabilities" \ - --whitelist-function "init_decode_session" \ - --whitelist-function "close_decode_session" \ - --whitelist-function "vda_.*" \ - --whitelist-type "vda_.*" \ - --blacklist-type "video_.*" \ + --allowlist-function "initialize" \ + --allowlist-function "deinitialize" \ + --allowlist-function "get_vda_capabilities" \ + --allowlist-function "init_decode_session" \ + --allowlist-function "close_decode_session" \ + --allowlist-function "vda_.*" \ + --allowlist-type "vda_.*" \ + --blocklist-type "video_.*" \ -- \ -I . */ diff --git a/libvda/src/encode/bindings.rs b/libvda/src/encode/bindings.rs index 8f1198f6e2..a5044a8abc 100644 --- a/libvda/src/encode/bindings.rs +++ b/libvda/src/encode/bindings.rs @@ -10,14 +10,14 @@ cd ${CHROMEOS_DIR}/src/platform2/ && \ bindgen arc/vm/libvda/libvda_encode.h \ -o ../platform/crosvm/libvda/src/encode/bindings.rs \ --raw-line 'pub use crate::bindings::*;' \ - --whitelist-function "initialize_encode" \ - --whitelist-function "deinitialize_encode" \ - --whitelist-function "get_vea_capabilities" \ - --whitelist-function "init_encode_session" \ - --whitelist-function "close_encode_session" \ - --whitelist-function "vea_.*" \ - --whitelist-type "vea_.*" \ - --blacklist-type "video_.*" \ + --allowlist-function "initialize_encode" \ + --allowlist-function "deinitialize_encode" \ + --allowlist-function "get_vea_capabilities" \ + --allowlist-function "init_encode_session" \ + --allowlist-function "close_encode_session" \ + --allowlist-function "vea_.*" \ + --allowlist-type "vea_.*" \ + --blocklist-type "video_.*" \ -- \ -I . */ diff --git a/rutabaga_gfx/src/generated/generate.py b/rutabaga_gfx/src/generated/generate.py index 366110a090..30527b69ad 100755 --- a/rutabaga_gfx/src/generated/generate.py +++ b/rutabaga_gfx/src/generated/generate.py @@ -26,14 +26,14 @@ END_COLOR = '\033[0m' verbose = False -def generate_module(module_name, whitelist, header, clang_args, lib_name, +def generate_module(module_name, allowlist, header, clang_args, lib_name, derive_default): args = [ 'bindgen', '--no-layout-tests', - '--whitelist-function', whitelist, - '--whitelist-var', whitelist, - '--whitelist-type', whitelist, + '--allowlist-function', allowlist, + '--allowlist-var', allowlist, + '--allowlist-type', allowlist, '--no-prepend-enum-name', '--no-rustfmt-bindings', '-o', module_name + '_bindings.rs', diff --git a/rutabaga_gfx/src/renderer_utils.rs b/rutabaga_gfx/src/renderer_utils.rs index 70210234b0..3465e107f3 100644 --- a/rutabaga_gfx/src/renderer_utils.rs +++ b/rutabaga_gfx/src/renderer_utils.rs @@ -28,7 +28,7 @@ pub struct VirglBox { * automatically generated by rust-bindgen * $ bindgen /usr/include/stdio.h \ * --no-layout-tests \ - * --whitelist-function vsnprintf \ + * --allowlist-function vsnprintf \ * -o vsnprintf.rs */ diff --git a/rutabaga_gfx/src/rutabaga_gralloc/minigbm_bindings.rs b/rutabaga_gfx/src/rutabaga_gralloc/minigbm_bindings.rs index 9a44fda259..366b3ad740 100644 --- a/rutabaga_gfx/src/rutabaga_gralloc/minigbm_bindings.rs +++ b/rutabaga_gfx/src/rutabaga_gralloc/minigbm_bindings.rs @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Generated with bindgen --whitelist-function='gbm_.*' --whitelist-type='gbm_.*' minigbm/gbm.h +// Generated with bindgen --allowlist-function='gbm_.*' --allowlist-type='gbm_.*' minigbm/gbm.h // Then modified manually #![cfg(feature = "minigbm")] diff --git a/x86_64/src/bootparam.rs b/x86_64/src/bootparam.rs index fd8e1d5a58..df7b037924 100644 --- a/x86_64/src/bootparam.rs +++ b/x86_64/src/bootparam.rs @@ -7,7 +7,7 @@ * From chromeos-linux v4.19 * $ bindgen \ * --no-layout-tests --with-derive-default --no-doc-comments \ - * --whitelist-type boot_params --whitelist-type setup_data \ + * --allowlist-type boot_params --allowlist-type setup_data \ * arch/x86/include/uapi/asm/bootparam.h */