• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 The Android Open Source Project
2 //
3 // This software is licensed under the terms of the GNU General Public
4 // License version 2, as published by the Free Software Foundation, and
5 // may be copied, distributed, and modified under those terms.
6 //
7 // This program is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 // GNU General Public License for more details.
11 
12 #ifndef ANDROID_FILESYSTEMS_FSTAB_PARSER_H
13 #define ANDROID_FILESYSTEMS_FSTAB_PARSER_H
14 
15 #include "android/utils/compiler.h"
16 
17 #include <stddef.h>
18 
19 ANDROID_BEGIN_HEADER
20 
21 // Parse the Linux fstab file at |fstabData| of |fstabSize| bytes
22 // and extract the format of the partition named |partitionName|.
23 // On success, return true and sets |*outFormat| to a heap-allocated
24 // string that must be freed by the caller. On failure, return false.
25 bool android_parseFstabPartitionFormat(const char* fstabData,
26                                        size_t fstabDize,
27                                        const char* partitionName,
28                                        char** outFormat);
29 
30 ANDROID_END_HEADER
31 
32 #endif  // ANDROID_FILESYSTEMS_FSTAB_PARSER_H
33