2001-12-17 17:04:10 +03:00
/*
2004-03-30 23:35:44 +04:00
* Copyright ( C ) 2001 - 2004 Sistina Software , Inc . All rights reserved .
2007-08-21 00:55:30 +04:00
* Copyright ( C ) 2004 - 2007 Red Hat , Inc . All rights reserved .
2001-12-17 17:04:10 +03:00
*
2004-03-30 23:35:44 +04: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
2007-08-21 00:55:30 +04:00
* of the GNU Lesser General Public License v .2 .1 .
2004-03-30 23:35:44 +04:00
*
2007-08-21 00:55:30 +04:00
* You should have received a copy of the GNU Lesser General Public License
2004-03-30 23:35:44 +04:00
* 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-17 17:04:10 +03:00
*/
# ifndef _LVM_STRING_H
# define _LVM_STRING_H
2002-01-21 14:06:32 +03:00
# include <stdio.h>
2001-12-17 17:04:10 +03:00
# include <stdarg.h>
2006-04-19 19:33:07 +04:00
# define NAME_LEN 128
2010-04-14 17:01:38 +04:00
# define UUID_PREFIX "LVM-"
2006-04-19 19:33:07 +04:00
2004-09-15 19:02:36 +04:00
struct pool ;
2007-07-20 19:38:19 +04:00
int emit_to_buffer ( char * * buffer , size_t * size , const char * fmt , . . . )
__attribute__ ( ( format ( printf , 3 , 4 ) ) ) ;
2003-09-18 00:35:57 +04:00
2010-04-14 17:01:38 +04:00
char * build_dm_uuid ( struct dm_pool * mem , const char * lvid ,
const char * layer ) ;
2004-09-15 19:02:36 +04:00
2006-04-19 19:33:07 +04:00
int validate_name ( const char * n ) ;
2010-11-17 13:19:29 +03:00
int validate_tag ( const char * n ) ;
2006-04-19 19:33:07 +04:00
2010-04-23 18:16:32 +04:00
int apply_lvname_restrictions ( const char * name ) ;
int is_reserved_lvname ( const char * name ) ;
2001-12-17 17:04:10 +03:00
# endif