Changed the type of the "op" parameter of the fs_vnode_ops::ioctl() hook and

the _kern_ioctl() syscall from ulong to uint32.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36927 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2010-05-24 21:04:22 +00:00
parent d34daac82a
commit 9d570af7c8
19 changed files with 23 additions and 26 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2004-2009, Haiku Inc. All Rights Reserved. * Copyright 2004-2010, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _FS_INTERFACE_H #ifndef _FS_INTERFACE_H
@@ -142,7 +142,7 @@ struct fs_vnode_ops {
/* common operations */ /* common operations */
status_t (*ioctl)(fs_volume* volume, fs_vnode* vnode, void* cookie, status_t (*ioctl)(fs_volume* volume, fs_vnode* vnode, void* cookie,
ulong op, void* buffer, size_t length); uint32 op, void* buffer, size_t length);
status_t (*set_flags)(fs_volume* volume, fs_vnode* vnode, void* cookie, status_t (*set_flags)(fs_volume* volume, fs_vnode* vnode, void* cookie,
int flags); int flags);
status_t (*select)(fs_volume* volume, fs_vnode* vnode, void* cookie, status_t (*select)(fs_volume* volume, fs_vnode* vnode, void* cookie,
@@ -1490,8 +1490,6 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// #pragma mark - fssh_types.h // #pragma mark - fssh_types.h
#define ulong fssh_ulong
#define addr_t fssh_addr_t #define addr_t fssh_addr_t
#define phys_addr_t fssh_phys_addr_t #define phys_addr_t fssh_phys_addr_t
+1 -1
View File
@@ -157,7 +157,7 @@ struct fssh_fs_vnode_ops {
/* common operations */ /* common operations */
fssh_status_t (*ioctl)(fssh_fs_volume *volume, fssh_fs_vnode *vnode, fssh_status_t (*ioctl)(fssh_fs_volume *volume, fssh_fs_vnode *vnode,
fssh_fs_cookie cookie, fssh_ulong op, void *buffer, fssh_fs_cookie cookie, uint32_t op, void *buffer,
fssh_size_t length); fssh_size_t length);
fssh_status_t (*set_flags)(fssh_fs_volume *volume, fssh_fs_vnode *vnode, fssh_status_t (*set_flags)(fssh_fs_volume *volume, fssh_fs_vnode *vnode,
fssh_fs_cookie cookie, int flags); fssh_fs_cookie cookie, int flags);
+1 -2
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2007-2010, Ingo Weinhold, [email protected].de. * Copyright 2007-2010, Ingo Weinhold, ingo_weinhold@gmx.de.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
*/ */
#ifndef _FSSH_TYPES_H #ifndef _FSSH_TYPES_H
@@ -9,7 +9,6 @@
#include <inttypes.h> #include <inttypes.h>
typedef uint32_t fssh_ulong;
typedef volatile int32_t vint32_t; typedef volatile int32_t vint32_t;
typedef volatile int64_t vint64_t; typedef volatile int64_t vint64_t;
+1 -1
View File
@@ -232,7 +232,7 @@ ssize_t _user_readv(int fd, off_t pos, const iovec *vecs, size_t count);
ssize_t _user_write(int fd, off_t pos, const void *buffer, ssize_t _user_write(int fd, off_t pos, const void *buffer,
size_t bufferSize); size_t bufferSize);
ssize_t _user_writev(int fd, off_t pos, const iovec *vecs, size_t count); ssize_t _user_writev(int fd, off_t pos, const iovec *vecs, size_t count);
status_t _user_ioctl(int fd, ulong cmd, void *data, size_t length); status_t _user_ioctl(int fd, uint32 cmd, void *data, size_t length);
ssize_t _user_read_dir(int fd, struct dirent *buffer, size_t bufferSize, ssize_t _user_read_dir(int fd, struct dirent *buffer, size_t bufferSize,
uint32 maxCount); uint32 maxCount);
status_t _user_rewind_dir(int fd); status_t _user_rewind_dir(int fd);
+1 -1
View File
@@ -299,7 +299,7 @@ extern ssize_t _kern_write(int fd, off_t pos, const void *buffer,
size_t bufferSize); size_t bufferSize);
extern ssize_t _kern_writev(int fd, off_t pos, const struct iovec *vecs, extern ssize_t _kern_writev(int fd, off_t pos, const struct iovec *vecs,
size_t count); size_t count);
extern status_t _kern_ioctl(int fd, ulong cmd, void *data, size_t length); extern status_t _kern_ioctl(int fd, uint32 cmd, void *data, size_t length);
extern ssize_t _kern_read_dir(int fd, struct dirent *buffer, extern ssize_t _kern_read_dir(int fd, struct dirent *buffer,
size_t bufferSize, uint32 maxCount); size_t bufferSize, uint32 maxCount);
extern status_t _kern_rewind_dir(int fd); extern status_t _kern_rewind_dir(int fd);
@@ -610,7 +610,7 @@ bfs_get_vnode_name(fs_volume* _volume, fs_vnode* _node, char* buffer,
static status_t static status_t
bfs_ioctl(fs_volume* _volume, fs_vnode* _node, void* _cookie, ulong cmd, bfs_ioctl(fs_volume* _volume, fs_vnode* _node, void* _cookie, uint32 cmd,
void* buffer, size_t bufferLength) void* buffer, size_t bufferLength)
{ {
FUNCTION_START(("node = %p, cmd = %lu, buf = %p, len = %ld\n", _node, cmd, FUNCTION_START(("node = %p, cmd = %lu, buf = %p, len = %ld\n", _node, cmd,
+1 -1
View File
@@ -1138,7 +1138,7 @@ bi: UNLOCK_VOL(vol);
static status_t static status_t
dosfs_ioctl(fs_volume *_vol, fs_vnode *_node, void *cookie, ulong code, dosfs_ioctl(fs_volume *_vol, fs_vnode *_node, void *cookie, uint32 code,
void *buf, size_t len) void *buf, size_t len)
{ {
status_t result = B_OK; status_t result = B_OK;
@@ -1212,7 +1212,7 @@ overlay_get_file_map(fs_volume *volume, fs_vnode *vnode, off_t offset,
static status_t static status_t
overlay_ioctl(fs_volume *volume, fs_vnode *vnode, void *cookie, ulong op, overlay_ioctl(fs_volume *volume, fs_vnode *vnode, void *cookie, uint32 op,
void *buffer, size_t length) void *buffer, size_t length)
{ {
OVERLAY_CALL(ioctl, cookie, op, buffer, length) OVERLAY_CALL(ioctl, cookie, op, buffer, length)
@@ -200,7 +200,7 @@ overlay_get_file_map(fs_volume *volume, fs_vnode *vnode, off_t offset,
static status_t static status_t
overlay_ioctl(fs_volume *volume, fs_vnode *vnode, void *cookie, ulong op, overlay_ioctl(fs_volume *volume, fs_vnode *vnode, void *cookie, uint32 op,
void *buffer, size_t length) void *buffer, size_t length)
{ {
DO_LOG("ioctl cookie: %p; op: %lu; buffer: %p; size: %lu\n", cookie, op, DO_LOG("ioctl cookie: %p; op: %lu; buffer: %p; size: %lu\n", cookie, op,
@@ -1734,7 +1734,7 @@ overlay_get_file_map(fs_volume *volume, fs_vnode *vnode, off_t offset,
static status_t static status_t
overlay_ioctl(fs_volume *volume, fs_vnode *vnode, void *cookie, ulong op, overlay_ioctl(fs_volume *volume, fs_vnode *vnode, void *cookie, uint32 op,
void *buffer, size_t length) void *buffer, size_t length)
{ {
OVERLAY_CALL(ioctl, cookie, op, buffer, length) OVERLAY_CALL(ioctl, cookie, op, buffer, length)
@@ -277,7 +277,7 @@ FUNCTION(("node: %Ld\n", ((Node*)_node)->GetID()));
// ramfs_ioctl // ramfs_ioctl
static status_t static status_t
ramfs_ioctl(fs_volume fs, fs_vnode /*node*/, fs_cookie /*cookie*/, ulong cmd, ramfs_ioctl(fs_volume fs, fs_vnode /*node*/, fs_cookie /*cookie*/, uint32 cmd,
void *buffer, size_t /*length*/) void *buffer, size_t /*length*/)
{ {
@@ -287,7 +287,7 @@ userlandfs_cancel_io(fs_volume* fsVolume, fs_vnode* fsNode, void *cookie,
// userlandfs_ioctl // userlandfs_ioctl
static status_t static status_t
userlandfs_ioctl(fs_volume* fsVolume, fs_vnode* fsNode, void* cookie, ulong op, userlandfs_ioctl(fs_volume* fsVolume, fs_vnode* fsNode, void* cookie, uint32 op,
void* buffer, size_t length) void* buffer, size_t length)
{ {
Volume* volume = (Volume*)fsVolume->private_volume; Volume* volume = (Volume*)fsVolume->private_volume;
+1 -1
View File
@@ -1472,7 +1472,7 @@ devfs_rewind_dir(fs_volume *_volume, fs_vnode *_vnode, void *_cookie)
specific functionality, like partitions. specific functionality, like partitions.
*/ */
static status_t static status_t
devfs_ioctl(fs_volume *_volume, fs_vnode *_vnode, void *_cookie, ulong op, devfs_ioctl(fs_volume *_volume, fs_vnode *_vnode, void *_cookie, uint32 op,
void *buffer, size_t length) void *buffer, size_t length)
{ {
struct devfs_vnode *vnode = (struct devfs_vnode *)_vnode->private_node; struct devfs_vnode *vnode = (struct devfs_vnode *)_vnode->private_node;
+4 -4
View File
@@ -506,7 +506,7 @@ dup_foreign_fd(team_id fromTeam, int fd, bool kernel)
static status_t static status_t
fd_ioctl(bool kernelFD, int fd, ulong op, void* buffer, size_t length) fd_ioctl(bool kernelFD, int fd, uint32 op, void* buffer, size_t length)
{ {
struct file_descriptor* descriptor; struct file_descriptor* descriptor;
int status; int status;
@@ -842,7 +842,7 @@ common_user_vector_io(int fd, off_t pos, const iovec* userVecs, size_t count,
status_t status_t
user_fd_kernel_ioctl(int fd, ulong op, void* buffer, size_t length) user_fd_kernel_ioctl(int fd, uint32 op, void* buffer, size_t length)
{ {
TRACE(("user_fd_kernel_ioctl: fd %d\n", fd)); TRACE(("user_fd_kernel_ioctl: fd %d\n", fd));
@@ -905,7 +905,7 @@ _user_seek(int fd, off_t pos, int seekType)
status_t status_t
_user_ioctl(int fd, ulong op, void* buffer, size_t length) _user_ioctl(int fd, uint32 op, void* buffer, size_t length)
{ {
if (!IS_USER_ADDRESS(buffer)) if (!IS_USER_ADDRESS(buffer))
return B_BAD_ADDRESS; return B_BAD_ADDRESS;
@@ -1228,7 +1228,7 @@ _kern_seek(int fd, off_t pos, int seekType)
status_t status_t
_kern_ioctl(int fd, ulong op, void* buffer, size_t length) _kern_ioctl(int fd, uint32 op, void* buffer, size_t length)
{ {
TRACE(("kern_ioctl: fd %d\n", fd)); TRACE(("kern_ioctl: fd %d\n", fd));
+1 -1
View File
@@ -891,7 +891,7 @@ fifo_write_stat(fs_volume *volume, fs_vnode *vnode, const struct ::stat *st,
static status_t static status_t
fifo_ioctl(fs_volume *_volume, fs_vnode *_vnode, void *_cookie, ulong op, fifo_ioctl(fs_volume *_volume, fs_vnode *_vnode, void *_cookie, uint32 op,
void *buffer, size_t length) void *buffer, size_t length)
{ {
TRACE(("fifo_ioctl: vnode %p, cookie %p, op %ld, buf %p, len %ld\n", TRACE(("fifo_ioctl: vnode %p, cookie %p, op %ld, buf %p, len %ld\n",
+1 -1
View File
@@ -805,7 +805,7 @@ rootfs_rewind_dir(fs_volume* _volume, fs_vnode* _vnode, void* _cookie)
static status_t static status_t
rootfs_ioctl(fs_volume* _volume, fs_vnode* _v, void* _cookie, ulong op, rootfs_ioctl(fs_volume* _volume, fs_vnode* _v, void* _cookie, uint32 op,
void* buffer, size_t length) void* buffer, size_t length)
{ {
TRACE(("rootfs_ioctl: vnode %p, cookie %p, op %d, buf %p, length %d\n", TRACE(("rootfs_ioctl: vnode %p, cookie %p, op %d, buf %p, length %d\n",
+1 -1
View File
@@ -243,7 +243,7 @@ socket_write(struct file_descriptor *descriptor, off_t pos, const void *buffer,
static status_t static status_t
socket_ioctl(struct file_descriptor *descriptor, ulong op, void *buffer, socket_ioctl(struct file_descriptor *descriptor, uint32 op, void *buffer,
size_t length) size_t length)
{ {
return sStackInterface->ioctl(descriptor->u.socket, op, buffer, length); return sStackInterface->ioctl(descriptor->u.socket, op, buffer, length);
+2 -2
View File
@@ -320,7 +320,7 @@ static status_t query_rewind(struct file_descriptor* descriptor);
static void query_free_fd(struct file_descriptor* descriptor); static void query_free_fd(struct file_descriptor* descriptor);
static status_t query_close(struct file_descriptor* descriptor); static status_t query_close(struct file_descriptor* descriptor);
static status_t common_ioctl(struct file_descriptor* descriptor, ulong op, static status_t common_ioctl(struct file_descriptor* descriptor, uint32 op,
void* buffer, size_t length); void* buffer, size_t length);
static status_t common_read_stat(struct file_descriptor* descriptor, static status_t common_read_stat(struct file_descriptor* descriptor,
struct stat* statData); struct stat* statData);
@@ -5827,7 +5827,7 @@ dir_remove(int fd, char* path, bool kernel)
static status_t static status_t
common_ioctl(struct file_descriptor* descriptor, ulong op, void* buffer, common_ioctl(struct file_descriptor* descriptor, uint32 op, void* buffer,
size_t length) size_t length)
{ {
struct vnode* vnode = descriptor->u.vnode; struct vnode* vnode = descriptor->u.vnode;