2010-02-24 21:16:54 +03:00
/*
2013-07-13 00:40:10 +04:00
* Copyright ( C ) 2008 - 2013 Red Hat , Inc . All rights reserved .
2010-02-24 21:16:54 +03:00
*
* This file is part of LVM2 .
*
* 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
2010-02-24 21:16:54 +03:00
*/
# ifndef _LVM2APP_MISC_H
# define _LVM2APP_MISC_H
2010-07-09 20:57:34 +04:00
# include "libdevmapper.h"
2010-12-15 02:20:58 +03:00
# include "lvm2app.h"
2013-09-11 03:01:28 +04:00
# include "metadata-exported.h"
2013-12-18 02:51:11 +04:00
# include "toolcontext.h"
# include <sys/types.h>
# include <sys/stat.h>
struct saved_env
{
mode_t user_umask ;
} ;
struct saved_env store_user_env ( struct cmd_context * cmd ) ;
void restore_user_env ( const struct saved_env * env ) ;
2010-02-24 21:16:54 +03:00
struct dm_list * tag_list_copy ( struct dm_pool * p , struct dm_list * tag_list ) ;
2010-10-25 18:08:43 +04:00
struct lvm_property_value get_property ( const pv_t pv , const vg_t vg ,
2010-11-17 23:09:42 +03:00
const lv_t lv , const lvseg_t lvseg ,
2013-09-11 03:01:28 +04:00
const pvseg_t pvseg ,
const struct lvcreate_params * lvcp ,
const struct pvcreate_params * pvcp ,
2013-07-13 00:40:10 +04:00
const char * name ) ;
2010-11-17 22:16:05 +03:00
int set_property ( const pv_t pv , const vg_t vg , const lv_t lv ,
2013-09-11 03:01:28 +04:00
struct lvcreate_params * lvcp ,
struct pvcreate_params * pvcp ,
const char * name ,
2013-07-13 00:40:10 +04:00
struct lvm_property_value * value ) ;
2010-02-24 21:16:54 +03:00
# endif