From b802b65b0969c6da27060f114d5c206fdb79dd90 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 11 Nov 2024 13:26:44 -0500 Subject: [PATCH] libntfs: Don't use "ioctl" as a struct name. This will allow unistd.h to define it even in _KERNEL_MODE. Change-Id: I6669c670353dda7cc202017d707a6bce3b5519e0 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8561 Reviewed-by: waddlesplash --- src/add-ons/kernel/file_systems/ntfs/libntfs/device.c | 4 ++-- src/add-ons/kernel/file_systems/ntfs/libntfs/device.h | 2 +- src/add-ons/kernel/file_systems/ntfs/libntfs/unix_io.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/add-ons/kernel/file_systems/ntfs/libntfs/device.c b/src/add-ons/kernel/file_systems/ntfs/libntfs/device.c index b58c8026ad..aa3bbc6b5b 100644 --- a/src/add-ons/kernel/file_systems/ntfs/libntfs/device.c +++ b/src/add-ons/kernel/file_systems/ntfs/libntfs/device.c @@ -606,9 +606,9 @@ s64 ntfs_device_size_get(struct ntfs_device *dev, int block_size) partition_info partitionInfo; device_geometry geometry; - if (dev->d_ops->ioctl(dev, B_GET_PARTITION_INFO, &partitionInfo) == 0) + if (dev->d_ops->control(dev, B_GET_PARTITION_INFO, &partitionInfo) == 0) size = partitionInfo.size; - else if (dev->d_ops->ioctl(dev, B_GET_GEOMETRY, &geometry) == 0) { + else if (dev->d_ops->control(dev, B_GET_GEOMETRY, &geometry) == 0) { size = (off_t)geometry.cylinder_count * geometry.sectors_per_track * geometry.head_count * geometry.bytes_per_sector; } diff --git a/src/add-ons/kernel/file_systems/ntfs/libntfs/device.h b/src/add-ons/kernel/file_systems/ntfs/libntfs/device.h index 709cb4faf5..2c51f31316 100644 --- a/src/add-ons/kernel/file_systems/ntfs/libntfs/device.h +++ b/src/add-ons/kernel/file_systems/ntfs/libntfs/device.h @@ -111,7 +111,7 @@ struct ntfs_device_operations { s64 offset); int (*sync)(struct ntfs_device *dev); int (*stat)(struct ntfs_device *dev, struct stat *buf); - int (*ioctl)(struct ntfs_device *dev, unsigned long request, + int (*control)(struct ntfs_device *dev, unsigned long request, void *argp); }; diff --git a/src/add-ons/kernel/file_systems/ntfs/libntfs/unix_io.c b/src/add-ons/kernel/file_systems/ntfs/libntfs/unix_io.c index 5495a6a40e..4509ee4b3b 100644 --- a/src/add-ons/kernel/file_systems/ntfs/libntfs/unix_io.c +++ b/src/add-ons/kernel/file_systems/ntfs/libntfs/unix_io.c @@ -388,5 +388,5 @@ struct ntfs_device_operations ntfs_device_unix_io_ops = { .pwrite = ntfs_device_unix_io_pwrite, .sync = ntfs_device_unix_io_sync, .stat = ntfs_device_unix_io_stat, - .ioctl = ntfs_device_unix_io_ioctl, + .control = ntfs_device_unix_io_ioctl, };