Skip to main content

starnix_core/device/
block.rs

1// Copyright 2026 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use crate::task::CurrentTask;
6use starnix_uapi::uapi;
7use starnix_uapi::user_address::ArchSpecific;
8
9pub fn canonicalize_ioctl_request(current_task: &CurrentTask, request: u32) -> u32 {
10    if current_task.is_arch32() {
11        match request {
12            uapi::arch32::BLKGETSIZE64 => uapi::BLKGETSIZE64,
13            _ => request,
14        }
15    } else {
16        request
17    }
18}