2001-12-05 16:41:52 +00:00
/*
2004-03-30 19:08:57 +00:00
* Copyright ( C ) 2001 - 2004 Sistina Software , Inc . All rights reserved .
2007-08-21 16:26:07 +00:00
* Copyright ( C ) 2004 - 2006 Red Hat , Inc . All rights reserved .
2001-12-05 16:41:52 +00:00
*
2004-03-30 19:08:57 +00: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 11:49:46 +01:00
* Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA
2001-12-05 16:41:52 +00:00
*/
2002-11-14 14:44:42 +00:00
# ifndef LIB_DMTARGETS_H
# define LIB_DMTARGETS_H
2003-01-21 21:27:36 +00:00
# include <inttypes.h>
2005-01-05 22:00:40 +00:00
# include <sys/types.h>
2003-01-21 21:27:36 +00:00
struct dm_ioctl ;
2002-11-14 14:44:42 +00:00
2001-12-05 16:41:52 +00: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 11:27:01 +00:00
char * mangled_dev_name ;
2001-12-05 16:41:52 +00:00
struct target * head , * tail ;
2002-01-03 10:39:21 +00:00
int read_only ;
2003-04-29 11:34:23 +00:00
uint32_t event_nr ;
2003-04-02 19:03:00 +00:00
int major ;
2002-01-11 12:12:46 +00:00
int minor ;
2009-06-17 20:55:24 +00:00
int allow_default_major_fallback ;
2005-01-05 22:00:40 +00:00
uid_t uid ;
gid_t gid ;
mode_t mode ;
2007-11-27 20:57:05 +00:00
uint32_t read_ahead ;
uint32_t read_ahead_flags ;
2021-04-03 14:25:56 +02:00
union dmi_u {
2003-04-30 13:48:53 +00:00
struct dm_ioctl * v4 ;
2003-01-21 21:27:36 +00:00
} dmi ;
2002-01-10 23:29:16 +00:00
char * newname ;
2004-06-08 20:34:40 +00:00
char * message ;
2006-02-20 23:55:58 +00:00
char * geometry ;
2004-06-08 20:34:40 +00:00
uint64_t sector ;
2006-10-12 17:29:05 +00:00
int no_flush ;
2005-01-12 22:10:14 +00:00
int no_open_count ;
2005-10-04 20:12:32 +00:00
int skip_lockfs ;
2009-11-06 00:43:08 +00:00
int query_inactive_table ;
2005-11-22 18:43:12 +00:00
int suppress_identical_reload ;
2011-02-04 19:33:53 +00:00
dm_add_node_t add_node ;
2008-09-18 18:34:53 +00:00
uint64_t existing_table_size ;
2009-08-03 18:01:45 +00:00
int cookie_set ;
2010-10-15 01:10:27 +00:00
int new_uuid ;
2011-02-04 16:08:11 +00:00
int secure_data ;
2011-09-22 17:09:48 +00:00
int retry_remove ;
2014-08-16 00:34:48 +01:00
int deferred_remove ;
2011-07-01 14:09:19 +00:00
int enable_checks ;
2011-10-19 16:36:01 +00:00
int expected_errno ;
2015-05-26 15:13:49 +01:00
int ioctl_errno ;
2021-07-13 02:06:04 +01:00
int ima_measurement ;
2002-03-11 22:44:36 +00:00
2015-08-05 08:28:35 +01:00
int record_timestamp ;
2002-03-11 22:44:36 +00:00
char * uuid ;
2012-10-10 17:00:41 +02:00
char * mangled_uuid ;
2001-12-05 16:41:52 +00:00
} ;
2003-01-21 21:27:36 +00:00
struct cmd_data {
const char * name ;
2014-07-02 10:27:13 +02:00
const unsigned cmd ;
2003-01-21 21:27:36 +00:00
const int version [ 3 ] ;
} ;
2002-11-14 14:44:42 +00:00
2003-01-21 21:27:36 +00:00
int dm_check_version ( void ) ;
2008-09-18 18:34:53 +00:00
uint64_t dm_task_get_existing_table_size ( struct dm_task * dmt ) ;
2003-01-21 21:27:36 +00:00
# endif