2001-12-05 19:41:52 +03:00
/*
2004-03-30 23:08:57 +04:00
* Copyright ( C ) 2001 - 2004 Sistina Software , Inc . All rights reserved .
2007-08-21 20:26:07 +04:00
* Copyright ( C ) 2004 - 2006 Red Hat , Inc . All rights reserved .
2001-12-05 19:41:52 +03:00
*
2004-03-30 23:08:57 +04:00
* This file is part of the device - mapper userspace tools .
*
* This copyrighted material is made available to anyone wishing to use ,
* modify , copy , or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License v .2 .1 .
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program ; if not , write to the Free Software Foundation ,
2016-01-21 13:49:46 +03:00
* Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA
2001-12-05 19:41:52 +03:00
*/
2002-11-14 17:44:42 +03:00
# ifndef LIB_DMTARGETS_H
# define LIB_DMTARGETS_H
2003-01-22 00:27:36 +03:00
# include <inttypes.h>
2005-01-06 01:00:40 +03:00
# include <sys/types.h>
2003-01-22 00:27:36 +03:00
struct dm_ioctl ;
2002-11-14 17:44:42 +03:00
2001-12-05 19:41:52 +03:00
struct target {
uint64_t start ;
uint64_t length ;
char * type ;
char * params ;
struct target * next ;
} ;
struct dm_task {
int type ;
char * dev_name ;
2012-02-15 15:27:01 +04:00
char * mangled_dev_name ;
2001-12-05 19:41:52 +03:00
struct target * head , * tail ;
2002-01-03 13:39:21 +03:00
int read_only ;
2003-04-29 15:34:23 +04:00
uint32_t event_nr ;
2003-04-02 23:03:00 +04:00
int major ;
2002-01-11 15:12:46 +03:00
int minor ;
2009-06-18 00:55:24 +04:00
int allow_default_major_fallback ;
2005-01-06 01:00:40 +03:00
uid_t uid ;
gid_t gid ;
mode_t mode ;
2007-11-27 23:57:05 +03:00
uint32_t read_ahead ;
uint32_t read_ahead_flags ;
2021-04-03 15:25:56 +03:00
union dmi_u {
2003-04-30 17:48:53 +04:00
struct dm_ioctl * v4 ;
2003-01-22 00:27:36 +03:00
} dmi ;
2002-01-11 02:29:16 +03:00
char * newname ;
2004-06-09 00:34:40 +04:00
char * message ;
2006-02-21 02:55:58 +03:00
char * geometry ;
2004-06-09 00:34:40 +04:00
uint64_t sector ;
2006-10-12 21:29:05 +04:00
int no_flush ;
2005-01-13 01:10:14 +03:00
int no_open_count ;
2005-10-05 00:12:32 +04:00
int skip_lockfs ;
2009-11-06 03:43:08 +03:00
int query_inactive_table ;
2005-11-22 21:43:12 +03:00
int suppress_identical_reload ;
2011-02-04 22:33:53 +03:00
dm_add_node_t add_node ;
2008-09-18 22:34:53 +04:00
uint64_t existing_table_size ;
2009-08-03 22:01:45 +04:00
int cookie_set ;
2010-10-15 05:10:27 +04:00
int new_uuid ;
2011-02-04 19:08:11 +03:00
int secure_data ;
2011-09-22 21:09:48 +04:00
int retry_remove ;
2014-08-16 03:34:48 +04:00
int deferred_remove ;
2011-07-01 18:09:19 +04:00
int enable_checks ;
2011-10-19 20:36:01 +04:00
int expected_errno ;
2015-05-26 17:13:49 +03:00
int ioctl_errno ;
2021-07-13 04:06:04 +03:00
int ima_measurement ;
2002-03-12 01:44:36 +03:00
2015-08-05 10:28:35 +03:00
int record_timestamp ;
2002-03-12 01:44:36 +03:00
char * uuid ;
2012-10-10 19:00:41 +04:00
char * mangled_uuid ;
2001-12-05 19:41:52 +03:00
} ;
2003-01-22 00:27:36 +03:00
struct cmd_data {
2024-05-03 15:28:58 +03:00
const char name [ 16 ] ;
2014-07-02 12:27:13 +04:00
const unsigned cmd ;
2003-01-22 00:27:36 +03:00
const int version [ 3 ] ;
} ;
2002-11-14 17:44:42 +03:00
2003-01-22 00:27:36 +03:00
int dm_check_version ( void ) ;
2008-09-18 22:34:53 +04:00
uint64_t dm_task_get_existing_table_size ( struct dm_task * dmt ) ;
2003-01-22 00:27:36 +03:00
# endif