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 .
* Copyright ( C ) 2004 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 ,
* Inc . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 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 ;
struct dm_ioctl_v1 ;
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 ;
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 ;
2005-01-06 01:00:40 +03:00
uid_t uid ;
gid_t gid ;
mode_t mode ;
2003-01-22 00:27:36 +03:00
union {
2003-04-30 17:48:53 +04:00
struct dm_ioctl * v4 ;
2003-01-22 00:27:36 +03:00
struct dm_ioctl_v1 * v1 ;
} dmi ;
2002-01-11 02:29:16 +03:00
char * newname ;
2004-06-09 00:34:40 +04:00
char * message ;
uint64_t sector ;
2005-01-13 01:10:14 +03:00
int no_open_count ;
2005-10-05 00:12:32 +04:00
int skip_lockfs ;
2002-03-12 01:44:36 +03:00
char * uuid ;
2001-12-05 19:41:52 +03:00
} ;
2003-01-22 00:27:36 +03:00
struct cmd_data {
const char * name ;
const int cmd ;
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 ) ;
# endif