kernel/3.10: add default partition name defines to mtdsplit.h
[openwrt/svn-archive/archive.git] / target / linux / generic / files / drivers / mtd / mtdsplit.h
1 /*
2 * Copyright (C) 2009-2013 Felix Fietkau <nbd@openwrt.org>
3 * Copyright (C) 2009-2013 Gabor Juhos <juhosg@openwrt.org>
4 * Copyright (C) 2012 Jonas Gorski <jogo@openwrt.org>
5 * Copyright (C) 2013 Hauke Mehrtens <hauke@hauke-m.de>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published
9 * by the Free Software Foundation.
10 *
11 */
12
13 #ifndef _MTDSPLIT_H
14 #define _MTDSPLIT_H
15
16 #define KERNEL_PART_NAME "kernel"
17 #define ROOTFS_PART_NAME "rootfs"
18
19 #define ROOTFS_SPLIT_NAME "rootfs_data"
20
21 #ifdef CONFIG_MTD_SPLIT
22 int mtd_get_squashfs_len(struct mtd_info *master,
23 size_t offset,
24 size_t *squashfs_len);
25
26 int mtd_check_rootfs_magic(struct mtd_info *mtd, size_t offset);
27
28 int mtd_find_rootfs_from(struct mtd_info *mtd,
29 size_t from,
30 size_t limit,
31 size_t *ret_offset);
32
33 #else
34 static inline int mtd_get_squashfs_len(struct mtd_info *master,
35 size_t offset,
36 size_t *squashfs_len)
37 {
38 return -ENODEV;
39 }
40
41 static inline int mtd_check_rootfs_magic(struct mtd_info *mtd, size_t offset)
42 {
43 return -EINVAL;
44 }
45
46 static inline int mtd_find_rootfs_from(struct mtd_info *mtd,
47 size_t from,
48 size_t limit,
49 size_t *ret_offset)
50 {
51 return -ENODEV;
52 }
53 #endif /* CONFIG_MTD_SPLIT */
54
55 #endif /* _MTDSPLIT_H */