summaryrefslogtreecommitdiff
path: root/convert/source-fs.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-08-22 20:43:49 +0200
committerDavid Sterba <dsterba@suse.com>2017-09-08 16:15:05 +0200
commit4856215f51b4cc7f4bdaef07fc30bba1e8525653 (patch)
tree36ce0418db28f55d56963845adfe456179d0df80 /convert/source-fs.h
parentc05c70c77ca797549e45c971bc3c02bb3ec79e6e (diff)
btrfs-progs: convert: move and rename dev_t helpers to common file
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'convert/source-fs.h')
-rw-r--r--convert/source-fs.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/convert/source-fs.h b/convert/source-fs.h
index bc693162..23f33567 100644
--- a/convert/source-fs.h
+++ b/convert/source-fs.h
@@ -18,9 +18,9 @@
#define __BTRFS_CONVERT_SOURCE_FS_H__
#include "kerncompat.h"
+#include <linux/kdev_t.h>
#include <pthread.h>
-
#define CONV_IMAGE_SUBVOL_OBJECTID BTRFS_FIRST_FREE_OBJECTID
/*
@@ -104,6 +104,13 @@ static inline size_t acl_ea_size(int count)
int ext2_acl_count(size_t size);
+#ifndef MKDEV
+#define MINORBITS 20
+#define MKDEV(ma, mi) (((ma) << MINORBITS) | (mi))
+#endif
+
+dev_t decode_dev(u32 dev);
+
struct btrfs_convert_operations {
const char name[SOURCE_FS_NAME_LEN];
int (*open_fs)(struct btrfs_convert_context *cctx, const char *devname);