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 ,
* Inc . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 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 ;
struct dm_ioctl_v1 ;
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 ;
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 ;
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 ;
2003-01-21 21:27:36 +00:00
union {
2003-04-30 13:48:53 +00:00
struct dm_ioctl * v4 ;
2003-01-21 21:27:36 +00:00
struct dm_ioctl_v1 * v1 ;
} 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 ;
2005-11-22 18:43:12 +00:00
int suppress_identical_reload ;
2002-03-11 22:44:36 +00:00
char * uuid ;
2001-12-05 16:41:52 +00:00
} ;
2003-01-21 21:27:36 +00:00
struct cmd_data {
const char * name ;
const int cmd ;
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 ) ;
# endif