summaryrefstree
path: root/kernel/include/linux/uh_inform.h
blob: 54d24561051520a553116c3f31efe25c497fa905 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
 *  Copyright (c) 2015 Samsung Electronics Co., Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#ifndef _UH_INFORM_H
#define _UH_INFORM_H

/*RETURN VALUE*/
#define UH_INFORM_TRUE 0
#define UH_INFORM_FALSE 1

/*Feature ID*/
enum {
	/* Feature region */
	FEATURE_ROPP,
	FEATURE_JOPP,
	FEATURE_RKP,
	FEATURE_KDP,
	FEATURE_DMV,

	/* DMV region */
	DMV_MOUNTED_ODM,
	DMV_MOUNTED_SYSTEM,
	DMV_MOUNTED_VENDOR,
	UH_INFORM_SIZE_FEATURE
};

/*Feature STATE*/
enum {
	UH_INFORM_INACTIVE,
	UH_INFORM_ACTIVE,
	UH_INFORM_DMV_ALTA,
	UH_INFORM_DMV_LITE,
	UH_INFORM_DMV_FULL,
	DMV_MOUNTED,
	DMV_UNMOUNTED,
	UH_INFORM_INFORM_ERROR,
	UH_INFORM_SIZE_STATE
};

/*Feature TYPE*/
enum{
	UH_INFORM_NORMAL_FEATURE,
	UH_INFORM_DMV_FEATURE,
	UH_INFORM_PARTITION,
	UH_INFORM_MODE,
	UH_INFORM_SIZE_TYPE
};

/*MODE*/
enum {
	MODE_PRINT,
	MODE_WRITE
};


int feature_set_state(int feature_id, int feature_state);

static int feature_init(int feature_id, int feature_type, int feature_state, char* feature_id_str );
static int feature_get_config(void);
static int uh_inform_init(void);
static int find_mount_dir(int feature_id);
static char *get_feature_id_str(int feature_id);
static char *get_feature_state_str(int feature_id);
static int get_partition_info(void);
static void print_feature(struct seq_file *m);

#endif //_UH_INFORM_H