|
Packit Service |
360c39 |
#ifndef __GFS2_MKFS_DOT_H__
|
|
Packit Service |
360c39 |
#define __GFS2_MKFS_DOT_H__
|
|
Packit Service |
360c39 |
|
|
Packit Service |
360c39 |
#include <stdarg.h>
|
|
Packit Service |
360c39 |
#include <linux/gfs2_ondisk.h>
|
|
Packit Service |
360c39 |
#include "osi_list.h"
|
|
Packit Service |
360c39 |
#include "copyright.cf"
|
|
Packit Service |
360c39 |
|
|
Packit Service |
360c39 |
/* die() used to be in libgfs2.h */
|
|
Packit Service |
360c39 |
static __inline__ __attribute__((noreturn, format (printf, 1, 2)))
|
|
Packit Service |
360c39 |
void die(const char *fmt, ...)
|
|
Packit Service |
360c39 |
{
|
|
Packit Service |
360c39 |
va_list ap;
|
|
Packit Service |
360c39 |
va_start(ap, fmt);
|
|
Packit Service |
360c39 |
vfprintf(stderr, fmt, ap);
|
|
Packit Service |
360c39 |
va_end(ap);
|
|
Packit Service |
360c39 |
exit(-1);
|
|
Packit Service |
360c39 |
}
|
|
Packit Service |
360c39 |
|
|
Packit Service |
360c39 |
/* This function is for libgfs2's sake. */
|
|
Packit Service |
360c39 |
void print_it(const char *label, const char *fmt, const char *fmt2, ...)
|
|
Packit Service |
360c39 |
{
|
|
Packit Service |
360c39 |
va_list args;
|
|
Packit Service |
360c39 |
|
|
Packit Service |
360c39 |
va_start(args, fmt2);
|
|
Packit Service |
360c39 |
printf("%s: ", label);
|
|
Packit Service |
360c39 |
vprintf(fmt, args);
|
|
Packit Service |
360c39 |
va_end(args);
|
|
Packit Service |
360c39 |
}
|
|
Packit Service |
360c39 |
|
|
Packit Service |
360c39 |
/*
|
|
Packit Service |
360c39 |
* The following inode IOCTL macros and inode flags
|
|
Packit Service |
360c39 |
* are copied from linux/fs.h, because we have duplicate
|
|
Packit Service |
360c39 |
* definition of symbols when we include both linux/fs.h and
|
|
Packit Service |
360c39 |
* sys/mount.h in our program
|
|
Packit Service |
360c39 |
*/
|
|
Packit Service |
360c39 |
|
|
Packit Service |
360c39 |
#define FS_IOC_GETFLAGS _IOR('f', 1, long)
|
|
Packit Service |
360c39 |
#define FS_IOC_SETFLAGS _IOW('f', 2, long)
|
|
Packit Service |
360c39 |
#define FS_IOC_GETVERSION _IOR('v', 1, long)
|
|
Packit Service |
360c39 |
#define FS_IOC_SETVERSION _IOW('v', 2, long)
|
|
Packit Service |
360c39 |
#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
|
|
Packit Service |
360c39 |
#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
|
|
Packit Service |
360c39 |
#define FS_IOC32_GETVERSION _IOR('v', 1, int)
|
|
Packit Service |
360c39 |
#define FS_IOC32_SETVERSION _IOW('v', 2, int)
|
|
Packit Service |
360c39 |
|
|
Packit Service |
360c39 |
/*
|
|
Packit Service |
360c39 |
* Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS)
|
|
Packit Service |
360c39 |
*/
|
|
Packit Service |
360c39 |
#define FS_SECRM_FL 0x00000001 /* Secure deletion */
|
|
Packit Service |
360c39 |
#define FS_UNRM_FL 0x00000002 /* Undelete */
|
|
Packit Service |
360c39 |
#define FS_COMPR_FL 0x00000004 /* Compress file */
|
|
Packit Service |
360c39 |
#define FS_SYNC_FL 0x00000008 /* Synchronous updates */
|
|
Packit Service |
360c39 |
#define FS_IMMUTABLE_FL 0x00000010 /* Immutable file */
|
|
Packit Service |
360c39 |
#define FS_APPEND_FL 0x00000020 /* writes to file may only append */
|
|
Packit Service |
360c39 |
#define FS_NODUMP_FL 0x00000040 /* do not dump file */
|
|
Packit Service |
360c39 |
#define FS_NOATIME_FL 0x00000080 /* do not update atime */
|
|
Packit Service |
360c39 |
/* Reserved for compression usage... */
|
|
Packit Service |
360c39 |
#define FS_DIRTY_FL 0x00000100
|
|
Packit Service |
360c39 |
#define FS_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
|
|
Packit Service |
360c39 |
#define FS_NOCOMP_FL 0x00000400 /* Don't compress */
|
|
Packit Service |
360c39 |
#define FS_ECOMPR_FL 0x00000800 /* Compression error */
|
|
Packit Service |
360c39 |
/* End compression flags --- maybe not all used */
|
|
Packit Service |
360c39 |
#define FS_BTREE_FL 0x00001000 /* btree format dir */
|
|
Packit Service |
360c39 |
#define FS_INDEX_FL 0x00001000 /* hash-indexed directory */
|
|
Packit Service |
360c39 |
#define FS_IMAGIC_FL 0x00002000 /* AFS directory */
|
|
Packit Service |
360c39 |
#define FS_JOURNAL_DATA_FL 0x00004000 /* Reserved for ext3 */
|
|
Packit Service |
360c39 |
#define FS_NOTAIL_FL 0x00008000 /* file tail should not be merged */
|
|
Packit Service |
360c39 |
#define FS_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */
|
|
Packit Service |
360c39 |
#define FS_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/
|
|
Packit Service |
360c39 |
#define FS_EXTENT_FL 0x00080000 /* Extents */
|
|
Packit Service |
360c39 |
#define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */
|
|
Packit Service |
360c39 |
#define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
|
|
Packit Service |
360c39 |
|
|
Packit Service |
360c39 |
#define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */
|
|
Packit Service |
360c39 |
#define FS_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */
|
|
Packit Service |
360c39 |
|
|
Packit Service |
360c39 |
#endif /* __GFS2_MKFS_DOT_H__ */
|