blob: 59ffd785cfb9b56d153c2d801a3bccfcf24e27e8 [file] [log] [blame]
Ken Sumrall7574c032012-01-06 19:09:42 -08001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef __CORE_FS_MGR_PRIV_H
18#define __CORE_FS_MGR_PRIV_H
19
20#include <cutils/klog.h>
21#include <fs_mgr.h>
22
23#define INFO(x...) KLOG_INFO("fs_mgr", x)
24#define ERROR(x...) KLOG_ERROR("fs_mgr", x)
25
26#define CRYPTO_TMPFS_OPTIONS "size=128m,mode=0771,uid=1000,gid=1000"
27
Elliott Hughes7b9c33b2013-07-11 18:57:39 -070028#define WAIT_TIMEOUT 20
Ken Sumrall7574c032012-01-06 19:09:42 -080029
30/* fstab has the following format:
31 *
32 * Any line starting with a # is a comment and ignored
33 *
34 * Any blank line is ignored
35 *
36 * All other lines must be in this format:
37 * <source> <mount_point> <fs_type> <mount_flags> <fs_options> <fs_mgr_options>
38 *
39 * <mount_flags> is a comma separated list of flags that can be passed to the
40 * mount command. The list includes noatime, nosuid, nodev, nodiratime,
41 * ro, rw, remount, defaults.
42 *
43 * <fs_options> is a comma separated list of options accepted by the filesystem being
44 * mounted. It is passed directly to mount without being parsed
45 *
46 * <fs_mgr_options> is a comma separated list of flags that control the operation of
47 * the fs_mgr program. The list includes "wait", which will wait till
48 * the <source> file exists, and "check", which requests that the fs_mgr
49 * run an fscheck program on the <source> before mounting the filesystem.
50 * If check is specifed on a read-only filesystem, it is ignored.
51 * Also, "encryptable" means that filesystem can be encrypted.
Ken Sumrallab6b8522013-02-13 12:58:40 -080052 * The "encryptable" flag _MUST_ be followed by a = and a string which
53 * is the location of the encryption keys. It can either be a path
Ken Sumrall7574c032012-01-06 19:09:42 -080054 * to a file or partition which contains the keys, or the word "footer"
55 * which means the keys are in the last 16 Kbytes of the partition
56 * containing the filesystem.
57 *
58 * When the fs_mgr is requested to mount all filesystems, it will first mount all the
59 * filesystems that do _NOT_ specify check (including filesystems that are read-only and
60 * specify check, because check is ignored in that case) and then it will check and mount
61 * filesystem marked with check.
62 *
63 */
64
Ken Sumrallab6b8522013-02-13 12:58:40 -080065#define MF_WAIT 0x1
66#define MF_CHECK 0x2
67#define MF_CRYPT 0x4
68#define MF_NONREMOVABLE 0x8
69#define MF_VOLDMANAGED 0x10
70#define MF_LENGTH 0x20
Ken Sumrall6c2c1212013-02-22 17:36:21 -080071#define MF_RECOVERYONLY 0x40
Ken Sumrall5bc31a22013-07-08 19:11:55 -070072#define MF_SWAPPRIO 0x80
73#define MF_ZRAMSIZE 0x100
Geremy Condra3ad3d1c2013-02-22 18:11:41 -080074#define MF_VERIFY 0x200
Ken Sumrall887f2892013-09-11 19:42:51 -070075/*
76 * There is no emulated sdcard daemon running on /data/media on this device,
77 * so treat the physical SD card as the only external storage device,
78 * a la the Nexus One.
79 */
80#define MF_NOEMULATEDSD 0x400
Geremy Condra3ad3d1c2013-02-22 18:11:41 -080081
82#define DM_BUF_SIZE 4096
Ken Sumrall7574c032012-01-06 19:09:42 -080083
84#endif /* __CORE_FS_MGR_PRIV_H */
85