Added B_TRIM_DEVICE ioctl.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2011, Haiku Inc. All Rights Reserved.
|
* Copyright 2002-2013, Haiku Inc. All Rights Reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _DRIVERS_DRIVERS_H
|
#ifndef _DRIVERS_DRIVERS_H
|
||||||
@@ -106,6 +106,7 @@ enum {
|
|||||||
B_GET_ICON_NAME, /* get an icon name identifier */
|
B_GET_ICON_NAME, /* get an icon name identifier */
|
||||||
B_GET_VECTOR_ICON, /* retrieves the device's vector icon */
|
B_GET_VECTOR_ICON, /* retrieves the device's vector icon */
|
||||||
B_GET_DEVICE_NAME, /* get name, string buffer */
|
B_GET_DEVICE_NAME, /* get name, string buffer */
|
||||||
|
B_TRIM_DEVICE, /* trims blocks, see fs_trim_data */
|
||||||
|
|
||||||
B_GET_NEXT_OPEN_DEVICE = 1000, /* obsolete, will be removed */
|
B_GET_NEXT_OPEN_DEVICE = 1000, /* obsolete, will be removed */
|
||||||
B_ADD_FIXED_DRIVER, /* obsolete, will be removed */
|
B_ADD_FIXED_DRIVER, /* obsolete, will be removed */
|
||||||
@@ -169,6 +170,14 @@ typedef struct {
|
|||||||
} device_icon;
|
} device_icon;
|
||||||
|
|
||||||
|
|
||||||
|
/* B_TRIM_DEVICE data structure */
|
||||||
|
typedef struct {
|
||||||
|
off_t offset; /* offset (in bytes) */
|
||||||
|
off_t size;
|
||||||
|
off_t trimmed_size; /* filled on return */
|
||||||
|
} fs_trim_data;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -435,6 +435,10 @@
|
|||||||
#define B_SET_INTERRUPTABLE_IO FSSH_B_SET_INTERRUPTABLE_IO
|
#define B_SET_INTERRUPTABLE_IO FSSH_B_SET_INTERRUPTABLE_IO
|
||||||
#define B_FLUSH_DRIVE_CACHE FSSH_B_FLUSH_DRIVE_CACHE
|
#define B_FLUSH_DRIVE_CACHE FSSH_B_FLUSH_DRIVE_CACHE
|
||||||
#define B_GET_PATH_FOR_DEVICE FSSH_B_GET_PATH_FOR_DEVICE
|
#define B_GET_PATH_FOR_DEVICE FSSH_B_GET_PATH_FOR_DEVICE
|
||||||
|
#define B_GET_ICON_NAME FSSH_B_GET_ICON_NAME
|
||||||
|
#define B_GET_VECTOR_ICON FSSH_B_GET_VECTOR_ICON
|
||||||
|
#define B_GET_DEVICE_NAME FSSH_B_GET_DEVICE_NAME
|
||||||
|
#define B_TRIM_DEVICE FSSH_B_TRIM_DEVICE
|
||||||
#define B_GET_NEXT_OPEN_DEVICE FSSH_B_GET_NEXT_OPEN_DEVICE
|
#define B_GET_NEXT_OPEN_DEVICE FSSH_B_GET_NEXT_OPEN_DEVICE
|
||||||
#define B_ADD_FIXED_DRIVER FSSH_B_ADD_FIXED_DRIVER
|
#define B_ADD_FIXED_DRIVER FSSH_B_ADD_FIXED_DRIVER
|
||||||
#define B_REMOVE_FIXED_DRIVER FSSH_B_REMOVE_FIXED_DRIVER
|
#define B_REMOVE_FIXED_DRIVER FSSH_B_REMOVE_FIXED_DRIVER
|
||||||
@@ -462,6 +466,7 @@
|
|||||||
#define driver_path fssh_driver_path
|
#define driver_path fssh_driver_path
|
||||||
#define open_device_iterator fssh_open_device_iterator
|
#define open_device_iterator fssh_open_device_iterator
|
||||||
#define device_icon fssh_device_icon
|
#define device_icon fssh_device_icon
|
||||||
|
#define fs_trim_data fssh_fs_trim_data
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -120,8 +120,11 @@ enum {
|
|||||||
FSSH_B_SET_INTERRUPTABLE_IO, /* allow cntl-C to interrupt i/o */
|
FSSH_B_SET_INTERRUPTABLE_IO, /* allow cntl-C to interrupt i/o */
|
||||||
|
|
||||||
FSSH_B_FLUSH_DRIVE_CACHE, /* flush drive cache */
|
FSSH_B_FLUSH_DRIVE_CACHE, /* flush drive cache */
|
||||||
|
|
||||||
FSSH_B_GET_PATH_FOR_DEVICE, /* get the absolute path of the device */
|
FSSH_B_GET_PATH_FOR_DEVICE, /* get the absolute path of the device */
|
||||||
|
FSSH_B_GET_ICON_NAME, /* get an icon name identifier */
|
||||||
|
FSSH_B_GET_VECTOR_ICON, /* retrieves the device's vector icon */
|
||||||
|
FSSH_B_GET_DEVICE_NAME, /* get name, string buffer */
|
||||||
|
FSSH_B_TRIM_DEVICE, /* trims blocks, see fs_trim_data */
|
||||||
|
|
||||||
FSSH_B_GET_NEXT_OPEN_DEVICE = 1000, /* iterate through open devices */
|
FSSH_B_GET_NEXT_OPEN_DEVICE = 1000, /* iterate through open devices */
|
||||||
FSSH_B_ADD_FIXED_DRIVER, /* private */
|
FSSH_B_ADD_FIXED_DRIVER, /* private */
|
||||||
@@ -210,6 +213,14 @@ typedef struct {
|
|||||||
} fssh_device_icon;
|
} fssh_device_icon;
|
||||||
|
|
||||||
|
|
||||||
|
/* B_TRIM_DEVICE data structure */
|
||||||
|
typedef struct {
|
||||||
|
fssh_off_t offset; /* offset (in bytes) */
|
||||||
|
fssh_off_t size;
|
||||||
|
fssh_off_t trimmed_size; /* filled on return */
|
||||||
|
} fssh_fs_trim_data;
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user