Skip to content

Instantly share code, notes, and snippets.

@Lanchon
Created October 2, 2014 05:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lanchon/1996581ebd30c3a2c877 to your computer and use it in GitHub Desktop.
Save Lanchon/1996581ebd30c3a2c877 to your computer and use it in GitHub Desktop.
CM11-M10 sdcard.c listing (i9100)
ARM GAS /tmp/ccMR8LsA.s page 1
1 .syntax unified
2 .cpu cortex-a9
3 .eabi_attribute 27, 3
4 .fpu neon
5 .eabi_attribute 20, 1
6 .eabi_attribute 21, 1
7 .eabi_attribute 23, 3
8 .eabi_attribute 24, 1
9 .eabi_attribute 25, 1
10 .eabi_attribute 26, 2
11 .eabi_attribute 30, 4
12 .eabi_attribute 34, 1
13 .eabi_attribute 18, 4
14 .thumb
15 .file "sdcard.c"
16 .text
17 .Ltext0:
18 .cfi_sections .debug_frame
19 .section .text.int_hash,"ax",%progbits
20 .align 1
21 .thumb
22 .thumb_func
24 int_hash:
25 .fnstart
26 .LFB62:
27 .file 1 "system/core/sdcard/sdcard.c"
1:system/core/sdcard/sdcard.c **** /*
2:system/core/sdcard/sdcard.c **** * Copyright (C) 2010 The Android Open Source Project
3:system/core/sdcard/sdcard.c **** *
4:system/core/sdcard/sdcard.c **** * Licensed under the Apache License, Version 2.0 (the "License");
5:system/core/sdcard/sdcard.c **** * you may not use this file except in compliance with the License.
6:system/core/sdcard/sdcard.c **** * You may obtain a copy of the License at
7:system/core/sdcard/sdcard.c **** *
8:system/core/sdcard/sdcard.c **** * http://www.apache.org/licenses/LICENSE-2.0
9:system/core/sdcard/sdcard.c **** *
10:system/core/sdcard/sdcard.c **** * Unless required by applicable law or agreed to in writing, software
11:system/core/sdcard/sdcard.c **** * distributed under the License is distributed on an "AS IS" BASIS,
12:system/core/sdcard/sdcard.c **** * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13:system/core/sdcard/sdcard.c **** * See the License for the specific language governing permissions and
14:system/core/sdcard/sdcard.c **** * limitations under the License.
15:system/core/sdcard/sdcard.c **** */
16:system/core/sdcard/sdcard.c ****
17:system/core/sdcard/sdcard.c **** #include <stdio.h>
18:system/core/sdcard/sdcard.c **** #include <stdlib.h>
19:system/core/sdcard/sdcard.c **** #include <string.h>
20:system/core/sdcard/sdcard.c **** #include <unistd.h>
21:system/core/sdcard/sdcard.c **** #include <errno.h>
22:system/core/sdcard/sdcard.c **** #include <fcntl.h>
23:system/core/sdcard/sdcard.c **** #include <sys/mount.h>
24:system/core/sdcard/sdcard.c **** #include <sys/stat.h>
25:system/core/sdcard/sdcard.c **** #include <sys/statfs.h>
26:system/core/sdcard/sdcard.c **** #include <sys/uio.h>
27:system/core/sdcard/sdcard.c **** #include <dirent.h>
28:system/core/sdcard/sdcard.c **** #include <limits.h>
29:system/core/sdcard/sdcard.c **** #include <ctype.h>
30:system/core/sdcard/sdcard.c **** #include <pthread.h>
31:system/core/sdcard/sdcard.c **** #include <sys/time.h>
ARM GAS /tmp/ccMR8LsA.s page 2
32:system/core/sdcard/sdcard.c **** #include <sys/resource.h>
33:system/core/sdcard/sdcard.c **** #include <sys/inotify.h>
34:system/core/sdcard/sdcard.c ****
35:system/core/sdcard/sdcard.c **** #include <cutils/fs.h>
36:system/core/sdcard/sdcard.c **** #include <cutils/hashmap.h>
37:system/core/sdcard/sdcard.c **** #include <cutils/multiuser.h>
38:system/core/sdcard/sdcard.c ****
39:system/core/sdcard/sdcard.c **** #include <private/android_filesystem_config.h>
40:system/core/sdcard/sdcard.c ****
41:system/core/sdcard/sdcard.c **** #include "fuse.h"
42:system/core/sdcard/sdcard.c ****
43:system/core/sdcard/sdcard.c **** /* README
44:system/core/sdcard/sdcard.c **** *
45:system/core/sdcard/sdcard.c **** * What is this?
46:system/core/sdcard/sdcard.c **** *
47:system/core/sdcard/sdcard.c **** * sdcard is a program that uses FUSE to emulate FAT-on-sdcard style
48:system/core/sdcard/sdcard.c **** * directory permissions (all files are given fixed owner, group, and
49:system/core/sdcard/sdcard.c **** * permissions at creation, owner, group, and permissions are not
50:system/core/sdcard/sdcard.c **** * changeable, symlinks and hardlinks are not createable, etc.
51:system/core/sdcard/sdcard.c **** *
52:system/core/sdcard/sdcard.c **** * See usage() for command line options.
53:system/core/sdcard/sdcard.c **** *
54:system/core/sdcard/sdcard.c **** * It must be run as root, but will drop to requested UID/GID as soon as it
55:system/core/sdcard/sdcard.c **** * mounts a filesystem. It will refuse to run if requested UID/GID are zero.
56:system/core/sdcard/sdcard.c **** *
57:system/core/sdcard/sdcard.c **** * Things I believe to be true:
58:system/core/sdcard/sdcard.c **** *
59:system/core/sdcard/sdcard.c **** * - ops that return a fuse_entry (LOOKUP, MKNOD, MKDIR, LINK, SYMLINK,
60:system/core/sdcard/sdcard.c **** * CREAT) must bump that node's refcount
61:system/core/sdcard/sdcard.c **** * - don't forget that FORGET can forget multiple references (req->nlookup)
62:system/core/sdcard/sdcard.c **** * - if an op that returns a fuse_entry fails writing the reply to the
63:system/core/sdcard/sdcard.c **** * kernel, you must rollback the refcount to reflect the reference the
64:system/core/sdcard/sdcard.c **** * kernel did not actually acquire
65:system/core/sdcard/sdcard.c **** *
66:system/core/sdcard/sdcard.c **** * This daemon can also derive custom filesystem permissions based on directory
67:system/core/sdcard/sdcard.c **** * structure when requested. These custom permissions support several features:
68:system/core/sdcard/sdcard.c **** *
69:system/core/sdcard/sdcard.c **** * - Apps can access their own files in /Android/data/com.example/ without
70:system/core/sdcard/sdcard.c **** * requiring any additional GIDs.
71:system/core/sdcard/sdcard.c **** * - Separate permissions for protecting directories like Pictures and Music.
72:system/core/sdcard/sdcard.c **** * - Multi-user separation on the same physical device.
73:system/core/sdcard/sdcard.c **** *
74:system/core/sdcard/sdcard.c **** * The derived permissions look like this:
75:system/core/sdcard/sdcard.c **** *
76:system/core/sdcard/sdcard.c **** * rwxrwx--x root:sdcard_rw /
77:system/core/sdcard/sdcard.c **** * rwxrwx--- root:sdcard_pics /Pictures
78:system/core/sdcard/sdcard.c **** * rwxrwx--- root:sdcard_av /Music
79:system/core/sdcard/sdcard.c **** *
80:system/core/sdcard/sdcard.c **** * rwxrwx--x root:sdcard_rw /Android
81:system/core/sdcard/sdcard.c **** * rwxrwx--x root:sdcard_rw /Android/data
82:system/core/sdcard/sdcard.c **** * rwxrwx--- u0_a12:sdcard_rw /Android/data/com.example
83:system/core/sdcard/sdcard.c **** * rwxrwx--x root:sdcard_rw /Android/obb/
84:system/core/sdcard/sdcard.c **** * rwxrwx--- u0_a12:sdcard_rw /Android/obb/com.example
85:system/core/sdcard/sdcard.c **** *
86:system/core/sdcard/sdcard.c **** * rwxrwx--- root:sdcard_all /Android/user
87:system/core/sdcard/sdcard.c **** * rwxrwx--x root:sdcard_rw /Android/user/10
88:system/core/sdcard/sdcard.c **** * rwxrwx--- u10_a12:sdcard_rw /Android/user/10/Android/data/com.example
ARM GAS /tmp/ccMR8LsA.s page 3
89:system/core/sdcard/sdcard.c **** */
90:system/core/sdcard/sdcard.c ****
91:system/core/sdcard/sdcard.c **** #define FUSE_TRACE 0
92:system/core/sdcard/sdcard.c ****
93:system/core/sdcard/sdcard.c **** #if FUSE_TRACE
94:system/core/sdcard/sdcard.c **** #define TRACE(x...) fprintf(stderr,x)
95:system/core/sdcard/sdcard.c **** #else
96:system/core/sdcard/sdcard.c **** #define TRACE(x...) do {} while (0)
97:system/core/sdcard/sdcard.c **** #endif
98:system/core/sdcard/sdcard.c ****
99:system/core/sdcard/sdcard.c **** #define ERROR(x...) fprintf(stderr,x)
100:system/core/sdcard/sdcard.c ****
101:system/core/sdcard/sdcard.c **** #define FUSE_UNKNOWN_INO 0xffffffff
102:system/core/sdcard/sdcard.c ****
103:system/core/sdcard/sdcard.c **** /* Maximum number of bytes to write in one request. */
104:system/core/sdcard/sdcard.c **** #define MAX_WRITE (256 * 1024)
105:system/core/sdcard/sdcard.c ****
106:system/core/sdcard/sdcard.c **** /* Maximum number of bytes to read in one request. */
107:system/core/sdcard/sdcard.c **** #define MAX_READ (128 * 1024)
108:system/core/sdcard/sdcard.c ****
109:system/core/sdcard/sdcard.c **** /* Largest possible request.
110:system/core/sdcard/sdcard.c **** * The request size is bounded by the maximum size of a FUSE_WRITE request because it has
111:system/core/sdcard/sdcard.c **** * the largest possible data payload. */
112:system/core/sdcard/sdcard.c **** #define MAX_REQUEST_SIZE (sizeof(struct fuse_in_header) + sizeof(struct fuse_write_in) + MAX_WRITE)
113:system/core/sdcard/sdcard.c ****
114:system/core/sdcard/sdcard.c **** /* Default number of threads. */
115:system/core/sdcard/sdcard.c **** #define DEFAULT_NUM_THREADS 2
116:system/core/sdcard/sdcard.c ****
117:system/core/sdcard/sdcard.c **** /* Pseudo-error constant used to indicate that no fuse status is needed
118:system/core/sdcard/sdcard.c **** * or that a reply has already been written. */
119:system/core/sdcard/sdcard.c **** #define NO_STATUS 1
120:system/core/sdcard/sdcard.c ****
121:system/core/sdcard/sdcard.c **** /* Path to system-provided mapping of package name to appIds */
122:system/core/sdcard/sdcard.c **** static const char* const kPackagesListFile = "/data/system/packages.list";
123:system/core/sdcard/sdcard.c ****
124:system/core/sdcard/sdcard.c **** /* Supplementary groups to execute with */
125:system/core/sdcard/sdcard.c **** static const gid_t kGroups[1] = { AID_PACKAGE_INFO };
126:system/core/sdcard/sdcard.c ****
127:system/core/sdcard/sdcard.c **** /* Permission mode for a specific node. Controls how file permissions
128:system/core/sdcard/sdcard.c **** * are derived for children nodes. */
129:system/core/sdcard/sdcard.c **** typedef enum {
130:system/core/sdcard/sdcard.c **** /* Nothing special; this node should just inherit from its parent. */
131:system/core/sdcard/sdcard.c **** PERM_INHERIT,
132:system/core/sdcard/sdcard.c **** /* This node is one level above a normal root; used for legacy layouts
133:system/core/sdcard/sdcard.c **** * which use the first level to represent user_id. */
134:system/core/sdcard/sdcard.c **** PERM_LEGACY_PRE_ROOT,
135:system/core/sdcard/sdcard.c **** /* This node is "/" */
136:system/core/sdcard/sdcard.c **** PERM_ROOT,
137:system/core/sdcard/sdcard.c **** /* This node is "/Android" */
138:system/core/sdcard/sdcard.c **** PERM_ANDROID,
139:system/core/sdcard/sdcard.c **** /* This node is "/Android/data" */
140:system/core/sdcard/sdcard.c **** PERM_ANDROID_DATA,
141:system/core/sdcard/sdcard.c **** /* This node is "/Android/obb" */
142:system/core/sdcard/sdcard.c **** PERM_ANDROID_OBB,
143:system/core/sdcard/sdcard.c **** /* This node is "/Android/user" */
144:system/core/sdcard/sdcard.c **** PERM_ANDROID_USER,
145:system/core/sdcard/sdcard.c **** } perm_t;
ARM GAS /tmp/ccMR8LsA.s page 4
146:system/core/sdcard/sdcard.c ****
147:system/core/sdcard/sdcard.c **** /* Permissions structure to derive */
148:system/core/sdcard/sdcard.c **** typedef enum {
149:system/core/sdcard/sdcard.c **** DERIVE_NONE,
150:system/core/sdcard/sdcard.c **** DERIVE_LEGACY,
151:system/core/sdcard/sdcard.c **** DERIVE_UNIFIED,
152:system/core/sdcard/sdcard.c **** } derive_t;
153:system/core/sdcard/sdcard.c ****
154:system/core/sdcard/sdcard.c **** struct handle {
155:system/core/sdcard/sdcard.c **** int fd;
156:system/core/sdcard/sdcard.c **** };
157:system/core/sdcard/sdcard.c ****
158:system/core/sdcard/sdcard.c **** struct dirhandle {
159:system/core/sdcard/sdcard.c **** DIR *d;
160:system/core/sdcard/sdcard.c **** };
161:system/core/sdcard/sdcard.c ****
162:system/core/sdcard/sdcard.c **** struct node {
163:system/core/sdcard/sdcard.c **** __u32 refcount;
164:system/core/sdcard/sdcard.c **** __u64 nid;
165:system/core/sdcard/sdcard.c **** __u64 gen;
166:system/core/sdcard/sdcard.c ****
167:system/core/sdcard/sdcard.c **** /* State derived based on current position in hierarchy. */
168:system/core/sdcard/sdcard.c **** perm_t perm;
169:system/core/sdcard/sdcard.c **** userid_t userid;
170:system/core/sdcard/sdcard.c **** uid_t uid;
171:system/core/sdcard/sdcard.c **** gid_t gid;
172:system/core/sdcard/sdcard.c **** mode_t mode;
173:system/core/sdcard/sdcard.c ****
174:system/core/sdcard/sdcard.c **** struct node *next; /* per-dir sibling list */
175:system/core/sdcard/sdcard.c **** struct node *child; /* first contained file by this dir */
176:system/core/sdcard/sdcard.c **** struct node *parent; /* containing directory */
177:system/core/sdcard/sdcard.c ****
178:system/core/sdcard/sdcard.c **** size_t namelen;
179:system/core/sdcard/sdcard.c **** char *name;
180:system/core/sdcard/sdcard.c **** /* If non-null, this is the real name of the file in the underlying storage.
181:system/core/sdcard/sdcard.c **** * This may differ from the field "name" only by case.
182:system/core/sdcard/sdcard.c **** * strlen(actual_name) will always equal strlen(name), so it is safe to use
183:system/core/sdcard/sdcard.c **** * namelen for both fields.
184:system/core/sdcard/sdcard.c **** */
185:system/core/sdcard/sdcard.c **** char *actual_name;
186:system/core/sdcard/sdcard.c ****
187:system/core/sdcard/sdcard.c **** /* If non-null, an exact underlying path that should be grafted into this
188:system/core/sdcard/sdcard.c **** * position. Used to support things like OBB. */
189:system/core/sdcard/sdcard.c **** char* graft_path;
190:system/core/sdcard/sdcard.c **** size_t graft_pathlen;
191:system/core/sdcard/sdcard.c **** };
192:system/core/sdcard/sdcard.c ****
193:system/core/sdcard/sdcard.c **** static int str_hash(void *key) {
194:system/core/sdcard/sdcard.c **** return hashmapHash(key, strlen(key));
195:system/core/sdcard/sdcard.c **** }
196:system/core/sdcard/sdcard.c ****
197:system/core/sdcard/sdcard.c **** /** Test if two string keys are equal ignoring case */
198:system/core/sdcard/sdcard.c **** static bool str_icase_equals(void *keyA, void *keyB) {
199:system/core/sdcard/sdcard.c **** return strcasecmp(keyA, keyB) == 0;
200:system/core/sdcard/sdcard.c **** }
201:system/core/sdcard/sdcard.c ****
202:system/core/sdcard/sdcard.c **** static int int_hash(void *key) {
ARM GAS /tmp/ccMR8LsA.s page 5
28 .loc 1 202 0
29 .cfi_startproc
30 @ args = 0, pretend = 0, frame = 0
31 @ frame_needed = 0, uses_anonymous_args = 0
32 @ link register save eliminated.
33 .LVL0:
203:system/core/sdcard/sdcard.c **** return (int) key;
204:system/core/sdcard/sdcard.c **** }
34 .loc 1 204 0
35 0000 7047 bx lr
36 .cfi_endproc
37 .LFE62:
38 .fnend
40 .section .text.int_equals,"ax",%progbits
41 .align 1
42 .thumb
43 .thumb_func
45 int_equals:
46 .fnstart
47 .LFB63:
205:system/core/sdcard/sdcard.c ****
206:system/core/sdcard/sdcard.c **** static bool int_equals(void *keyA, void *keyB) {
48 .loc 1 206 0
49 .cfi_startproc
50 @ args = 0, pretend = 0, frame = 0
51 @ frame_needed = 0, uses_anonymous_args = 0
52 @ link register save eliminated.
53 .LVL1:
207:system/core/sdcard/sdcard.c **** return keyA == keyB;
208:system/core/sdcard/sdcard.c **** }
54 .loc 1 208 0
55 0000 0B1A subs r3, r1, r0
56 0002 5842 rsbs r0, r3, #0
57 .LVL2:
58 0004 5841 adcs r0, r0, r3
59 0006 7047 bx lr
60 .cfi_endproc
61 .LFE63:
62 .fnend
64 .section .text.usage,"ax",%progbits
65 .align 1
66 .thumb
67 .thumb_func
69 usage:
70 .fnstart
71 .LFB118:
209:system/core/sdcard/sdcard.c ****
210:system/core/sdcard/sdcard.c **** /* Global data structure shared by all fuse handlers. */
211:system/core/sdcard/sdcard.c **** struct fuse {
212:system/core/sdcard/sdcard.c **** pthread_mutex_t lock;
213:system/core/sdcard/sdcard.c ****
214:system/core/sdcard/sdcard.c **** __u64 next_generation;
215:system/core/sdcard/sdcard.c **** int fd;
216:system/core/sdcard/sdcard.c **** derive_t derive;
217:system/core/sdcard/sdcard.c **** bool split_perms;
218:system/core/sdcard/sdcard.c **** gid_t write_gid;
219:system/core/sdcard/sdcard.c **** struct node root;
ARM GAS /tmp/ccMR8LsA.s page 6
220:system/core/sdcard/sdcard.c **** char obbpath[PATH_MAX];
221:system/core/sdcard/sdcard.c ****
222:system/core/sdcard/sdcard.c **** Hashmap* package_to_appid;
223:system/core/sdcard/sdcard.c **** Hashmap* appid_with_rw;
224:system/core/sdcard/sdcard.c **** };
225:system/core/sdcard/sdcard.c ****
226:system/core/sdcard/sdcard.c **** /* Private data used by a single fuse handler. */
227:system/core/sdcard/sdcard.c **** struct fuse_handler {
228:system/core/sdcard/sdcard.c **** struct fuse* fuse;
229:system/core/sdcard/sdcard.c **** int token;
230:system/core/sdcard/sdcard.c ****
231:system/core/sdcard/sdcard.c **** /* To save memory, we never use the contents of the request buffer and the read
232:system/core/sdcard/sdcard.c **** * buffer at the same time. This allows us to share the underlying storage. */
233:system/core/sdcard/sdcard.c **** union {
234:system/core/sdcard/sdcard.c **** __u8 request_buffer[MAX_REQUEST_SIZE];
235:system/core/sdcard/sdcard.c **** __u8 read_buffer[MAX_READ];
236:system/core/sdcard/sdcard.c **** };
237:system/core/sdcard/sdcard.c **** };
238:system/core/sdcard/sdcard.c ****
239:system/core/sdcard/sdcard.c **** static inline void *id_to_ptr(__u64 nid)
240:system/core/sdcard/sdcard.c **** {
241:system/core/sdcard/sdcard.c **** return (void *) (uintptr_t) nid;
242:system/core/sdcard/sdcard.c **** }
243:system/core/sdcard/sdcard.c ****
244:system/core/sdcard/sdcard.c **** static inline __u64 ptr_to_id(void *ptr)
245:system/core/sdcard/sdcard.c **** {
246:system/core/sdcard/sdcard.c **** return (__u64) (uintptr_t) ptr;
247:system/core/sdcard/sdcard.c **** }
248:system/core/sdcard/sdcard.c ****
249:system/core/sdcard/sdcard.c **** static void acquire_node_locked(struct node* node)
250:system/core/sdcard/sdcard.c **** {
251:system/core/sdcard/sdcard.c **** node->refcount++;
252:system/core/sdcard/sdcard.c **** TRACE("ACQUIRE %p (%s) rc=%d\n", node, node->name, node->refcount);
253:system/core/sdcard/sdcard.c **** }
254:system/core/sdcard/sdcard.c ****
255:system/core/sdcard/sdcard.c **** static void remove_node_from_parent_locked(struct node* node);
256:system/core/sdcard/sdcard.c ****
257:system/core/sdcard/sdcard.c **** static void release_node_locked(struct node* node)
258:system/core/sdcard/sdcard.c **** {
259:system/core/sdcard/sdcard.c **** TRACE("RELEASE %p (%s) rc=%d\n", node, node->name, node->refcount);
260:system/core/sdcard/sdcard.c **** if (node->refcount > 0) {
261:system/core/sdcard/sdcard.c **** node->refcount--;
262:system/core/sdcard/sdcard.c **** if (!node->refcount) {
263:system/core/sdcard/sdcard.c **** TRACE("DESTROY %p (%s)\n", node, node->name);
264:system/core/sdcard/sdcard.c **** remove_node_from_parent_locked(node);
265:system/core/sdcard/sdcard.c ****
266:system/core/sdcard/sdcard.c **** /* TODO: remove debugging - poison memory */
267:system/core/sdcard/sdcard.c **** memset(node->name, 0xef, node->namelen);
268:system/core/sdcard/sdcard.c **** free(node->name);
269:system/core/sdcard/sdcard.c **** free(node->actual_name);
270:system/core/sdcard/sdcard.c **** memset(node, 0xfc, sizeof(*node));
271:system/core/sdcard/sdcard.c **** free(node);
272:system/core/sdcard/sdcard.c **** }
273:system/core/sdcard/sdcard.c **** } else {
274:system/core/sdcard/sdcard.c **** ERROR("Zero refcnt %p\n", node);
275:system/core/sdcard/sdcard.c **** }
276:system/core/sdcard/sdcard.c **** }
ARM GAS /tmp/ccMR8LsA.s page 7
277:system/core/sdcard/sdcard.c ****
278:system/core/sdcard/sdcard.c **** static void add_node_to_parent_locked(struct node *node, struct node *parent) {
279:system/core/sdcard/sdcard.c **** node->parent = parent;
280:system/core/sdcard/sdcard.c **** node->next = parent->child;
281:system/core/sdcard/sdcard.c **** parent->child = node;
282:system/core/sdcard/sdcard.c **** acquire_node_locked(parent);
283:system/core/sdcard/sdcard.c **** }
284:system/core/sdcard/sdcard.c ****
285:system/core/sdcard/sdcard.c **** static void remove_node_from_parent_locked(struct node* node)
286:system/core/sdcard/sdcard.c **** {
287:system/core/sdcard/sdcard.c **** if (node->parent) {
288:system/core/sdcard/sdcard.c **** if (node->parent->child == node) {
289:system/core/sdcard/sdcard.c **** node->parent->child = node->parent->child->next;
290:system/core/sdcard/sdcard.c **** } else {
291:system/core/sdcard/sdcard.c **** struct node *node2;
292:system/core/sdcard/sdcard.c **** node2 = node->parent->child;
293:system/core/sdcard/sdcard.c **** while (node2->next != node)
294:system/core/sdcard/sdcard.c **** node2 = node2->next;
295:system/core/sdcard/sdcard.c **** node2->next = node->next;
296:system/core/sdcard/sdcard.c **** }
297:system/core/sdcard/sdcard.c **** release_node_locked(node->parent);
298:system/core/sdcard/sdcard.c **** node->parent = NULL;
299:system/core/sdcard/sdcard.c **** node->next = NULL;
300:system/core/sdcard/sdcard.c **** }
301:system/core/sdcard/sdcard.c **** }
302:system/core/sdcard/sdcard.c ****
303:system/core/sdcard/sdcard.c **** /* Gets the absolute path to a node into the provided buffer.
304:system/core/sdcard/sdcard.c **** *
305:system/core/sdcard/sdcard.c **** * Populates 'buf' with the path and returns the length of the path on success,
306:system/core/sdcard/sdcard.c **** * or returns -1 if the path is too long for the provided buffer.
307:system/core/sdcard/sdcard.c **** */
308:system/core/sdcard/sdcard.c **** static ssize_t get_node_path_locked(struct node* node, char* buf, size_t bufsize) {
309:system/core/sdcard/sdcard.c **** const char* name;
310:system/core/sdcard/sdcard.c **** size_t namelen;
311:system/core/sdcard/sdcard.c **** if (node->graft_path) {
312:system/core/sdcard/sdcard.c **** name = node->graft_path;
313:system/core/sdcard/sdcard.c **** namelen = node->graft_pathlen;
314:system/core/sdcard/sdcard.c **** } else if (node->actual_name) {
315:system/core/sdcard/sdcard.c **** name = node->actual_name;
316:system/core/sdcard/sdcard.c **** namelen = node->namelen;
317:system/core/sdcard/sdcard.c **** } else {
318:system/core/sdcard/sdcard.c **** name = node->name;
319:system/core/sdcard/sdcard.c **** namelen = node->namelen;
320:system/core/sdcard/sdcard.c **** }
321:system/core/sdcard/sdcard.c ****
322:system/core/sdcard/sdcard.c **** if (bufsize < namelen + 1) {
323:system/core/sdcard/sdcard.c **** return -1;
324:system/core/sdcard/sdcard.c **** }
325:system/core/sdcard/sdcard.c ****
326:system/core/sdcard/sdcard.c **** ssize_t pathlen = 0;
327:system/core/sdcard/sdcard.c **** if (node->parent && node->graft_path == NULL) {
328:system/core/sdcard/sdcard.c **** pathlen = get_node_path_locked(node->parent, buf, bufsize - namelen - 2);
329:system/core/sdcard/sdcard.c **** if (pathlen < 0) {
330:system/core/sdcard/sdcard.c **** return -1;
331:system/core/sdcard/sdcard.c **** }
332:system/core/sdcard/sdcard.c **** buf[pathlen++] = '/';
333:system/core/sdcard/sdcard.c **** }
ARM GAS /tmp/ccMR8LsA.s page 8
334:system/core/sdcard/sdcard.c ****
335:system/core/sdcard/sdcard.c **** memcpy(buf + pathlen, name, namelen + 1); /* include trailing \0 */
336:system/core/sdcard/sdcard.c **** return pathlen + namelen;
337:system/core/sdcard/sdcard.c **** }
338:system/core/sdcard/sdcard.c ****
339:system/core/sdcard/sdcard.c **** /* Finds the absolute path of a file within a given directory.
340:system/core/sdcard/sdcard.c **** * Performs a case-insensitive search for the file and sets the buffer to the path
341:system/core/sdcard/sdcard.c **** * of the first matching file. If 'search' is zero or if no match is found, sets
342:system/core/sdcard/sdcard.c **** * the buffer to the path that the file would have, assuming the name were case-sensitive.
343:system/core/sdcard/sdcard.c **** *
344:system/core/sdcard/sdcard.c **** * Populates 'buf' with the path and returns the actual name (within 'buf') on success,
345:system/core/sdcard/sdcard.c **** * or returns NULL if the path is too long for the provided buffer.
346:system/core/sdcard/sdcard.c **** */
347:system/core/sdcard/sdcard.c **** static char* find_file_within(const char* path, const char* name,
348:system/core/sdcard/sdcard.c **** char* buf, size_t bufsize, int search)
349:system/core/sdcard/sdcard.c **** {
350:system/core/sdcard/sdcard.c **** size_t pathlen = strlen(path);
351:system/core/sdcard/sdcard.c **** size_t namelen = strlen(name);
352:system/core/sdcard/sdcard.c **** size_t childlen = pathlen + namelen + 1;
353:system/core/sdcard/sdcard.c **** char* actual;
354:system/core/sdcard/sdcard.c ****
355:system/core/sdcard/sdcard.c **** if (bufsize <= childlen) {
356:system/core/sdcard/sdcard.c **** return NULL;
357:system/core/sdcard/sdcard.c **** }
358:system/core/sdcard/sdcard.c ****
359:system/core/sdcard/sdcard.c **** memcpy(buf, path, pathlen);
360:system/core/sdcard/sdcard.c **** buf[pathlen] = '/';
361:system/core/sdcard/sdcard.c **** actual = buf + pathlen + 1;
362:system/core/sdcard/sdcard.c **** memcpy(actual, name, namelen + 1);
363:system/core/sdcard/sdcard.c ****
364:system/core/sdcard/sdcard.c **** if (search && access(buf, F_OK)) {
365:system/core/sdcard/sdcard.c **** struct dirent* entry;
366:system/core/sdcard/sdcard.c **** DIR* dir = opendir(path);
367:system/core/sdcard/sdcard.c **** if (!dir) {
368:system/core/sdcard/sdcard.c **** ERROR("opendir %s failed: %s\n", path, strerror(errno));
369:system/core/sdcard/sdcard.c **** return actual;
370:system/core/sdcard/sdcard.c **** }
371:system/core/sdcard/sdcard.c **** while ((entry = readdir(dir))) {
372:system/core/sdcard/sdcard.c **** if (!strcasecmp(entry->d_name, name)) {
373:system/core/sdcard/sdcard.c **** /* we have a match - replace the name, don't need to copy the null again */
374:system/core/sdcard/sdcard.c **** memcpy(actual, entry->d_name, namelen);
375:system/core/sdcard/sdcard.c **** break;
376:system/core/sdcard/sdcard.c **** }
377:system/core/sdcard/sdcard.c **** }
378:system/core/sdcard/sdcard.c **** closedir(dir);
379:system/core/sdcard/sdcard.c **** }
380:system/core/sdcard/sdcard.c **** return actual;
381:system/core/sdcard/sdcard.c **** }
382:system/core/sdcard/sdcard.c ****
383:system/core/sdcard/sdcard.c **** static void attr_from_stat(struct fuse_attr *attr, const struct stat *s, const struct node* node)
384:system/core/sdcard/sdcard.c **** {
385:system/core/sdcard/sdcard.c **** attr->ino = node->nid;
386:system/core/sdcard/sdcard.c **** attr->size = s->st_size;
387:system/core/sdcard/sdcard.c **** attr->blocks = s->st_blocks;
388:system/core/sdcard/sdcard.c **** attr->atime = s->st_atime;
389:system/core/sdcard/sdcard.c **** attr->mtime = s->st_mtime;
390:system/core/sdcard/sdcard.c **** attr->ctime = s->st_ctime;
ARM GAS /tmp/ccMR8LsA.s page 9
391:system/core/sdcard/sdcard.c **** attr->atimensec = s->st_atime_nsec;
392:system/core/sdcard/sdcard.c **** attr->mtimensec = s->st_mtime_nsec;
393:system/core/sdcard/sdcard.c **** attr->ctimensec = s->st_ctime_nsec;
394:system/core/sdcard/sdcard.c **** attr->mode = s->st_mode;
395:system/core/sdcard/sdcard.c **** attr->nlink = s->st_nlink;
396:system/core/sdcard/sdcard.c ****
397:system/core/sdcard/sdcard.c **** attr->uid = node->uid;
398:system/core/sdcard/sdcard.c **** attr->gid = node->gid;
399:system/core/sdcard/sdcard.c ****
400:system/core/sdcard/sdcard.c **** /* Filter requested mode based on underlying file, and
401:system/core/sdcard/sdcard.c **** * pass through file type. */
402:system/core/sdcard/sdcard.c **** int owner_mode = s->st_mode & 0700;
403:system/core/sdcard/sdcard.c **** int filtered_mode = node->mode & (owner_mode | (owner_mode >> 3) | (owner_mode >> 6));
404:system/core/sdcard/sdcard.c **** attr->mode = (attr->mode & S_IFMT) | filtered_mode;
405:system/core/sdcard/sdcard.c **** }
406:system/core/sdcard/sdcard.c ****
407:system/core/sdcard/sdcard.c **** static int touch(char* path, mode_t mode) {
408:system/core/sdcard/sdcard.c **** int fd = open(path, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW, mode);
409:system/core/sdcard/sdcard.c **** if (fd == -1) {
410:system/core/sdcard/sdcard.c **** if (errno == EEXIST) {
411:system/core/sdcard/sdcard.c **** return 0;
412:system/core/sdcard/sdcard.c **** } else {
413:system/core/sdcard/sdcard.c **** ERROR("Failed to open(%s): %s\n", path, strerror(errno));
414:system/core/sdcard/sdcard.c **** return -1;
415:system/core/sdcard/sdcard.c **** }
416:system/core/sdcard/sdcard.c **** }
417:system/core/sdcard/sdcard.c **** close(fd);
418:system/core/sdcard/sdcard.c **** return 0;
419:system/core/sdcard/sdcard.c **** }
420:system/core/sdcard/sdcard.c ****
421:system/core/sdcard/sdcard.c **** static void derive_permissions_locked(struct fuse* fuse, struct node *parent,
422:system/core/sdcard/sdcard.c **** struct node *node) {
423:system/core/sdcard/sdcard.c **** appid_t appid;
424:system/core/sdcard/sdcard.c ****
425:system/core/sdcard/sdcard.c **** /* By default, each node inherits from its parent */
426:system/core/sdcard/sdcard.c **** node->perm = PERM_INHERIT;
427:system/core/sdcard/sdcard.c **** node->userid = parent->userid;
428:system/core/sdcard/sdcard.c **** node->uid = parent->uid;
429:system/core/sdcard/sdcard.c **** node->gid = parent->gid;
430:system/core/sdcard/sdcard.c **** node->mode = parent->mode;
431:system/core/sdcard/sdcard.c ****
432:system/core/sdcard/sdcard.c **** if (fuse->derive == DERIVE_NONE) {
433:system/core/sdcard/sdcard.c **** return;
434:system/core/sdcard/sdcard.c **** }
435:system/core/sdcard/sdcard.c ****
436:system/core/sdcard/sdcard.c **** /* Derive custom permissions based on parent and current node */
437:system/core/sdcard/sdcard.c **** switch (parent->perm) {
438:system/core/sdcard/sdcard.c **** case PERM_INHERIT:
439:system/core/sdcard/sdcard.c **** /* Already inherited above */
440:system/core/sdcard/sdcard.c **** break;
441:system/core/sdcard/sdcard.c **** case PERM_LEGACY_PRE_ROOT:
442:system/core/sdcard/sdcard.c **** /* Legacy internal layout places users at top level */
443:system/core/sdcard/sdcard.c **** node->perm = PERM_ROOT;
444:system/core/sdcard/sdcard.c **** node->userid = strtoul(node->name, NULL, 10);
445:system/core/sdcard/sdcard.c **** break;
446:system/core/sdcard/sdcard.c **** case PERM_ROOT:
447:system/core/sdcard/sdcard.c **** /* Assume masked off by default. */
ARM GAS /tmp/ccMR8LsA.s page 10
448:system/core/sdcard/sdcard.c **** node->mode = 0770;
449:system/core/sdcard/sdcard.c **** if (!strcasecmp(node->name, "Android")) {
450:system/core/sdcard/sdcard.c **** /* App-specific directories inside; let anyone traverse */
451:system/core/sdcard/sdcard.c **** node->perm = PERM_ANDROID;
452:system/core/sdcard/sdcard.c **** node->mode = 0771;
453:system/core/sdcard/sdcard.c **** } else if (fuse->split_perms) {
454:system/core/sdcard/sdcard.c **** if (!strcasecmp(node->name, "DCIM")
455:system/core/sdcard/sdcard.c **** || !strcasecmp(node->name, "Pictures")) {
456:system/core/sdcard/sdcard.c **** node->gid = AID_SDCARD_PICS;
457:system/core/sdcard/sdcard.c **** } else if (!strcasecmp(node->name, "Alarms")
458:system/core/sdcard/sdcard.c **** || !strcasecmp(node->name, "Movies")
459:system/core/sdcard/sdcard.c **** || !strcasecmp(node->name, "Music")
460:system/core/sdcard/sdcard.c **** || !strcasecmp(node->name, "Notifications")
461:system/core/sdcard/sdcard.c **** || !strcasecmp(node->name, "Podcasts")
462:system/core/sdcard/sdcard.c **** || !strcasecmp(node->name, "Ringtones")) {
463:system/core/sdcard/sdcard.c **** node->gid = AID_SDCARD_AV;
464:system/core/sdcard/sdcard.c **** }
465:system/core/sdcard/sdcard.c **** }
466:system/core/sdcard/sdcard.c **** break;
467:system/core/sdcard/sdcard.c **** case PERM_ANDROID:
468:system/core/sdcard/sdcard.c **** if (!strcasecmp(node->name, "data")) {
469:system/core/sdcard/sdcard.c **** /* App-specific directories inside; let anyone traverse */
470:system/core/sdcard/sdcard.c **** node->perm = PERM_ANDROID_DATA;
471:system/core/sdcard/sdcard.c **** node->mode = 0771;
472:system/core/sdcard/sdcard.c **** } else if (!strcasecmp(node->name, "obb")) {
473:system/core/sdcard/sdcard.c **** /* App-specific directories inside; let anyone traverse */
474:system/core/sdcard/sdcard.c **** node->perm = PERM_ANDROID_OBB;
475:system/core/sdcard/sdcard.c **** node->mode = 0771;
476:system/core/sdcard/sdcard.c **** /* Single OBB directory is always shared */
477:system/core/sdcard/sdcard.c **** node->graft_path = fuse->obbpath;
478:system/core/sdcard/sdcard.c **** node->graft_pathlen = strlen(fuse->obbpath);
479:system/core/sdcard/sdcard.c **** } else if (!strcasecmp(node->name, "user")) {
480:system/core/sdcard/sdcard.c **** /* User directories must only be accessible to system, protected
481:system/core/sdcard/sdcard.c **** * by sdcard_all. Zygote will bind mount the appropriate user-
482:system/core/sdcard/sdcard.c **** * specific path. */
483:system/core/sdcard/sdcard.c **** node->perm = PERM_ANDROID_USER;
484:system/core/sdcard/sdcard.c **** node->gid = AID_SDCARD_ALL;
485:system/core/sdcard/sdcard.c **** node->mode = 0770;
486:system/core/sdcard/sdcard.c **** }
487:system/core/sdcard/sdcard.c **** break;
488:system/core/sdcard/sdcard.c **** case PERM_ANDROID_DATA:
489:system/core/sdcard/sdcard.c **** case PERM_ANDROID_OBB:
490:system/core/sdcard/sdcard.c **** appid = (appid_t) hashmapGet(fuse->package_to_appid, node->name);
491:system/core/sdcard/sdcard.c **** if (appid != 0) {
492:system/core/sdcard/sdcard.c **** node->uid = multiuser_get_uid(parent->userid, appid);
493:system/core/sdcard/sdcard.c **** }
494:system/core/sdcard/sdcard.c **** node->mode = 0770;
495:system/core/sdcard/sdcard.c **** break;
496:system/core/sdcard/sdcard.c **** case PERM_ANDROID_USER:
497:system/core/sdcard/sdcard.c **** /* Root of a secondary user */
498:system/core/sdcard/sdcard.c **** node->perm = PERM_ROOT;
499:system/core/sdcard/sdcard.c **** node->userid = strtoul(node->name, NULL, 10);
500:system/core/sdcard/sdcard.c **** node->gid = AID_SDCARD_R;
501:system/core/sdcard/sdcard.c **** node->mode = 0771;
502:system/core/sdcard/sdcard.c **** break;
503:system/core/sdcard/sdcard.c **** }
504:system/core/sdcard/sdcard.c **** }
ARM GAS /tmp/ccMR8LsA.s page 11
505:system/core/sdcard/sdcard.c ****
506:system/core/sdcard/sdcard.c **** /* Return if the calling UID holds sdcard_rw. */
507:system/core/sdcard/sdcard.c **** static bool get_caller_has_rw_locked(struct fuse* fuse, const struct fuse_in_header *hdr) {
508:system/core/sdcard/sdcard.c **** /* No additional permissions enforcement */
509:system/core/sdcard/sdcard.c **** if (fuse->derive == DERIVE_NONE) {
510:system/core/sdcard/sdcard.c **** return true;
511:system/core/sdcard/sdcard.c **** }
512:system/core/sdcard/sdcard.c ****
513:system/core/sdcard/sdcard.c **** appid_t appid = multiuser_get_app_id(hdr->uid);
514:system/core/sdcard/sdcard.c **** return hashmapContainsKey(fuse->appid_with_rw, (void*) appid);
515:system/core/sdcard/sdcard.c **** }
516:system/core/sdcard/sdcard.c ****
517:system/core/sdcard/sdcard.c **** /* Kernel has already enforced everything we returned through
518:system/core/sdcard/sdcard.c **** * derive_permissions_locked(), so this is used to lock down access
519:system/core/sdcard/sdcard.c **** * even further, such as enforcing that apps hold sdcard_rw. */
520:system/core/sdcard/sdcard.c **** static bool check_caller_access_to_name(struct fuse* fuse,
521:system/core/sdcard/sdcard.c **** const struct fuse_in_header *hdr, const struct node* parent_node,
522:system/core/sdcard/sdcard.c **** const char* name, int mode, bool has_rw) {
523:system/core/sdcard/sdcard.c **** /* Always block security-sensitive files at root */
524:system/core/sdcard/sdcard.c **** if (parent_node && parent_node->perm == PERM_ROOT) {
525:system/core/sdcard/sdcard.c **** if (!strcasecmp(name, "autorun.inf")
526:system/core/sdcard/sdcard.c **** || !strcasecmp(name, ".android_secure")
527:system/core/sdcard/sdcard.c **** || !strcasecmp(name, "android_secure")) {
528:system/core/sdcard/sdcard.c **** return false;
529:system/core/sdcard/sdcard.c **** }
530:system/core/sdcard/sdcard.c **** }
531:system/core/sdcard/sdcard.c ****
532:system/core/sdcard/sdcard.c **** /* No additional permissions enforcement */
533:system/core/sdcard/sdcard.c **** if (fuse->derive == DERIVE_NONE) {
534:system/core/sdcard/sdcard.c **** return true;
535:system/core/sdcard/sdcard.c **** }
536:system/core/sdcard/sdcard.c ****
537:system/core/sdcard/sdcard.c **** /* Root always has access; access for any other UIDs should always
538:system/core/sdcard/sdcard.c **** * be controlled through packages.list. */
539:system/core/sdcard/sdcard.c **** if (hdr->uid == 0) {
540:system/core/sdcard/sdcard.c **** return true;
541:system/core/sdcard/sdcard.c **** }
542:system/core/sdcard/sdcard.c ****
543:system/core/sdcard/sdcard.c **** /* If asking to write, verify that caller either owns the
544:system/core/sdcard/sdcard.c **** * parent or holds sdcard_rw. */
545:system/core/sdcard/sdcard.c **** if (mode & W_OK) {
546:system/core/sdcard/sdcard.c **** if (parent_node && hdr->uid == parent_node->uid) {
547:system/core/sdcard/sdcard.c **** return true;
548:system/core/sdcard/sdcard.c **** }
549:system/core/sdcard/sdcard.c ****
550:system/core/sdcard/sdcard.c **** return has_rw;
551:system/core/sdcard/sdcard.c **** }
552:system/core/sdcard/sdcard.c ****
553:system/core/sdcard/sdcard.c **** /* No extra permissions to enforce */
554:system/core/sdcard/sdcard.c **** return true;
555:system/core/sdcard/sdcard.c **** }
556:system/core/sdcard/sdcard.c ****
557:system/core/sdcard/sdcard.c **** static bool check_caller_access_to_node(struct fuse* fuse,
558:system/core/sdcard/sdcard.c **** const struct fuse_in_header *hdr, const struct node* node, int mode, bool has_rw) {
559:system/core/sdcard/sdcard.c **** return check_caller_access_to_name(fuse, hdr, node->parent, node->name, mode, has_rw);
560:system/core/sdcard/sdcard.c **** }
561:system/core/sdcard/sdcard.c ****
ARM GAS /tmp/ccMR8LsA.s page 12
562:system/core/sdcard/sdcard.c **** struct node *create_node_locked(struct fuse* fuse,
563:system/core/sdcard/sdcard.c **** struct node *parent, const char *name, const char* actual_name)
564:system/core/sdcard/sdcard.c **** {
565:system/core/sdcard/sdcard.c **** struct node *node;
566:system/core/sdcard/sdcard.c **** size_t namelen = strlen(name);
567:system/core/sdcard/sdcard.c ****
568:system/core/sdcard/sdcard.c **** node = calloc(1, sizeof(struct node));
569:system/core/sdcard/sdcard.c **** if (!node) {
570:system/core/sdcard/sdcard.c **** return NULL;
571:system/core/sdcard/sdcard.c **** }
572:system/core/sdcard/sdcard.c **** node->name = malloc(namelen + 1);
573:system/core/sdcard/sdcard.c **** if (!node->name) {
574:system/core/sdcard/sdcard.c **** free(node);
575:system/core/sdcard/sdcard.c **** return NULL;
576:system/core/sdcard/sdcard.c **** }
577:system/core/sdcard/sdcard.c **** memcpy(node->name, name, namelen + 1);
578:system/core/sdcard/sdcard.c **** if (strcmp(name, actual_name)) {
579:system/core/sdcard/sdcard.c **** node->actual_name = malloc(namelen + 1);
580:system/core/sdcard/sdcard.c **** if (!node->actual_name) {
581:system/core/sdcard/sdcard.c **** free(node->name);
582:system/core/sdcard/sdcard.c **** free(node);
583:system/core/sdcard/sdcard.c **** return NULL;
584:system/core/sdcard/sdcard.c **** }
585:system/core/sdcard/sdcard.c **** memcpy(node->actual_name, actual_name, namelen + 1);
586:system/core/sdcard/sdcard.c **** }
587:system/core/sdcard/sdcard.c **** node->namelen = namelen;
588:system/core/sdcard/sdcard.c **** node->nid = ptr_to_id(node);
589:system/core/sdcard/sdcard.c **** node->gen = fuse->next_generation++;
590:system/core/sdcard/sdcard.c ****
591:system/core/sdcard/sdcard.c **** derive_permissions_locked(fuse, parent, node);
592:system/core/sdcard/sdcard.c **** acquire_node_locked(node);
593:system/core/sdcard/sdcard.c **** add_node_to_parent_locked(node, parent);
594:system/core/sdcard/sdcard.c **** return node;
595:system/core/sdcard/sdcard.c **** }
596:system/core/sdcard/sdcard.c ****
597:system/core/sdcard/sdcard.c **** static int rename_node_locked(struct node *node, const char *name,
598:system/core/sdcard/sdcard.c **** const char* actual_name)
599:system/core/sdcard/sdcard.c **** {
600:system/core/sdcard/sdcard.c **** size_t namelen = strlen(name);
601:system/core/sdcard/sdcard.c **** int need_actual_name = strcmp(name, actual_name);
602:system/core/sdcard/sdcard.c ****
603:system/core/sdcard/sdcard.c **** /* make the storage bigger without actually changing the name
604:system/core/sdcard/sdcard.c **** * in case an error occurs part way */
605:system/core/sdcard/sdcard.c **** if (namelen > node->namelen) {
606:system/core/sdcard/sdcard.c **** char* new_name = realloc(node->name, namelen + 1);
607:system/core/sdcard/sdcard.c **** if (!new_name) {
608:system/core/sdcard/sdcard.c **** return -ENOMEM;
609:system/core/sdcard/sdcard.c **** }
610:system/core/sdcard/sdcard.c **** node->name = new_name;
611:system/core/sdcard/sdcard.c **** if (need_actual_name && node->actual_name) {
612:system/core/sdcard/sdcard.c **** char* new_actual_name = realloc(node->actual_name, namelen + 1);
613:system/core/sdcard/sdcard.c **** if (!new_actual_name) {
614:system/core/sdcard/sdcard.c **** return -ENOMEM;
615:system/core/sdcard/sdcard.c **** }
616:system/core/sdcard/sdcard.c **** node->actual_name = new_actual_name;
617:system/core/sdcard/sdcard.c **** }
618:system/core/sdcard/sdcard.c **** }
ARM GAS /tmp/ccMR8LsA.s page 13
619:system/core/sdcard/sdcard.c ****
620:system/core/sdcard/sdcard.c **** /* update the name, taking care to allocate storage before overwriting the old name */
621:system/core/sdcard/sdcard.c **** if (need_actual_name) {
622:system/core/sdcard/sdcard.c **** if (!node->actual_name) {
623:system/core/sdcard/sdcard.c **** node->actual_name = malloc(namelen + 1);
624:system/core/sdcard/sdcard.c **** if (!node->actual_name) {
625:system/core/sdcard/sdcard.c **** return -ENOMEM;
626:system/core/sdcard/sdcard.c **** }
627:system/core/sdcard/sdcard.c **** }
628:system/core/sdcard/sdcard.c **** memcpy(node->actual_name, actual_name, namelen + 1);
629:system/core/sdcard/sdcard.c **** } else {
630:system/core/sdcard/sdcard.c **** free(node->actual_name);
631:system/core/sdcard/sdcard.c **** node->actual_name = NULL;
632:system/core/sdcard/sdcard.c **** }
633:system/core/sdcard/sdcard.c **** memcpy(node->name, name, namelen + 1);
634:system/core/sdcard/sdcard.c **** node->namelen = namelen;
635:system/core/sdcard/sdcard.c **** return 0;
636:system/core/sdcard/sdcard.c **** }
637:system/core/sdcard/sdcard.c ****
638:system/core/sdcard/sdcard.c **** static struct node *lookup_node_by_id_locked(struct fuse *fuse, __u64 nid)
639:system/core/sdcard/sdcard.c **** {
640:system/core/sdcard/sdcard.c **** if (nid == FUSE_ROOT_ID) {
641:system/core/sdcard/sdcard.c **** return &fuse->root;
642:system/core/sdcard/sdcard.c **** } else {
643:system/core/sdcard/sdcard.c **** return id_to_ptr(nid);
644:system/core/sdcard/sdcard.c **** }
645:system/core/sdcard/sdcard.c **** }
646:system/core/sdcard/sdcard.c ****
647:system/core/sdcard/sdcard.c **** static struct node* lookup_node_and_path_by_id_locked(struct fuse* fuse, __u64 nid,
648:system/core/sdcard/sdcard.c **** char* buf, size_t bufsize)
649:system/core/sdcard/sdcard.c **** {
650:system/core/sdcard/sdcard.c **** struct node* node = lookup_node_by_id_locked(fuse, nid);
651:system/core/sdcard/sdcard.c **** if (node && get_node_path_locked(node, buf, bufsize) < 0) {
652:system/core/sdcard/sdcard.c **** node = NULL;
653:system/core/sdcard/sdcard.c **** }
654:system/core/sdcard/sdcard.c **** return node;
655:system/core/sdcard/sdcard.c **** }
656:system/core/sdcard/sdcard.c ****
657:system/core/sdcard/sdcard.c **** static struct node *lookup_child_by_name_locked(struct node *node, const char *name)
658:system/core/sdcard/sdcard.c **** {
659:system/core/sdcard/sdcard.c **** for (node = node->child; node; node = node->next) {
660:system/core/sdcard/sdcard.c **** /* use exact string comparison, nodes that differ by case
661:system/core/sdcard/sdcard.c **** * must be considered distinct even if they refer to the same
662:system/core/sdcard/sdcard.c **** * underlying file as otherwise operations such as "mv x x"
663:system/core/sdcard/sdcard.c **** * will not work because the source and target nodes are the same. */
664:system/core/sdcard/sdcard.c **** if (!strcmp(name, node->name)) {
665:system/core/sdcard/sdcard.c **** return node;
666:system/core/sdcard/sdcard.c **** }
667:system/core/sdcard/sdcard.c **** }
668:system/core/sdcard/sdcard.c **** return 0;
669:system/core/sdcard/sdcard.c **** }
670:system/core/sdcard/sdcard.c ****
671:system/core/sdcard/sdcard.c **** static struct node* acquire_or_create_child_locked(
672:system/core/sdcard/sdcard.c **** struct fuse* fuse, struct node* parent,
673:system/core/sdcard/sdcard.c **** const char* name, const char* actual_name)
674:system/core/sdcard/sdcard.c **** {
675:system/core/sdcard/sdcard.c **** struct node* child = lookup_child_by_name_locked(parent, name);
ARM GAS /tmp/ccMR8LsA.s page 14
676:system/core/sdcard/sdcard.c **** if (child) {
677:system/core/sdcard/sdcard.c **** acquire_node_locked(child);
678:system/core/sdcard/sdcard.c **** } else {
679:system/core/sdcard/sdcard.c **** child = create_node_locked(fuse, parent, name, actual_name);
680:system/core/sdcard/sdcard.c **** }
681:system/core/sdcard/sdcard.c **** return child;
682:system/core/sdcard/sdcard.c **** }
683:system/core/sdcard/sdcard.c ****
684:system/core/sdcard/sdcard.c **** static void fuse_init(struct fuse *fuse, int fd, const char *source_path,
685:system/core/sdcard/sdcard.c **** gid_t write_gid, derive_t derive, bool split_perms) {
686:system/core/sdcard/sdcard.c **** pthread_mutex_init(&fuse->lock, NULL);
687:system/core/sdcard/sdcard.c ****
688:system/core/sdcard/sdcard.c **** fuse->fd = fd;
689:system/core/sdcard/sdcard.c **** fuse->next_generation = 0;
690:system/core/sdcard/sdcard.c **** fuse->derive = derive;
691:system/core/sdcard/sdcard.c **** fuse->split_perms = split_perms;
692:system/core/sdcard/sdcard.c **** fuse->write_gid = write_gid;
693:system/core/sdcard/sdcard.c ****
694:system/core/sdcard/sdcard.c **** memset(&fuse->root, 0, sizeof(fuse->root));
695:system/core/sdcard/sdcard.c **** fuse->root.nid = FUSE_ROOT_ID; /* 1 */
696:system/core/sdcard/sdcard.c **** fuse->root.refcount = 2;
697:system/core/sdcard/sdcard.c **** fuse->root.namelen = strlen(source_path);
698:system/core/sdcard/sdcard.c **** fuse->root.name = strdup(source_path);
699:system/core/sdcard/sdcard.c **** fuse->root.userid = 0;
700:system/core/sdcard/sdcard.c **** fuse->root.uid = AID_ROOT;
701:system/core/sdcard/sdcard.c ****
702:system/core/sdcard/sdcard.c **** /* Set up root node for various modes of operation */
703:system/core/sdcard/sdcard.c **** switch (derive) {
704:system/core/sdcard/sdcard.c **** case DERIVE_NONE:
705:system/core/sdcard/sdcard.c **** /* Traditional behavior that treats entire device as being accessible
706:system/core/sdcard/sdcard.c **** * to sdcard_rw, and no permissions are derived. */
707:system/core/sdcard/sdcard.c **** fuse->root.perm = PERM_ROOT;
708:system/core/sdcard/sdcard.c **** fuse->root.mode = 0775;
709:system/core/sdcard/sdcard.c **** fuse->root.gid = AID_SDCARD_RW;
710:system/core/sdcard/sdcard.c **** break;
711:system/core/sdcard/sdcard.c **** case DERIVE_LEGACY:
712:system/core/sdcard/sdcard.c **** /* Legacy behavior used to support internal multiuser layout which
713:system/core/sdcard/sdcard.c **** * places user_id at the top directory level, with the actual roots
714:system/core/sdcard/sdcard.c **** * just below that. Shared OBB path is also at top level. */
715:system/core/sdcard/sdcard.c **** fuse->root.perm = PERM_LEGACY_PRE_ROOT;
716:system/core/sdcard/sdcard.c **** fuse->root.mode = 0771;
717:system/core/sdcard/sdcard.c **** fuse->root.gid = AID_SDCARD_R;
718:system/core/sdcard/sdcard.c **** fuse->package_to_appid = hashmapCreate(256, str_hash, str_icase_equals);
719:system/core/sdcard/sdcard.c **** fuse->appid_with_rw = hashmapCreate(128, int_hash, int_equals);
720:system/core/sdcard/sdcard.c **** snprintf(fuse->obbpath, sizeof(fuse->obbpath), "%s/obb", source_path);
721:system/core/sdcard/sdcard.c **** fs_prepare_dir(fuse->obbpath, 0775, getuid(), getgid());
722:system/core/sdcard/sdcard.c **** break;
723:system/core/sdcard/sdcard.c **** case DERIVE_UNIFIED:
724:system/core/sdcard/sdcard.c **** /* Unified multiuser layout which places secondary user_id under
725:system/core/sdcard/sdcard.c **** * /Android/user and shared OBB path under /Android/obb. */
726:system/core/sdcard/sdcard.c **** fuse->root.perm = PERM_ROOT;
727:system/core/sdcard/sdcard.c **** fuse->root.mode = 0771;
728:system/core/sdcard/sdcard.c **** fuse->root.gid = AID_SDCARD_R;
729:system/core/sdcard/sdcard.c **** fuse->package_to_appid = hashmapCreate(256, str_hash, str_icase_equals);
730:system/core/sdcard/sdcard.c **** fuse->appid_with_rw = hashmapCreate(128, int_hash, int_equals);
731:system/core/sdcard/sdcard.c **** snprintf(fuse->obbpath, sizeof(fuse->obbpath), "%s/Android/obb", source_path);
732:system/core/sdcard/sdcard.c **** break;
ARM GAS /tmp/ccMR8LsA.s page 15
733:system/core/sdcard/sdcard.c **** }
734:system/core/sdcard/sdcard.c **** }
735:system/core/sdcard/sdcard.c ****
736:system/core/sdcard/sdcard.c **** static void fuse_status(struct fuse *fuse, __u64 unique, int err)
737:system/core/sdcard/sdcard.c **** {
738:system/core/sdcard/sdcard.c **** struct fuse_out_header hdr;
739:system/core/sdcard/sdcard.c **** hdr.len = sizeof(hdr);
740:system/core/sdcard/sdcard.c **** hdr.error = err;
741:system/core/sdcard/sdcard.c **** hdr.unique = unique;
742:system/core/sdcard/sdcard.c **** write(fuse->fd, &hdr, sizeof(hdr));
743:system/core/sdcard/sdcard.c **** }
744:system/core/sdcard/sdcard.c ****
745:system/core/sdcard/sdcard.c **** static void fuse_reply(struct fuse *fuse, __u64 unique, void *data, int len)
746:system/core/sdcard/sdcard.c **** {
747:system/core/sdcard/sdcard.c **** struct fuse_out_header hdr;
748:system/core/sdcard/sdcard.c **** struct iovec vec[2];
749:system/core/sdcard/sdcard.c **** int res;
750:system/core/sdcard/sdcard.c ****
751:system/core/sdcard/sdcard.c **** hdr.len = len + sizeof(hdr);
752:system/core/sdcard/sdcard.c **** hdr.error = 0;
753:system/core/sdcard/sdcard.c **** hdr.unique = unique;
754:system/core/sdcard/sdcard.c ****
755:system/core/sdcard/sdcard.c **** vec[0].iov_base = &hdr;
756:system/core/sdcard/sdcard.c **** vec[0].iov_len = sizeof(hdr);
757:system/core/sdcard/sdcard.c **** vec[1].iov_base = data;
758:system/core/sdcard/sdcard.c **** vec[1].iov_len = len;
759:system/core/sdcard/sdcard.c ****
760:system/core/sdcard/sdcard.c **** res = writev(fuse->fd, vec, 2);
761:system/core/sdcard/sdcard.c **** if (res < 0) {
762:system/core/sdcard/sdcard.c **** ERROR("*** REPLY FAILED *** %d\n", errno);
763:system/core/sdcard/sdcard.c **** }
764:system/core/sdcard/sdcard.c **** }
765:system/core/sdcard/sdcard.c ****
766:system/core/sdcard/sdcard.c **** static int fuse_reply_entry(struct fuse* fuse, __u64 unique,
767:system/core/sdcard/sdcard.c **** struct node* parent, const char* name, const char* actual_name,
768:system/core/sdcard/sdcard.c **** const char* path)
769:system/core/sdcard/sdcard.c **** {
770:system/core/sdcard/sdcard.c **** struct node* node;
771:system/core/sdcard/sdcard.c **** struct fuse_entry_out out;
772:system/core/sdcard/sdcard.c **** struct stat s;
773:system/core/sdcard/sdcard.c ****
774:system/core/sdcard/sdcard.c **** if (lstat(path, &s) < 0) {
775:system/core/sdcard/sdcard.c **** return -errno;
776:system/core/sdcard/sdcard.c **** }
777:system/core/sdcard/sdcard.c ****
778:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
779:system/core/sdcard/sdcard.c **** node = acquire_or_create_child_locked(fuse, parent, name, actual_name);
780:system/core/sdcard/sdcard.c **** if (!node) {
781:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
782:system/core/sdcard/sdcard.c **** return -ENOMEM;
783:system/core/sdcard/sdcard.c **** }
784:system/core/sdcard/sdcard.c **** memset(&out, 0, sizeof(out));
785:system/core/sdcard/sdcard.c **** attr_from_stat(&out.attr, &s, node);
786:system/core/sdcard/sdcard.c **** out.attr_valid = 10;
787:system/core/sdcard/sdcard.c **** out.entry_valid = 10;
788:system/core/sdcard/sdcard.c **** out.nodeid = node->nid;
789:system/core/sdcard/sdcard.c **** out.generation = node->gen;
ARM GAS /tmp/ccMR8LsA.s page 16
790:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
791:system/core/sdcard/sdcard.c **** fuse_reply(fuse, unique, &out, sizeof(out));
792:system/core/sdcard/sdcard.c **** return NO_STATUS;
793:system/core/sdcard/sdcard.c **** }
794:system/core/sdcard/sdcard.c ****
795:system/core/sdcard/sdcard.c **** static int fuse_reply_attr(struct fuse* fuse, __u64 unique, const struct node* node,
796:system/core/sdcard/sdcard.c **** const char* path)
797:system/core/sdcard/sdcard.c **** {
798:system/core/sdcard/sdcard.c **** struct fuse_attr_out out;
799:system/core/sdcard/sdcard.c **** struct stat s;
800:system/core/sdcard/sdcard.c ****
801:system/core/sdcard/sdcard.c **** if (lstat(path, &s) < 0) {
802:system/core/sdcard/sdcard.c **** return -errno;
803:system/core/sdcard/sdcard.c **** }
804:system/core/sdcard/sdcard.c **** memset(&out, 0, sizeof(out));
805:system/core/sdcard/sdcard.c **** attr_from_stat(&out.attr, &s, node);
806:system/core/sdcard/sdcard.c **** out.attr_valid = 10;
807:system/core/sdcard/sdcard.c **** fuse_reply(fuse, unique, &out, sizeof(out));
808:system/core/sdcard/sdcard.c **** return NO_STATUS;
809:system/core/sdcard/sdcard.c **** }
810:system/core/sdcard/sdcard.c ****
811:system/core/sdcard/sdcard.c **** static int handle_lookup(struct fuse* fuse, struct fuse_handler* handler,
812:system/core/sdcard/sdcard.c **** const struct fuse_in_header *hdr, const char* name)
813:system/core/sdcard/sdcard.c **** {
814:system/core/sdcard/sdcard.c **** struct node* parent_node;
815:system/core/sdcard/sdcard.c **** char parent_path[PATH_MAX];
816:system/core/sdcard/sdcard.c **** char child_path[PATH_MAX];
817:system/core/sdcard/sdcard.c **** const char* actual_name;
818:system/core/sdcard/sdcard.c ****
819:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
820:system/core/sdcard/sdcard.c **** parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
821:system/core/sdcard/sdcard.c **** parent_path, sizeof(parent_path));
822:system/core/sdcard/sdcard.c **** TRACE("[%d] LOOKUP %s @ %llx (%s)\n", handler->token, name, hdr->nodeid,
823:system/core/sdcard/sdcard.c **** parent_node ? parent_node->name : "?");
824:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
825:system/core/sdcard/sdcard.c ****
826:system/core/sdcard/sdcard.c **** if (!parent_node || !(actual_name = find_file_within(parent_path, name,
827:system/core/sdcard/sdcard.c **** child_path, sizeof(child_path), 1))) {
828:system/core/sdcard/sdcard.c **** return -ENOENT;
829:system/core/sdcard/sdcard.c **** }
830:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, parent_node, name, R_OK, false)) {
831:system/core/sdcard/sdcard.c **** return -EACCES;
832:system/core/sdcard/sdcard.c **** }
833:system/core/sdcard/sdcard.c ****
834:system/core/sdcard/sdcard.c **** return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path);
835:system/core/sdcard/sdcard.c **** }
836:system/core/sdcard/sdcard.c ****
837:system/core/sdcard/sdcard.c **** static int handle_forget(struct fuse* fuse, struct fuse_handler* handler,
838:system/core/sdcard/sdcard.c **** const struct fuse_in_header *hdr, const struct fuse_forget_in *req)
839:system/core/sdcard/sdcard.c **** {
840:system/core/sdcard/sdcard.c **** struct node* node;
841:system/core/sdcard/sdcard.c ****
842:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
843:system/core/sdcard/sdcard.c **** node = lookup_node_by_id_locked(fuse, hdr->nodeid);
844:system/core/sdcard/sdcard.c **** TRACE("[%d] FORGET #%lld @ %llx (%s)\n", handler->token, req->nlookup,
845:system/core/sdcard/sdcard.c **** hdr->nodeid, node ? node->name : "?");
846:system/core/sdcard/sdcard.c **** if (node) {
ARM GAS /tmp/ccMR8LsA.s page 17
847:system/core/sdcard/sdcard.c **** __u64 n = req->nlookup;
848:system/core/sdcard/sdcard.c **** while (n--) {
849:system/core/sdcard/sdcard.c **** release_node_locked(node);
850:system/core/sdcard/sdcard.c **** }
851:system/core/sdcard/sdcard.c **** }
852:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
853:system/core/sdcard/sdcard.c **** return NO_STATUS; /* no reply */
854:system/core/sdcard/sdcard.c **** }
855:system/core/sdcard/sdcard.c ****
856:system/core/sdcard/sdcard.c **** static int handle_getattr(struct fuse* fuse, struct fuse_handler* handler,
857:system/core/sdcard/sdcard.c **** const struct fuse_in_header *hdr, const struct fuse_getattr_in *req)
858:system/core/sdcard/sdcard.c **** {
859:system/core/sdcard/sdcard.c **** struct node* node;
860:system/core/sdcard/sdcard.c **** char path[PATH_MAX];
861:system/core/sdcard/sdcard.c ****
862:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
863:system/core/sdcard/sdcard.c **** node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path));
864:system/core/sdcard/sdcard.c **** TRACE("[%d] GETATTR flags=%x fh=%llx @ %llx (%s)\n", handler->token,
865:system/core/sdcard/sdcard.c **** req->getattr_flags, req->fh, hdr->nodeid, node ? node->name : "?");
866:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
867:system/core/sdcard/sdcard.c ****
868:system/core/sdcard/sdcard.c **** if (!node) {
869:system/core/sdcard/sdcard.c **** return -ENOENT;
870:system/core/sdcard/sdcard.c **** }
871:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_node(fuse, hdr, node, R_OK, false)) {
872:system/core/sdcard/sdcard.c **** return -EACCES;
873:system/core/sdcard/sdcard.c **** }
874:system/core/sdcard/sdcard.c ****
875:system/core/sdcard/sdcard.c **** return fuse_reply_attr(fuse, hdr->unique, node, path);
876:system/core/sdcard/sdcard.c **** }
877:system/core/sdcard/sdcard.c ****
878:system/core/sdcard/sdcard.c **** static int handle_setattr(struct fuse* fuse, struct fuse_handler* handler,
879:system/core/sdcard/sdcard.c **** const struct fuse_in_header *hdr, const struct fuse_setattr_in *req)
880:system/core/sdcard/sdcard.c **** {
881:system/core/sdcard/sdcard.c **** bool has_rw;
882:system/core/sdcard/sdcard.c **** struct node* node;
883:system/core/sdcard/sdcard.c **** char path[PATH_MAX];
884:system/core/sdcard/sdcard.c **** struct timespec times[2];
885:system/core/sdcard/sdcard.c ****
886:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
887:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
888:system/core/sdcard/sdcard.c **** node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path));
889:system/core/sdcard/sdcard.c **** TRACE("[%d] SETATTR fh=%llx valid=%x @ %llx (%s)\n", handler->token,
890:system/core/sdcard/sdcard.c **** req->fh, req->valid, hdr->nodeid, node ? node->name : "?");
891:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
892:system/core/sdcard/sdcard.c ****
893:system/core/sdcard/sdcard.c **** if (!node) {
894:system/core/sdcard/sdcard.c **** return -ENOENT;
895:system/core/sdcard/sdcard.c **** }
896:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_node(fuse, hdr, node, W_OK, has_rw)) {
897:system/core/sdcard/sdcard.c **** return -EACCES;
898:system/core/sdcard/sdcard.c **** }
899:system/core/sdcard/sdcard.c ****
900:system/core/sdcard/sdcard.c **** /* XXX: incomplete implementation on purpose.
901:system/core/sdcard/sdcard.c **** * chmod/chown should NEVER be implemented.*/
902:system/core/sdcard/sdcard.c ****
903:system/core/sdcard/sdcard.c **** if ((req->valid & FATTR_SIZE) && truncate(path, req->size) < 0) {
ARM GAS /tmp/ccMR8LsA.s page 18
904:system/core/sdcard/sdcard.c **** return -errno;
905:system/core/sdcard/sdcard.c **** }
906:system/core/sdcard/sdcard.c ****
907:system/core/sdcard/sdcard.c **** /* Handle changing atime and mtime. If FATTR_ATIME_and FATTR_ATIME_NOW
908:system/core/sdcard/sdcard.c **** * are both set, then set it to the current time. Else, set it to the
909:system/core/sdcard/sdcard.c **** * time specified in the request. Same goes for mtime. Use utimensat(2)
910:system/core/sdcard/sdcard.c **** * as it allows ATIME and MTIME to be changed independently, and has
911:system/core/sdcard/sdcard.c **** * nanosecond resolution which fuse also has.
912:system/core/sdcard/sdcard.c **** */
913:system/core/sdcard/sdcard.c **** if (req->valid & (FATTR_ATIME | FATTR_MTIME)) {
914:system/core/sdcard/sdcard.c **** times[0].tv_nsec = UTIME_OMIT;
915:system/core/sdcard/sdcard.c **** times[1].tv_nsec = UTIME_OMIT;
916:system/core/sdcard/sdcard.c **** if (req->valid & FATTR_ATIME) {
917:system/core/sdcard/sdcard.c **** if (req->valid & FATTR_ATIME_NOW) {
918:system/core/sdcard/sdcard.c **** times[0].tv_nsec = UTIME_NOW;
919:system/core/sdcard/sdcard.c **** } else {
920:system/core/sdcard/sdcard.c **** times[0].tv_sec = req->atime;
921:system/core/sdcard/sdcard.c **** times[0].tv_nsec = req->atimensec;
922:system/core/sdcard/sdcard.c **** }
923:system/core/sdcard/sdcard.c **** }
924:system/core/sdcard/sdcard.c **** if (req->valid & FATTR_MTIME) {
925:system/core/sdcard/sdcard.c **** if (req->valid & FATTR_MTIME_NOW) {
926:system/core/sdcard/sdcard.c **** times[1].tv_nsec = UTIME_NOW;
927:system/core/sdcard/sdcard.c **** } else {
928:system/core/sdcard/sdcard.c **** times[1].tv_sec = req->mtime;
929:system/core/sdcard/sdcard.c **** times[1].tv_nsec = req->mtimensec;
930:system/core/sdcard/sdcard.c **** }
931:system/core/sdcard/sdcard.c **** }
932:system/core/sdcard/sdcard.c **** TRACE("[%d] Calling utimensat on %s with atime %ld, mtime=%ld\n",
933:system/core/sdcard/sdcard.c **** handler->token, path, times[0].tv_sec, times[1].tv_sec);
934:system/core/sdcard/sdcard.c **** if (utimensat(-1, path, times, 0) < 0) {
935:system/core/sdcard/sdcard.c **** return -errno;
936:system/core/sdcard/sdcard.c **** }
937:system/core/sdcard/sdcard.c **** }
938:system/core/sdcard/sdcard.c **** return fuse_reply_attr(fuse, hdr->unique, node, path);
939:system/core/sdcard/sdcard.c **** }
940:system/core/sdcard/sdcard.c ****
941:system/core/sdcard/sdcard.c **** static int handle_mknod(struct fuse* fuse, struct fuse_handler* handler,
942:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr, const struct fuse_mknod_in* req, const char* name)
943:system/core/sdcard/sdcard.c **** {
944:system/core/sdcard/sdcard.c **** bool has_rw;
945:system/core/sdcard/sdcard.c **** struct node* parent_node;
946:system/core/sdcard/sdcard.c **** char parent_path[PATH_MAX];
947:system/core/sdcard/sdcard.c **** char child_path[PATH_MAX];
948:system/core/sdcard/sdcard.c **** const char* actual_name;
949:system/core/sdcard/sdcard.c ****
950:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
951:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
952:system/core/sdcard/sdcard.c **** parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
953:system/core/sdcard/sdcard.c **** parent_path, sizeof(parent_path));
954:system/core/sdcard/sdcard.c **** TRACE("[%d] MKNOD %s 0%o @ %llx (%s)\n", handler->token,
955:system/core/sdcard/sdcard.c **** name, req->mode, hdr->nodeid, parent_node ? parent_node->name : "?");
956:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
957:system/core/sdcard/sdcard.c ****
958:system/core/sdcard/sdcard.c **** if (!parent_node || !(actual_name = find_file_within(parent_path, name,
959:system/core/sdcard/sdcard.c **** child_path, sizeof(child_path), 1))) {
960:system/core/sdcard/sdcard.c **** return -ENOENT;
ARM GAS /tmp/ccMR8LsA.s page 19
961:system/core/sdcard/sdcard.c **** }
962:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK, has_rw)) {
963:system/core/sdcard/sdcard.c **** return -EACCES;
964:system/core/sdcard/sdcard.c **** }
965:system/core/sdcard/sdcard.c **** __u32 mode = (req->mode & (~0777)) | 0664;
966:system/core/sdcard/sdcard.c **** if (mknod(child_path, mode, req->rdev) < 0) {
967:system/core/sdcard/sdcard.c **** return -errno;
968:system/core/sdcard/sdcard.c **** }
969:system/core/sdcard/sdcard.c **** return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path);
970:system/core/sdcard/sdcard.c **** }
971:system/core/sdcard/sdcard.c ****
972:system/core/sdcard/sdcard.c **** static int handle_mkdir(struct fuse* fuse, struct fuse_handler* handler,
973:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr, const struct fuse_mkdir_in* req, const char* name)
974:system/core/sdcard/sdcard.c **** {
975:system/core/sdcard/sdcard.c **** bool has_rw;
976:system/core/sdcard/sdcard.c **** struct node* parent_node;
977:system/core/sdcard/sdcard.c **** char parent_path[PATH_MAX];
978:system/core/sdcard/sdcard.c **** char child_path[PATH_MAX];
979:system/core/sdcard/sdcard.c **** const char* actual_name;
980:system/core/sdcard/sdcard.c ****
981:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
982:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
983:system/core/sdcard/sdcard.c **** parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
984:system/core/sdcard/sdcard.c **** parent_path, sizeof(parent_path));
985:system/core/sdcard/sdcard.c **** TRACE("[%d] MKDIR %s 0%o @ %llx (%s)\n", handler->token,
986:system/core/sdcard/sdcard.c **** name, req->mode, hdr->nodeid, parent_node ? parent_node->name : "?");
987:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
988:system/core/sdcard/sdcard.c ****
989:system/core/sdcard/sdcard.c **** if (!parent_node || !(actual_name = find_file_within(parent_path, name,
990:system/core/sdcard/sdcard.c **** child_path, sizeof(child_path), 1))) {
991:system/core/sdcard/sdcard.c **** return -ENOENT;
992:system/core/sdcard/sdcard.c **** }
993:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK, has_rw)) {
994:system/core/sdcard/sdcard.c **** return -EACCES;
995:system/core/sdcard/sdcard.c **** }
996:system/core/sdcard/sdcard.c **** __u32 mode = (req->mode & (~0777)) | 0775;
997:system/core/sdcard/sdcard.c **** if (mkdir(child_path, mode) < 0) {
998:system/core/sdcard/sdcard.c **** return -errno;
999:system/core/sdcard/sdcard.c **** }
1000:system/core/sdcard/sdcard.c ****
1001:system/core/sdcard/sdcard.c **** /* When creating /Android/data and /Android/obb, mark them as .nomedia */
1002:system/core/sdcard/sdcard.c **** if (parent_node->perm == PERM_ANDROID && !strcasecmp(name, "data")) {
1003:system/core/sdcard/sdcard.c **** char nomedia[PATH_MAX];
1004:system/core/sdcard/sdcard.c **** snprintf(nomedia, PATH_MAX, "%s/.nomedia", child_path);
1005:system/core/sdcard/sdcard.c **** if (touch(nomedia, 0664) != 0) {
1006:system/core/sdcard/sdcard.c **** ERROR("Failed to touch(%s): %s\n", nomedia, strerror(errno));
1007:system/core/sdcard/sdcard.c **** return -ENOENT;
1008:system/core/sdcard/sdcard.c **** }
1009:system/core/sdcard/sdcard.c **** }
1010:system/core/sdcard/sdcard.c **** if (parent_node->perm == PERM_ANDROID && !strcasecmp(name, "obb")) {
1011:system/core/sdcard/sdcard.c **** char nomedia[PATH_MAX];
1012:system/core/sdcard/sdcard.c **** snprintf(nomedia, PATH_MAX, "%s/.nomedia", fuse->obbpath);
1013:system/core/sdcard/sdcard.c **** if (touch(nomedia, 0664) != 0) {
1014:system/core/sdcard/sdcard.c **** ERROR("Failed to touch(%s): %s\n", nomedia, strerror(errno));
1015:system/core/sdcard/sdcard.c **** return -ENOENT;
1016:system/core/sdcard/sdcard.c **** }
1017:system/core/sdcard/sdcard.c **** }
ARM GAS /tmp/ccMR8LsA.s page 20
1018:system/core/sdcard/sdcard.c ****
1019:system/core/sdcard/sdcard.c **** return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path);
1020:system/core/sdcard/sdcard.c **** }
1021:system/core/sdcard/sdcard.c ****
1022:system/core/sdcard/sdcard.c **** static int handle_unlink(struct fuse* fuse, struct fuse_handler* handler,
1023:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr, const char* name)
1024:system/core/sdcard/sdcard.c **** {
1025:system/core/sdcard/sdcard.c **** bool has_rw;
1026:system/core/sdcard/sdcard.c **** struct node* parent_node;
1027:system/core/sdcard/sdcard.c **** char parent_path[PATH_MAX];
1028:system/core/sdcard/sdcard.c **** char child_path[PATH_MAX];
1029:system/core/sdcard/sdcard.c ****
1030:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
1031:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
1032:system/core/sdcard/sdcard.c **** parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
1033:system/core/sdcard/sdcard.c **** parent_path, sizeof(parent_path));
1034:system/core/sdcard/sdcard.c **** TRACE("[%d] UNLINK %s @ %llx (%s)\n", handler->token,
1035:system/core/sdcard/sdcard.c **** name, hdr->nodeid, parent_node ? parent_node->name : "?");
1036:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
1037:system/core/sdcard/sdcard.c ****
1038:system/core/sdcard/sdcard.c **** if (!parent_node || !find_file_within(parent_path, name,
1039:system/core/sdcard/sdcard.c **** child_path, sizeof(child_path), 1)) {
1040:system/core/sdcard/sdcard.c **** return -ENOENT;
1041:system/core/sdcard/sdcard.c **** }
1042:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK, has_rw)) {
1043:system/core/sdcard/sdcard.c **** return -EACCES;
1044:system/core/sdcard/sdcard.c **** }
1045:system/core/sdcard/sdcard.c **** if (unlink(child_path) < 0) {
1046:system/core/sdcard/sdcard.c **** return -errno;
1047:system/core/sdcard/sdcard.c **** }
1048:system/core/sdcard/sdcard.c **** return 0;
1049:system/core/sdcard/sdcard.c **** }
1050:system/core/sdcard/sdcard.c ****
1051:system/core/sdcard/sdcard.c **** static int handle_rmdir(struct fuse* fuse, struct fuse_handler* handler,
1052:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr, const char* name)
1053:system/core/sdcard/sdcard.c **** {
1054:system/core/sdcard/sdcard.c **** bool has_rw;
1055:system/core/sdcard/sdcard.c **** struct node* parent_node;
1056:system/core/sdcard/sdcard.c **** char parent_path[PATH_MAX];
1057:system/core/sdcard/sdcard.c **** char child_path[PATH_MAX];
1058:system/core/sdcard/sdcard.c ****
1059:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
1060:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
1061:system/core/sdcard/sdcard.c **** parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
1062:system/core/sdcard/sdcard.c **** parent_path, sizeof(parent_path));
1063:system/core/sdcard/sdcard.c **** TRACE("[%d] RMDIR %s @ %llx (%s)\n", handler->token,
1064:system/core/sdcard/sdcard.c **** name, hdr->nodeid, parent_node ? parent_node->name : "?");
1065:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
1066:system/core/sdcard/sdcard.c ****
1067:system/core/sdcard/sdcard.c **** if (!parent_node || !find_file_within(parent_path, name,
1068:system/core/sdcard/sdcard.c **** child_path, sizeof(child_path), 1)) {
1069:system/core/sdcard/sdcard.c **** return -ENOENT;
1070:system/core/sdcard/sdcard.c **** }
1071:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK, has_rw)) {
1072:system/core/sdcard/sdcard.c **** return -EACCES;
1073:system/core/sdcard/sdcard.c **** }
1074:system/core/sdcard/sdcard.c **** if (rmdir(child_path) < 0) {
ARM GAS /tmp/ccMR8LsA.s page 21
1075:system/core/sdcard/sdcard.c **** return -errno;
1076:system/core/sdcard/sdcard.c **** }
1077:system/core/sdcard/sdcard.c **** return 0;
1078:system/core/sdcard/sdcard.c **** }
1079:system/core/sdcard/sdcard.c ****
1080:system/core/sdcard/sdcard.c **** static int handle_rename(struct fuse* fuse, struct fuse_handler* handler,
1081:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr, const struct fuse_rename_in* req,
1082:system/core/sdcard/sdcard.c **** const char* old_name, const char* new_name)
1083:system/core/sdcard/sdcard.c **** {
1084:system/core/sdcard/sdcard.c **** bool has_rw;
1085:system/core/sdcard/sdcard.c **** struct node* old_parent_node;
1086:system/core/sdcard/sdcard.c **** struct node* new_parent_node;
1087:system/core/sdcard/sdcard.c **** struct node* child_node;
1088:system/core/sdcard/sdcard.c **** char old_parent_path[PATH_MAX];
1089:system/core/sdcard/sdcard.c **** char new_parent_path[PATH_MAX];
1090:system/core/sdcard/sdcard.c **** char old_child_path[PATH_MAX];
1091:system/core/sdcard/sdcard.c **** char new_child_path[PATH_MAX];
1092:system/core/sdcard/sdcard.c **** const char* new_actual_name;
1093:system/core/sdcard/sdcard.c **** int res;
1094:system/core/sdcard/sdcard.c ****
1095:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
1096:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
1097:system/core/sdcard/sdcard.c **** old_parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
1098:system/core/sdcard/sdcard.c **** old_parent_path, sizeof(old_parent_path));
1099:system/core/sdcard/sdcard.c **** new_parent_node = lookup_node_and_path_by_id_locked(fuse, req->newdir,
1100:system/core/sdcard/sdcard.c **** new_parent_path, sizeof(new_parent_path));
1101:system/core/sdcard/sdcard.c **** TRACE("[%d] RENAME %s->%s @ %llx (%s) -> %llx (%s)\n", handler->token,
1102:system/core/sdcard/sdcard.c **** old_name, new_name,
1103:system/core/sdcard/sdcard.c **** hdr->nodeid, old_parent_node ? old_parent_node->name : "?",
1104:system/core/sdcard/sdcard.c **** req->newdir, new_parent_node ? new_parent_node->name : "?");
1105:system/core/sdcard/sdcard.c **** if (!old_parent_node || !new_parent_node) {
1106:system/core/sdcard/sdcard.c **** res = -ENOENT;
1107:system/core/sdcard/sdcard.c **** goto lookup_error;
1108:system/core/sdcard/sdcard.c **** }
1109:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, old_parent_node, old_name, W_OK, has_rw)) {
1110:system/core/sdcard/sdcard.c **** res = -EACCES;
1111:system/core/sdcard/sdcard.c **** goto lookup_error;
1112:system/core/sdcard/sdcard.c **** }
1113:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, new_parent_node, new_name, W_OK, has_rw)) {
1114:system/core/sdcard/sdcard.c **** res = -EACCES;
1115:system/core/sdcard/sdcard.c **** goto lookup_error;
1116:system/core/sdcard/sdcard.c **** }
1117:system/core/sdcard/sdcard.c **** child_node = lookup_child_by_name_locked(old_parent_node, old_name);
1118:system/core/sdcard/sdcard.c **** if (!child_node || get_node_path_locked(child_node,
1119:system/core/sdcard/sdcard.c **** old_child_path, sizeof(old_child_path)) < 0) {
1120:system/core/sdcard/sdcard.c **** res = -ENOENT;
1121:system/core/sdcard/sdcard.c **** goto lookup_error;
1122:system/core/sdcard/sdcard.c **** }
1123:system/core/sdcard/sdcard.c **** acquire_node_locked(child_node);
1124:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
1125:system/core/sdcard/sdcard.c ****
1126:system/core/sdcard/sdcard.c **** /* Special case for renaming a file where destination is same path
1127:system/core/sdcard/sdcard.c **** * differing only by case. In this case we don't want to look for a case
1128:system/core/sdcard/sdcard.c **** * insensitive match. This allows commands like "mv foo FOO" to work as expected.
1129:system/core/sdcard/sdcard.c **** */
1130:system/core/sdcard/sdcard.c **** int search = old_parent_node != new_parent_node
1131:system/core/sdcard/sdcard.c **** || strcasecmp(old_name, new_name);
ARM GAS /tmp/ccMR8LsA.s page 22
1132:system/core/sdcard/sdcard.c **** if (!(new_actual_name = find_file_within(new_parent_path, new_name,
1133:system/core/sdcard/sdcard.c **** new_child_path, sizeof(new_child_path), search))) {
1134:system/core/sdcard/sdcard.c **** res = -ENOENT;
1135:system/core/sdcard/sdcard.c **** goto io_error;
1136:system/core/sdcard/sdcard.c **** }
1137:system/core/sdcard/sdcard.c ****
1138:system/core/sdcard/sdcard.c **** TRACE("[%d] RENAME %s->%s\n", handler->token, old_child_path, new_child_path);
1139:system/core/sdcard/sdcard.c **** res = rename(old_child_path, new_child_path);
1140:system/core/sdcard/sdcard.c **** if (res < 0) {
1141:system/core/sdcard/sdcard.c **** res = -errno;
1142:system/core/sdcard/sdcard.c **** goto io_error;
1143:system/core/sdcard/sdcard.c **** }
1144:system/core/sdcard/sdcard.c ****
1145:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
1146:system/core/sdcard/sdcard.c **** res = rename_node_locked(child_node, new_name, new_actual_name);
1147:system/core/sdcard/sdcard.c **** if (!res) {
1148:system/core/sdcard/sdcard.c **** remove_node_from_parent_locked(child_node);
1149:system/core/sdcard/sdcard.c **** add_node_to_parent_locked(child_node, new_parent_node);
1150:system/core/sdcard/sdcard.c **** }
1151:system/core/sdcard/sdcard.c **** goto done;
1152:system/core/sdcard/sdcard.c ****
1153:system/core/sdcard/sdcard.c **** io_error:
1154:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
1155:system/core/sdcard/sdcard.c **** done:
1156:system/core/sdcard/sdcard.c **** release_node_locked(child_node);
1157:system/core/sdcard/sdcard.c **** lookup_error:
1158:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
1159:system/core/sdcard/sdcard.c **** return res;
1160:system/core/sdcard/sdcard.c **** }
1161:system/core/sdcard/sdcard.c ****
1162:system/core/sdcard/sdcard.c **** static int open_flags_to_access_mode(int open_flags) {
1163:system/core/sdcard/sdcard.c **** if ((open_flags & O_ACCMODE) == O_RDONLY) {
1164:system/core/sdcard/sdcard.c **** return R_OK;
1165:system/core/sdcard/sdcard.c **** } else if ((open_flags & O_ACCMODE) == O_WRONLY) {
1166:system/core/sdcard/sdcard.c **** return W_OK;
1167:system/core/sdcard/sdcard.c **** } else {
1168:system/core/sdcard/sdcard.c **** /* Probably O_RDRW, but treat as default to be safe */
1169:system/core/sdcard/sdcard.c **** return R_OK | W_OK;
1170:system/core/sdcard/sdcard.c **** }
1171:system/core/sdcard/sdcard.c **** }
1172:system/core/sdcard/sdcard.c ****
1173:system/core/sdcard/sdcard.c **** static int handle_open(struct fuse* fuse, struct fuse_handler* handler,
1174:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr, const struct fuse_open_in* req)
1175:system/core/sdcard/sdcard.c **** {
1176:system/core/sdcard/sdcard.c **** bool has_rw;
1177:system/core/sdcard/sdcard.c **** struct node* node;
1178:system/core/sdcard/sdcard.c **** char path[PATH_MAX];
1179:system/core/sdcard/sdcard.c **** struct fuse_open_out out;
1180:system/core/sdcard/sdcard.c **** struct handle *h;
1181:system/core/sdcard/sdcard.c ****
1182:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
1183:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
1184:system/core/sdcard/sdcard.c **** node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path));
1185:system/core/sdcard/sdcard.c **** TRACE("[%d] OPEN 0%o @ %llx (%s)\n", handler->token,
1186:system/core/sdcard/sdcard.c **** req->flags, hdr->nodeid, node ? node->name : "?");
1187:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
1188:system/core/sdcard/sdcard.c ****
ARM GAS /tmp/ccMR8LsA.s page 23
1189:system/core/sdcard/sdcard.c **** if (!node) {
1190:system/core/sdcard/sdcard.c **** return -ENOENT;
1191:system/core/sdcard/sdcard.c **** }
1192:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_node(fuse, hdr, node,
1193:system/core/sdcard/sdcard.c **** open_flags_to_access_mode(req->flags), has_rw)) {
1194:system/core/sdcard/sdcard.c **** return -EACCES;
1195:system/core/sdcard/sdcard.c **** }
1196:system/core/sdcard/sdcard.c **** h = malloc(sizeof(*h));
1197:system/core/sdcard/sdcard.c **** if (!h) {
1198:system/core/sdcard/sdcard.c **** return -ENOMEM;
1199:system/core/sdcard/sdcard.c **** }
1200:system/core/sdcard/sdcard.c **** TRACE("[%d] OPEN %s\n", handler->token, path);
1201:system/core/sdcard/sdcard.c **** h->fd = open(path, req->flags);
1202:system/core/sdcard/sdcard.c **** if (h->fd < 0) {
1203:system/core/sdcard/sdcard.c **** free(h);
1204:system/core/sdcard/sdcard.c **** return -errno;
1205:system/core/sdcard/sdcard.c **** }
1206:system/core/sdcard/sdcard.c **** out.fh = ptr_to_id(h);
1207:system/core/sdcard/sdcard.c **** out.open_flags = 0;
1208:system/core/sdcard/sdcard.c **** out.padding = 0;
1209:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
1210:system/core/sdcard/sdcard.c **** return NO_STATUS;
1211:system/core/sdcard/sdcard.c **** }
1212:system/core/sdcard/sdcard.c ****
1213:system/core/sdcard/sdcard.c **** static int handle_read(struct fuse* fuse, struct fuse_handler* handler,
1214:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr, const struct fuse_read_in* req)
1215:system/core/sdcard/sdcard.c **** {
1216:system/core/sdcard/sdcard.c **** struct handle *h = id_to_ptr(req->fh);
1217:system/core/sdcard/sdcard.c **** __u64 unique = hdr->unique;
1218:system/core/sdcard/sdcard.c **** __u32 size = req->size;
1219:system/core/sdcard/sdcard.c **** __u64 offset = req->offset;
1220:system/core/sdcard/sdcard.c **** int res;
1221:system/core/sdcard/sdcard.c ****
1222:system/core/sdcard/sdcard.c **** /* Don't access any other fields of hdr or req beyond this point, the read buffer
1223:system/core/sdcard/sdcard.c **** * overlaps the request buffer and will clobber data in the request. This
1224:system/core/sdcard/sdcard.c **** * saves us 128KB per request handler thread at the cost of this scary comment. */
1225:system/core/sdcard/sdcard.c ****
1226:system/core/sdcard/sdcard.c **** TRACE("[%d] READ %p(%d) %u@%llu\n", handler->token,
1227:system/core/sdcard/sdcard.c **** h, h->fd, size, offset);
1228:system/core/sdcard/sdcard.c **** if (size > sizeof(handler->read_buffer)) {
1229:system/core/sdcard/sdcard.c **** return -EINVAL;
1230:system/core/sdcard/sdcard.c **** }
1231:system/core/sdcard/sdcard.c **** res = pread64(h->fd, handler->read_buffer, size, offset);
1232:system/core/sdcard/sdcard.c **** if (res < 0) {
1233:system/core/sdcard/sdcard.c **** return -errno;
1234:system/core/sdcard/sdcard.c **** }
1235:system/core/sdcard/sdcard.c **** fuse_reply(fuse, unique, handler->read_buffer, res);
1236:system/core/sdcard/sdcard.c **** return NO_STATUS;
1237:system/core/sdcard/sdcard.c **** }
1238:system/core/sdcard/sdcard.c ****
1239:system/core/sdcard/sdcard.c **** static int handle_write(struct fuse* fuse, struct fuse_handler* handler,
1240:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr, const struct fuse_write_in* req,
1241:system/core/sdcard/sdcard.c **** const void* buffer)
1242:system/core/sdcard/sdcard.c **** {
1243:system/core/sdcard/sdcard.c **** struct fuse_write_out out;
1244:system/core/sdcard/sdcard.c **** struct handle *h = id_to_ptr(req->fh);
1245:system/core/sdcard/sdcard.c **** int res;
ARM GAS /tmp/ccMR8LsA.s page 24
1246:system/core/sdcard/sdcard.c ****
1247:system/core/sdcard/sdcard.c **** TRACE("[%d] WRITE %p(%d) %u@%llu\n", handler->token,
1248:system/core/sdcard/sdcard.c **** h, h->fd, req->size, req->offset);
1249:system/core/sdcard/sdcard.c **** res = pwrite64(h->fd, buffer, req->size, req->offset);
1250:system/core/sdcard/sdcard.c **** if (res < 0) {
1251:system/core/sdcard/sdcard.c **** return -errno;
1252:system/core/sdcard/sdcard.c **** }
1253:system/core/sdcard/sdcard.c **** out.size = res;
1254:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
1255:system/core/sdcard/sdcard.c **** return NO_STATUS;
1256:system/core/sdcard/sdcard.c **** }
1257:system/core/sdcard/sdcard.c ****
1258:system/core/sdcard/sdcard.c **** static int handle_statfs(struct fuse* fuse, struct fuse_handler* handler,
1259:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr)
1260:system/core/sdcard/sdcard.c **** {
1261:system/core/sdcard/sdcard.c **** char path[PATH_MAX];
1262:system/core/sdcard/sdcard.c **** struct statfs stat;
1263:system/core/sdcard/sdcard.c **** struct fuse_statfs_out out;
1264:system/core/sdcard/sdcard.c **** int res;
1265:system/core/sdcard/sdcard.c ****
1266:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
1267:system/core/sdcard/sdcard.c **** TRACE("[%d] STATFS\n", handler->token);
1268:system/core/sdcard/sdcard.c **** res = get_node_path_locked(&fuse->root, path, sizeof(path));
1269:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
1270:system/core/sdcard/sdcard.c **** if (res < 0) {
1271:system/core/sdcard/sdcard.c **** return -ENOENT;
1272:system/core/sdcard/sdcard.c **** }
1273:system/core/sdcard/sdcard.c **** if (statfs(fuse->root.name, &stat) < 0) {
1274:system/core/sdcard/sdcard.c **** return -errno;
1275:system/core/sdcard/sdcard.c **** }
1276:system/core/sdcard/sdcard.c **** memset(&out, 0, sizeof(out));
1277:system/core/sdcard/sdcard.c **** out.st.blocks = stat.f_blocks;
1278:system/core/sdcard/sdcard.c **** out.st.bfree = stat.f_bfree;
1279:system/core/sdcard/sdcard.c **** out.st.bavail = stat.f_bavail;
1280:system/core/sdcard/sdcard.c **** out.st.files = stat.f_files;
1281:system/core/sdcard/sdcard.c **** out.st.ffree = stat.f_ffree;
1282:system/core/sdcard/sdcard.c **** out.st.bsize = stat.f_bsize;
1283:system/core/sdcard/sdcard.c **** out.st.namelen = stat.f_namelen;
1284:system/core/sdcard/sdcard.c **** out.st.frsize = stat.f_frsize;
1285:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
1286:system/core/sdcard/sdcard.c **** return NO_STATUS;
1287:system/core/sdcard/sdcard.c **** }
1288:system/core/sdcard/sdcard.c ****
1289:system/core/sdcard/sdcard.c **** static int handle_release(struct fuse* fuse, struct fuse_handler* handler,
1290:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr, const struct fuse_release_in* req)
1291:system/core/sdcard/sdcard.c **** {
1292:system/core/sdcard/sdcard.c **** struct handle *h = id_to_ptr(req->fh);
1293:system/core/sdcard/sdcard.c ****
1294:system/core/sdcard/sdcard.c **** TRACE("[%d] RELEASE %p(%d)\n", handler->token, h, h->fd);
1295:system/core/sdcard/sdcard.c **** close(h->fd);
1296:system/core/sdcard/sdcard.c **** free(h);
1297:system/core/sdcard/sdcard.c **** return 0;
1298:system/core/sdcard/sdcard.c **** }
1299:system/core/sdcard/sdcard.c ****
1300:system/core/sdcard/sdcard.c **** static int handle_fsync(struct fuse* fuse, struct fuse_handler* handler,
1301:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr, const struct fuse_fsync_in* req)
1302:system/core/sdcard/sdcard.c **** {
ARM GAS /tmp/ccMR8LsA.s page 25
1303:system/core/sdcard/sdcard.c **** int is_data_sync = req->fsync_flags & 1;
1304:system/core/sdcard/sdcard.c **** struct handle *h = id_to_ptr(req->fh);
1305:system/core/sdcard/sdcard.c **** int res;
1306:system/core/sdcard/sdcard.c ****
1307:system/core/sdcard/sdcard.c **** TRACE("[%d] FSYNC %p(%d) is_data_sync=%d\n", handler->token,
1308:system/core/sdcard/sdcard.c **** h, h->fd, is_data_sync);
1309:system/core/sdcard/sdcard.c **** res = is_data_sync ? fdatasync(h->fd) : fsync(h->fd);
1310:system/core/sdcard/sdcard.c **** if (res < 0) {
1311:system/core/sdcard/sdcard.c **** return -errno;
1312:system/core/sdcard/sdcard.c **** }
1313:system/core/sdcard/sdcard.c **** return 0;
1314:system/core/sdcard/sdcard.c **** }
1315:system/core/sdcard/sdcard.c ****
1316:system/core/sdcard/sdcard.c **** static int handle_flush(struct fuse* fuse, struct fuse_handler* handler,
1317:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr)
1318:system/core/sdcard/sdcard.c **** {
1319:system/core/sdcard/sdcard.c **** TRACE("[%d] FLUSH\n", handler->token);
1320:system/core/sdcard/sdcard.c **** return 0;
1321:system/core/sdcard/sdcard.c **** }
1322:system/core/sdcard/sdcard.c ****
1323:system/core/sdcard/sdcard.c **** static int handle_opendir(struct fuse* fuse, struct fuse_handler* handler,
1324:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr, const struct fuse_open_in* req)
1325:system/core/sdcard/sdcard.c **** {
1326:system/core/sdcard/sdcard.c **** struct node* node;
1327:system/core/sdcard/sdcard.c **** char path[PATH_MAX];
1328:system/core/sdcard/sdcard.c **** struct fuse_open_out out;
1329:system/core/sdcard/sdcard.c **** struct dirhandle *h;
1330:system/core/sdcard/sdcard.c ****
1331:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
1332:system/core/sdcard/sdcard.c **** node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path));
1333:system/core/sdcard/sdcard.c **** TRACE("[%d] OPENDIR @ %llx (%s)\n", handler->token,
1334:system/core/sdcard/sdcard.c **** hdr->nodeid, node ? node->name : "?");
1335:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
1336:system/core/sdcard/sdcard.c ****
1337:system/core/sdcard/sdcard.c **** if (!node) {
1338:system/core/sdcard/sdcard.c **** return -ENOENT;
1339:system/core/sdcard/sdcard.c **** }
1340:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_node(fuse, hdr, node, R_OK, false)) {
1341:system/core/sdcard/sdcard.c **** return -EACCES;
1342:system/core/sdcard/sdcard.c **** }
1343:system/core/sdcard/sdcard.c **** h = malloc(sizeof(*h));
1344:system/core/sdcard/sdcard.c **** if (!h) {
1345:system/core/sdcard/sdcard.c **** return -ENOMEM;
1346:system/core/sdcard/sdcard.c **** }
1347:system/core/sdcard/sdcard.c **** TRACE("[%d] OPENDIR %s\n", handler->token, path);
1348:system/core/sdcard/sdcard.c **** h->d = opendir(path);
1349:system/core/sdcard/sdcard.c **** if (!h->d) {
1350:system/core/sdcard/sdcard.c **** free(h);
1351:system/core/sdcard/sdcard.c **** return -errno;
1352:system/core/sdcard/sdcard.c **** }
1353:system/core/sdcard/sdcard.c **** out.fh = ptr_to_id(h);
1354:system/core/sdcard/sdcard.c **** out.open_flags = 0;
1355:system/core/sdcard/sdcard.c **** out.padding = 0;
1356:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
1357:system/core/sdcard/sdcard.c **** return NO_STATUS;
1358:system/core/sdcard/sdcard.c **** }
1359:system/core/sdcard/sdcard.c ****
ARM GAS /tmp/ccMR8LsA.s page 26
1360:system/core/sdcard/sdcard.c **** static int handle_readdir(struct fuse* fuse, struct fuse_handler* handler,
1361:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr, const struct fuse_read_in* req)
1362:system/core/sdcard/sdcard.c **** {
1363:system/core/sdcard/sdcard.c **** char buffer[8192];
1364:system/core/sdcard/sdcard.c **** struct fuse_dirent *fde = (struct fuse_dirent*) buffer;
1365:system/core/sdcard/sdcard.c **** struct dirent *de;
1366:system/core/sdcard/sdcard.c **** struct dirhandle *h = id_to_ptr(req->fh);
1367:system/core/sdcard/sdcard.c **** struct node* parent_node;
1368:system/core/sdcard/sdcard.c ****
1369:system/core/sdcard/sdcard.c **** TRACE("[%d] READDIR %p\n", handler->token, h);
1370:system/core/sdcard/sdcard.c **** if (req->offset == 0) {
1371:system/core/sdcard/sdcard.c **** /* rewinddir() might have been called above us, so rewind here too */
1372:system/core/sdcard/sdcard.c **** TRACE("[%d] calling rewinddir()\n", handler->token);
1373:system/core/sdcard/sdcard.c **** rewinddir(h->d);
1374:system/core/sdcard/sdcard.c **** }
1375:system/core/sdcard/sdcard.c **** skip:
1376:system/core/sdcard/sdcard.c **** de = readdir(h->d);
1377:system/core/sdcard/sdcard.c **** if (!de) {
1378:system/core/sdcard/sdcard.c **** return 0;
1379:system/core/sdcard/sdcard.c **** }
1380:system/core/sdcard/sdcard.c **** fde->ino = FUSE_UNKNOWN_INO;
1381:system/core/sdcard/sdcard.c **** /* increment the offset so we can detect when rewinddir() seeks back to the beginning */
1382:system/core/sdcard/sdcard.c **** fde->off = req->offset + 1;
1383:system/core/sdcard/sdcard.c **** fde->type = de->d_type;
1384:system/core/sdcard/sdcard.c **** fde->namelen = strlen(de->d_name);
1385:system/core/sdcard/sdcard.c ****
1386:system/core/sdcard/sdcard.c **** parent_node = lookup_node_by_id_locked(fuse, hdr->nodeid);
1387:system/core/sdcard/sdcard.c ****
1388:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, parent_node, de->d_name, R_OK, false)) {
1389:system/core/sdcard/sdcard.c **** goto skip;
1390:system/core/sdcard/sdcard.c **** }
1391:system/core/sdcard/sdcard.c ****
1392:system/core/sdcard/sdcard.c **** memcpy(fde->name, de->d_name, fde->namelen + 1);
1393:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, fde,
1394:system/core/sdcard/sdcard.c **** FUSE_DIRENT_ALIGN(sizeof(struct fuse_dirent) + fde->namelen));
1395:system/core/sdcard/sdcard.c **** return NO_STATUS;
1396:system/core/sdcard/sdcard.c **** }
1397:system/core/sdcard/sdcard.c ****
1398:system/core/sdcard/sdcard.c **** static int handle_releasedir(struct fuse* fuse, struct fuse_handler* handler,
1399:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr, const struct fuse_release_in* req)
1400:system/core/sdcard/sdcard.c **** {
1401:system/core/sdcard/sdcard.c **** struct dirhandle *h = id_to_ptr(req->fh);
1402:system/core/sdcard/sdcard.c ****
1403:system/core/sdcard/sdcard.c **** TRACE("[%d] RELEASEDIR %p\n", handler->token, h);
1404:system/core/sdcard/sdcard.c **** closedir(h->d);
1405:system/core/sdcard/sdcard.c **** free(h);
1406:system/core/sdcard/sdcard.c **** return 0;
1407:system/core/sdcard/sdcard.c **** }
1408:system/core/sdcard/sdcard.c ****
1409:system/core/sdcard/sdcard.c **** static int handle_init(struct fuse* fuse, struct fuse_handler* handler,
1410:system/core/sdcard/sdcard.c **** const struct fuse_in_header* hdr, const struct fuse_init_in* req)
1411:system/core/sdcard/sdcard.c **** {
1412:system/core/sdcard/sdcard.c **** struct fuse_init_out out;
1413:system/core/sdcard/sdcard.c ****
1414:system/core/sdcard/sdcard.c **** TRACE("[%d] INIT ver=%d.%d maxread=%d flags=%x\n",
1415:system/core/sdcard/sdcard.c **** handler->token, req->major, req->minor, req->max_readahead, req->flags);
1416:system/core/sdcard/sdcard.c **** out.major = FUSE_KERNEL_VERSION;
ARM GAS /tmp/ccMR8LsA.s page 27
1417:system/core/sdcard/sdcard.c **** out.minor = FUSE_KERNEL_MINOR_VERSION;
1418:system/core/sdcard/sdcard.c **** out.max_readahead = req->max_readahead;
1419:system/core/sdcard/sdcard.c **** out.flags = FUSE_ATOMIC_O_TRUNC | FUSE_BIG_WRITES;
1420:system/core/sdcard/sdcard.c **** out.max_background = 32;
1421:system/core/sdcard/sdcard.c **** out.congestion_threshold = 32;
1422:system/core/sdcard/sdcard.c **** out.max_write = MAX_WRITE;
1423:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
1424:system/core/sdcard/sdcard.c **** return NO_STATUS;
1425:system/core/sdcard/sdcard.c **** }
1426:system/core/sdcard/sdcard.c ****
1427:system/core/sdcard/sdcard.c **** static int handle_fuse_request(struct fuse *fuse, struct fuse_handler* handler,
1428:system/core/sdcard/sdcard.c **** const struct fuse_in_header *hdr, const void *data, size_t data_len)
1429:system/core/sdcard/sdcard.c **** {
1430:system/core/sdcard/sdcard.c **** switch (hdr->opcode) {
1431:system/core/sdcard/sdcard.c **** case FUSE_LOOKUP: { /* bytez[] -> entry_out */
1432:system/core/sdcard/sdcard.c **** const char* name = data;
1433:system/core/sdcard/sdcard.c **** return handle_lookup(fuse, handler, hdr, name);
1434:system/core/sdcard/sdcard.c **** }
1435:system/core/sdcard/sdcard.c ****
1436:system/core/sdcard/sdcard.c **** case FUSE_FORGET: {
1437:system/core/sdcard/sdcard.c **** const struct fuse_forget_in *req = data;
1438:system/core/sdcard/sdcard.c **** return handle_forget(fuse, handler, hdr, req);
1439:system/core/sdcard/sdcard.c **** }
1440:system/core/sdcard/sdcard.c ****
1441:system/core/sdcard/sdcard.c **** case FUSE_GETATTR: { /* getattr_in -> attr_out */
1442:system/core/sdcard/sdcard.c **** const struct fuse_getattr_in *req = data;
1443:system/core/sdcard/sdcard.c **** return handle_getattr(fuse, handler, hdr, req);
1444:system/core/sdcard/sdcard.c **** }
1445:system/core/sdcard/sdcard.c ****
1446:system/core/sdcard/sdcard.c **** case FUSE_SETATTR: { /* setattr_in -> attr_out */
1447:system/core/sdcard/sdcard.c **** const struct fuse_setattr_in *req = data;
1448:system/core/sdcard/sdcard.c **** return handle_setattr(fuse, handler, hdr, req);
1449:system/core/sdcard/sdcard.c **** }
1450:system/core/sdcard/sdcard.c ****
1451:system/core/sdcard/sdcard.c **** // case FUSE_READLINK:
1452:system/core/sdcard/sdcard.c **** // case FUSE_SYMLINK:
1453:system/core/sdcard/sdcard.c **** case FUSE_MKNOD: { /* mknod_in, bytez[] -> entry_out */
1454:system/core/sdcard/sdcard.c **** const struct fuse_mknod_in *req = data;
1455:system/core/sdcard/sdcard.c **** const char *name = ((const char*) data) + sizeof(*req);
1456:system/core/sdcard/sdcard.c **** return handle_mknod(fuse, handler, hdr, req, name);
1457:system/core/sdcard/sdcard.c **** }
1458:system/core/sdcard/sdcard.c ****
1459:system/core/sdcard/sdcard.c **** case FUSE_MKDIR: { /* mkdir_in, bytez[] -> entry_out */
1460:system/core/sdcard/sdcard.c **** const struct fuse_mkdir_in *req = data;
1461:system/core/sdcard/sdcard.c **** const char *name = ((const char*) data) + sizeof(*req);
1462:system/core/sdcard/sdcard.c **** return handle_mkdir(fuse, handler, hdr, req, name);
1463:system/core/sdcard/sdcard.c **** }
1464:system/core/sdcard/sdcard.c ****
1465:system/core/sdcard/sdcard.c **** case FUSE_UNLINK: { /* bytez[] -> */
1466:system/core/sdcard/sdcard.c **** const char* name = data;
1467:system/core/sdcard/sdcard.c **** return handle_unlink(fuse, handler, hdr, name);
1468:system/core/sdcard/sdcard.c **** }
1469:system/core/sdcard/sdcard.c ****
1470:system/core/sdcard/sdcard.c **** case FUSE_RMDIR: { /* bytez[] -> */
1471:system/core/sdcard/sdcard.c **** const char* name = data;
1472:system/core/sdcard/sdcard.c **** return handle_rmdir(fuse, handler, hdr, name);
1473:system/core/sdcard/sdcard.c **** }
ARM GAS /tmp/ccMR8LsA.s page 28
1474:system/core/sdcard/sdcard.c ****
1475:system/core/sdcard/sdcard.c **** case FUSE_RENAME: { /* rename_in, oldname, newname -> */
1476:system/core/sdcard/sdcard.c **** const struct fuse_rename_in *req = data;
1477:system/core/sdcard/sdcard.c **** const char *old_name = ((const char*) data) + sizeof(*req);
1478:system/core/sdcard/sdcard.c **** const char *new_name = old_name + strlen(old_name) + 1;
1479:system/core/sdcard/sdcard.c **** return handle_rename(fuse, handler, hdr, req, old_name, new_name);
1480:system/core/sdcard/sdcard.c **** }
1481:system/core/sdcard/sdcard.c ****
1482:system/core/sdcard/sdcard.c **** // case FUSE_LINK:
1483:system/core/sdcard/sdcard.c **** case FUSE_OPEN: { /* open_in -> open_out */
1484:system/core/sdcard/sdcard.c **** const struct fuse_open_in *req = data;
1485:system/core/sdcard/sdcard.c **** return handle_open(fuse, handler, hdr, req);
1486:system/core/sdcard/sdcard.c **** }
1487:system/core/sdcard/sdcard.c ****
1488:system/core/sdcard/sdcard.c **** case FUSE_READ: { /* read_in -> byte[] */
1489:system/core/sdcard/sdcard.c **** const struct fuse_read_in *req = data;
1490:system/core/sdcard/sdcard.c **** return handle_read(fuse, handler, hdr, req);
1491:system/core/sdcard/sdcard.c **** }
1492:system/core/sdcard/sdcard.c ****
1493:system/core/sdcard/sdcard.c **** case FUSE_WRITE: { /* write_in, byte[write_in.size] -> write_out */
1494:system/core/sdcard/sdcard.c **** const struct fuse_write_in *req = data;
1495:system/core/sdcard/sdcard.c **** const void* buffer = (const __u8*)data + sizeof(*req);
1496:system/core/sdcard/sdcard.c **** return handle_write(fuse, handler, hdr, req, buffer);
1497:system/core/sdcard/sdcard.c **** }
1498:system/core/sdcard/sdcard.c ****
1499:system/core/sdcard/sdcard.c **** case FUSE_STATFS: { /* getattr_in -> attr_out */
1500:system/core/sdcard/sdcard.c **** return handle_statfs(fuse, handler, hdr);
1501:system/core/sdcard/sdcard.c **** }
1502:system/core/sdcard/sdcard.c ****
1503:system/core/sdcard/sdcard.c **** case FUSE_RELEASE: { /* release_in -> */
1504:system/core/sdcard/sdcard.c **** const struct fuse_release_in *req = data;
1505:system/core/sdcard/sdcard.c **** return handle_release(fuse, handler, hdr, req);
1506:system/core/sdcard/sdcard.c **** }
1507:system/core/sdcard/sdcard.c ****
1508:system/core/sdcard/sdcard.c **** case FUSE_FSYNC: {
1509:system/core/sdcard/sdcard.c **** const struct fuse_fsync_in *req = data;
1510:system/core/sdcard/sdcard.c **** return handle_fsync(fuse, handler, hdr, req);
1511:system/core/sdcard/sdcard.c **** }
1512:system/core/sdcard/sdcard.c ****
1513:system/core/sdcard/sdcard.c **** // case FUSE_SETXATTR:
1514:system/core/sdcard/sdcard.c **** // case FUSE_GETXATTR:
1515:system/core/sdcard/sdcard.c **** // case FUSE_LISTXATTR:
1516:system/core/sdcard/sdcard.c **** // case FUSE_REMOVEXATTR:
1517:system/core/sdcard/sdcard.c **** case FUSE_FLUSH: {
1518:system/core/sdcard/sdcard.c **** return handle_flush(fuse, handler, hdr);
1519:system/core/sdcard/sdcard.c **** }
1520:system/core/sdcard/sdcard.c ****
1521:system/core/sdcard/sdcard.c **** case FUSE_OPENDIR: { /* open_in -> open_out */
1522:system/core/sdcard/sdcard.c **** const struct fuse_open_in *req = data;
1523:system/core/sdcard/sdcard.c **** return handle_opendir(fuse, handler, hdr, req);
1524:system/core/sdcard/sdcard.c **** }
1525:system/core/sdcard/sdcard.c ****
1526:system/core/sdcard/sdcard.c **** case FUSE_READDIR: {
1527:system/core/sdcard/sdcard.c **** const struct fuse_read_in *req = data;
1528:system/core/sdcard/sdcard.c **** return handle_readdir(fuse, handler, hdr, req);
1529:system/core/sdcard/sdcard.c **** }
1530:system/core/sdcard/sdcard.c ****
ARM GAS /tmp/ccMR8LsA.s page 29
1531:system/core/sdcard/sdcard.c **** case FUSE_RELEASEDIR: { /* release_in -> */
1532:system/core/sdcard/sdcard.c **** const struct fuse_release_in *req = data;
1533:system/core/sdcard/sdcard.c **** return handle_releasedir(fuse, handler, hdr, req);
1534:system/core/sdcard/sdcard.c **** }
1535:system/core/sdcard/sdcard.c ****
1536:system/core/sdcard/sdcard.c **** // case FUSE_FSYNCDIR:
1537:system/core/sdcard/sdcard.c **** case FUSE_INIT: { /* init_in -> init_out */
1538:system/core/sdcard/sdcard.c **** const struct fuse_init_in *req = data;
1539:system/core/sdcard/sdcard.c **** return handle_init(fuse, handler, hdr, req);
1540:system/core/sdcard/sdcard.c **** }
1541:system/core/sdcard/sdcard.c ****
1542:system/core/sdcard/sdcard.c **** default: {
1543:system/core/sdcard/sdcard.c **** TRACE("[%d] NOTIMPL op=%d uniq=%llx nid=%llx\n",
1544:system/core/sdcard/sdcard.c **** handler->token, hdr->opcode, hdr->unique, hdr->nodeid);
1545:system/core/sdcard/sdcard.c **** return -ENOSYS;
1546:system/core/sdcard/sdcard.c **** }
1547:system/core/sdcard/sdcard.c **** }
1548:system/core/sdcard/sdcard.c **** }
1549:system/core/sdcard/sdcard.c ****
1550:system/core/sdcard/sdcard.c **** static void handle_fuse_requests(struct fuse_handler* handler)
1551:system/core/sdcard/sdcard.c **** {
1552:system/core/sdcard/sdcard.c **** struct fuse* fuse = handler->fuse;
1553:system/core/sdcard/sdcard.c **** for (;;) {
1554:system/core/sdcard/sdcard.c **** ssize_t len = read(fuse->fd,
1555:system/core/sdcard/sdcard.c **** handler->request_buffer, sizeof(handler->request_buffer));
1556:system/core/sdcard/sdcard.c **** if (len < 0) {
1557:system/core/sdcard/sdcard.c **** if (errno != EINTR) {
1558:system/core/sdcard/sdcard.c **** ERROR("[%d] handle_fuse_requests: errno=%d\n", handler->token, errno);
1559:system/core/sdcard/sdcard.c **** }
1560:system/core/sdcard/sdcard.c **** continue;
1561:system/core/sdcard/sdcard.c **** }
1562:system/core/sdcard/sdcard.c ****
1563:system/core/sdcard/sdcard.c **** if ((size_t)len < sizeof(struct fuse_in_header)) {
1564:system/core/sdcard/sdcard.c **** ERROR("[%d] request too short: len=%zu\n", handler->token, (size_t)len);
1565:system/core/sdcard/sdcard.c **** continue;
1566:system/core/sdcard/sdcard.c **** }
1567:system/core/sdcard/sdcard.c ****
1568:system/core/sdcard/sdcard.c **** const struct fuse_in_header *hdr = (void*)handler->request_buffer;
1569:system/core/sdcard/sdcard.c **** if (hdr->len != (size_t)len) {
1570:system/core/sdcard/sdcard.c **** ERROR("[%d] malformed header: len=%zu, hdr->len=%u\n",
1571:system/core/sdcard/sdcard.c **** handler->token, (size_t)len, hdr->len);
1572:system/core/sdcard/sdcard.c **** continue;
1573:system/core/sdcard/sdcard.c **** }
1574:system/core/sdcard/sdcard.c ****
1575:system/core/sdcard/sdcard.c **** const void *data = handler->request_buffer + sizeof(struct fuse_in_header);
1576:system/core/sdcard/sdcard.c **** size_t data_len = len - sizeof(struct fuse_in_header);
1577:system/core/sdcard/sdcard.c **** __u64 unique = hdr->unique;
1578:system/core/sdcard/sdcard.c **** int res = handle_fuse_request(fuse, handler, hdr, data, data_len);
1579:system/core/sdcard/sdcard.c ****
1580:system/core/sdcard/sdcard.c **** /* We do not access the request again after this point because the underlying
1581:system/core/sdcard/sdcard.c **** * buffer storage may have been reused while processing the request. */
1582:system/core/sdcard/sdcard.c ****
1583:system/core/sdcard/sdcard.c **** if (res != NO_STATUS) {
1584:system/core/sdcard/sdcard.c **** if (res) {
1585:system/core/sdcard/sdcard.c **** TRACE("[%d] ERROR %d\n", handler->token, res);
1586:system/core/sdcard/sdcard.c **** }
1587:system/core/sdcard/sdcard.c **** fuse_status(fuse, unique, res);
ARM GAS /tmp/ccMR8LsA.s page 30
1588:system/core/sdcard/sdcard.c **** }
1589:system/core/sdcard/sdcard.c **** }
1590:system/core/sdcard/sdcard.c **** }
1591:system/core/sdcard/sdcard.c ****
1592:system/core/sdcard/sdcard.c **** static void* start_handler(void* data)
1593:system/core/sdcard/sdcard.c **** {
1594:system/core/sdcard/sdcard.c **** struct fuse_handler* handler = data;
1595:system/core/sdcard/sdcard.c **** handle_fuse_requests(handler);
1596:system/core/sdcard/sdcard.c **** return NULL;
1597:system/core/sdcard/sdcard.c **** }
1598:system/core/sdcard/sdcard.c ****
1599:system/core/sdcard/sdcard.c **** static bool remove_str_to_int(void *key, void *value, void *context) {
1600:system/core/sdcard/sdcard.c **** Hashmap* map = context;
1601:system/core/sdcard/sdcard.c **** hashmapRemove(map, key);
1602:system/core/sdcard/sdcard.c **** free(key);
1603:system/core/sdcard/sdcard.c **** return true;
1604:system/core/sdcard/sdcard.c **** }
1605:system/core/sdcard/sdcard.c ****
1606:system/core/sdcard/sdcard.c **** static bool remove_int_to_null(void *key, void *value, void *context) {
1607:system/core/sdcard/sdcard.c **** Hashmap* map = context;
1608:system/core/sdcard/sdcard.c **** hashmapRemove(map, key);
1609:system/core/sdcard/sdcard.c **** return true;
1610:system/core/sdcard/sdcard.c **** }
1611:system/core/sdcard/sdcard.c ****
1612:system/core/sdcard/sdcard.c **** static int read_package_list(struct fuse *fuse) {
1613:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
1614:system/core/sdcard/sdcard.c ****
1615:system/core/sdcard/sdcard.c **** hashmapForEach(fuse->package_to_appid, remove_str_to_int, fuse->package_to_appid);
1616:system/core/sdcard/sdcard.c **** hashmapForEach(fuse->appid_with_rw, remove_int_to_null, fuse->appid_with_rw);
1617:system/core/sdcard/sdcard.c ****
1618:system/core/sdcard/sdcard.c **** FILE* file = fopen(kPackagesListFile, "r");
1619:system/core/sdcard/sdcard.c **** if (!file) {
1620:system/core/sdcard/sdcard.c **** ERROR("failed to open package list: %s\n", strerror(errno));
1621:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
1622:system/core/sdcard/sdcard.c **** return -1;
1623:system/core/sdcard/sdcard.c **** }
1624:system/core/sdcard/sdcard.c ****
1625:system/core/sdcard/sdcard.c **** char buf[512];
1626:system/core/sdcard/sdcard.c **** while (fgets(buf, sizeof(buf), file) != NULL) {
1627:system/core/sdcard/sdcard.c **** char package_name[512];
1628:system/core/sdcard/sdcard.c **** int appid;
1629:system/core/sdcard/sdcard.c **** char gids[512];
1630:system/core/sdcard/sdcard.c ****
1631:system/core/sdcard/sdcard.c **** if (sscanf(buf, "%s %d %*d %*s %*s %s", package_name, &appid, gids) == 3) {
1632:system/core/sdcard/sdcard.c **** char* package_name_dup = strdup(package_name);
1633:system/core/sdcard/sdcard.c **** hashmapPut(fuse->package_to_appid, package_name_dup, (void*) appid);
1634:system/core/sdcard/sdcard.c ****
1635:system/core/sdcard/sdcard.c **** char* token = strtok(gids, ",");
1636:system/core/sdcard/sdcard.c **** while (token != NULL) {
1637:system/core/sdcard/sdcard.c **** if (strtoul(token, NULL, 10) == fuse->write_gid) {
1638:system/core/sdcard/sdcard.c **** hashmapPut(fuse->appid_with_rw, (void*) appid, (void*) 1);
1639:system/core/sdcard/sdcard.c **** break;
1640:system/core/sdcard/sdcard.c **** }
1641:system/core/sdcard/sdcard.c **** token = strtok(NULL, ",");
1642:system/core/sdcard/sdcard.c **** }
1643:system/core/sdcard/sdcard.c **** }
1644:system/core/sdcard/sdcard.c **** }
ARM GAS /tmp/ccMR8LsA.s page 31
1645:system/core/sdcard/sdcard.c ****
1646:system/core/sdcard/sdcard.c **** TRACE("read_package_list: found %d packages, %d with write_gid\n",
1647:system/core/sdcard/sdcard.c **** hashmapSize(fuse->package_to_appid),
1648:system/core/sdcard/sdcard.c **** hashmapSize(fuse->appid_with_rw));
1649:system/core/sdcard/sdcard.c **** fclose(file);
1650:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
1651:system/core/sdcard/sdcard.c **** return 0;
1652:system/core/sdcard/sdcard.c **** }
1653:system/core/sdcard/sdcard.c ****
1654:system/core/sdcard/sdcard.c **** static void watch_package_list(struct fuse* fuse) {
1655:system/core/sdcard/sdcard.c **** struct inotify_event *event;
1656:system/core/sdcard/sdcard.c **** char event_buf[512];
1657:system/core/sdcard/sdcard.c ****
1658:system/core/sdcard/sdcard.c **** int nfd = inotify_init();
1659:system/core/sdcard/sdcard.c **** if (nfd < 0) {
1660:system/core/sdcard/sdcard.c **** ERROR("inotify_init failed: %s\n", strerror(errno));
1661:system/core/sdcard/sdcard.c **** return;
1662:system/core/sdcard/sdcard.c **** }
1663:system/core/sdcard/sdcard.c ****
1664:system/core/sdcard/sdcard.c **** bool active = false;
1665:system/core/sdcard/sdcard.c **** while (1) {
1666:system/core/sdcard/sdcard.c **** if (!active) {
1667:system/core/sdcard/sdcard.c **** int res = inotify_add_watch(nfd, kPackagesListFile, IN_DELETE_SELF);
1668:system/core/sdcard/sdcard.c **** if (res == -1) {
1669:system/core/sdcard/sdcard.c **** if (errno == ENOENT || errno == EACCES) {
1670:system/core/sdcard/sdcard.c **** /* Framework may not have created yet, sleep and retry */
1671:system/core/sdcard/sdcard.c **** ERROR("missing packages.list; retrying\n");
1672:system/core/sdcard/sdcard.c **** sleep(3);
1673:system/core/sdcard/sdcard.c **** continue;
1674:system/core/sdcard/sdcard.c **** } else {
1675:system/core/sdcard/sdcard.c **** ERROR("inotify_add_watch failed: %s\n", strerror(errno));
1676:system/core/sdcard/sdcard.c **** return;
1677:system/core/sdcard/sdcard.c **** }
1678:system/core/sdcard/sdcard.c **** }
1679:system/core/sdcard/sdcard.c ****
1680:system/core/sdcard/sdcard.c **** /* Watch above will tell us about any future changes, so
1681:system/core/sdcard/sdcard.c **** * read the current state. */
1682:system/core/sdcard/sdcard.c **** if (read_package_list(fuse) == -1) {
1683:system/core/sdcard/sdcard.c **** ERROR("read_package_list failed: %s\n", strerror(errno));
1684:system/core/sdcard/sdcard.c **** return;
1685:system/core/sdcard/sdcard.c **** }
1686:system/core/sdcard/sdcard.c **** active = true;
1687:system/core/sdcard/sdcard.c **** }
1688:system/core/sdcard/sdcard.c ****
1689:system/core/sdcard/sdcard.c **** int event_pos = 0;
1690:system/core/sdcard/sdcard.c **** int res = read(nfd, event_buf, sizeof(event_buf));
1691:system/core/sdcard/sdcard.c **** if (res < (int) sizeof(*event)) {
1692:system/core/sdcard/sdcard.c **** if (errno == EINTR)
1693:system/core/sdcard/sdcard.c **** continue;
1694:system/core/sdcard/sdcard.c **** ERROR("failed to read inotify event: %s\n", strerror(errno));
1695:system/core/sdcard/sdcard.c **** return;
1696:system/core/sdcard/sdcard.c **** }
1697:system/core/sdcard/sdcard.c ****
1698:system/core/sdcard/sdcard.c **** while (res >= (int) sizeof(*event)) {
1699:system/core/sdcard/sdcard.c **** int event_size;
1700:system/core/sdcard/sdcard.c **** event = (struct inotify_event *) (event_buf + event_pos);
1701:system/core/sdcard/sdcard.c ****
ARM GAS /tmp/ccMR8LsA.s page 32
1702:system/core/sdcard/sdcard.c **** TRACE("inotify event: %08x\n", event->mask);
1703:system/core/sdcard/sdcard.c **** if ((event->mask & IN_IGNORED) == IN_IGNORED) {
1704:system/core/sdcard/sdcard.c **** /* Previously watched file was deleted, probably due to move
1705:system/core/sdcard/sdcard.c **** * that swapped in new data; re-arm the watch and read. */
1706:system/core/sdcard/sdcard.c **** active = false;
1707:system/core/sdcard/sdcard.c **** }
1708:system/core/sdcard/sdcard.c ****
1709:system/core/sdcard/sdcard.c **** event_size = sizeof(*event) + event->len;
1710:system/core/sdcard/sdcard.c **** res -= event_size;
1711:system/core/sdcard/sdcard.c **** event_pos += event_size;
1712:system/core/sdcard/sdcard.c **** }
1713:system/core/sdcard/sdcard.c **** }
1714:system/core/sdcard/sdcard.c **** }
1715:system/core/sdcard/sdcard.c ****
1716:system/core/sdcard/sdcard.c **** static int ignite_fuse(struct fuse* fuse, int num_threads)
1717:system/core/sdcard/sdcard.c **** {
1718:system/core/sdcard/sdcard.c **** struct fuse_handler* handlers;
1719:system/core/sdcard/sdcard.c **** int i;
1720:system/core/sdcard/sdcard.c ****
1721:system/core/sdcard/sdcard.c **** handlers = malloc(num_threads * sizeof(struct fuse_handler));
1722:system/core/sdcard/sdcard.c **** if (!handlers) {
1723:system/core/sdcard/sdcard.c **** ERROR("cannot allocate storage for threads\n");
1724:system/core/sdcard/sdcard.c **** return -ENOMEM;
1725:system/core/sdcard/sdcard.c **** }
1726:system/core/sdcard/sdcard.c ****
1727:system/core/sdcard/sdcard.c **** for (i = 0; i < num_threads; i++) {
1728:system/core/sdcard/sdcard.c **** handlers[i].fuse = fuse;
1729:system/core/sdcard/sdcard.c **** handlers[i].token = i;
1730:system/core/sdcard/sdcard.c **** }
1731:system/core/sdcard/sdcard.c ****
1732:system/core/sdcard/sdcard.c **** /* When deriving permissions, this thread is used to process inotify events,
1733:system/core/sdcard/sdcard.c **** * otherwise it becomes one of the FUSE handlers. */
1734:system/core/sdcard/sdcard.c **** i = (fuse->derive == DERIVE_NONE) ? 1 : 0;
1735:system/core/sdcard/sdcard.c **** for (; i < num_threads; i++) {
1736:system/core/sdcard/sdcard.c **** pthread_t thread;
1737:system/core/sdcard/sdcard.c **** int res = pthread_create(&thread, NULL, start_handler, &handlers[i]);
1738:system/core/sdcard/sdcard.c **** if (res) {
1739:system/core/sdcard/sdcard.c **** ERROR("failed to start thread #%d, error=%d\n", i, res);
1740:system/core/sdcard/sdcard.c **** goto quit;
1741:system/core/sdcard/sdcard.c **** }
1742:system/core/sdcard/sdcard.c **** }
1743:system/core/sdcard/sdcard.c ****
1744:system/core/sdcard/sdcard.c **** if (fuse->derive == DERIVE_NONE) {
1745:system/core/sdcard/sdcard.c **** handle_fuse_requests(&handlers[0]);
1746:system/core/sdcard/sdcard.c **** } else {
1747:system/core/sdcard/sdcard.c **** watch_package_list(fuse);
1748:system/core/sdcard/sdcard.c **** }
1749:system/core/sdcard/sdcard.c ****
1750:system/core/sdcard/sdcard.c **** ERROR("terminated prematurely\n");
1751:system/core/sdcard/sdcard.c ****
1752:system/core/sdcard/sdcard.c **** /* don't bother killing all of the other threads or freeing anything,
1753:system/core/sdcard/sdcard.c **** * should never get here anyhow */
1754:system/core/sdcard/sdcard.c **** quit:
1755:system/core/sdcard/sdcard.c **** exit(1);
1756:system/core/sdcard/sdcard.c **** }
1757:system/core/sdcard/sdcard.c ****
1758:system/core/sdcard/sdcard.c **** static int usage()
ARM GAS /tmp/ccMR8LsA.s page 33
1759:system/core/sdcard/sdcard.c **** {
72 .loc 1 1759 0
73 .cfi_startproc
74 @ args = 0, pretend = 0, frame = 0
75 @ frame_needed = 0, uses_anonymous_args = 0
76 0000 08B5 push {r3, lr}
77 .save {r3, lr}
78 .LCFI0:
79 .cfi_def_cfa_offset 8
80 .cfi_offset 3, -8
81 .cfi_offset 14, -4
82 .loc 1 1759 0
83 0002 064B ldr r3, .L4
1760:system/core/sdcard/sdcard.c **** ERROR("usage: sdcard [OPTIONS] <source_path> <dest_path>\n"
84 .loc 1 1760 0
85 0004 064A ldr r2, .L4+4
1759:system/core/sdcard/sdcard.c **** {
86 .loc 1 1759 0
87 .LPIC0:
88 0006 7B44 add r3, pc
89 .loc 1 1760 0
90 0008 0649 ldr r1, .L4+8
91 000a 9858 ldr r0, [r3, r2]
92 000c 0222 movs r2, #2
93 .LPIC1:
94 000e 7944 add r1, pc
95 0010 A830 adds r0, r0, #168
96 0012 FFF7FEFF bl fprintf(PLT)
97 .LVL3:
1761:system/core/sdcard/sdcard.c **** " -u: specify UID to run as\n"
1762:system/core/sdcard/sdcard.c **** " -g: specify GID to run as\n"
1763:system/core/sdcard/sdcard.c **** " -w: specify GID required to write (default sdcard_rw)\n"
1764:system/core/sdcard/sdcard.c **** " -t: specify number of threads to use (default %d)\n"
1765:system/core/sdcard/sdcard.c **** " -d: derive file permissions based on path\n"
1766:system/core/sdcard/sdcard.c **** " -l: derive file permissions based on legacy internal layout\n"
1767:system/core/sdcard/sdcard.c **** " -s: split derived permissions for pics, av (requires -d or -l)\n"
1768:system/core/sdcard/sdcard.c **** "\n", DEFAULT_NUM_THREADS);
1769:system/core/sdcard/sdcard.c **** return 1;
1770:system/core/sdcard/sdcard.c **** }
98 .loc 1 1770 0
99 0016 0120 movs r0, #1
100 0018 08BD pop {r3, pc}
101 .L5:
102 001a 00BF .align 2
103 .L4:
104 001c 12000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC0+4)
105 0020 00000000 .word __sF(GOT)
106 0024 12000000 .word .LC0-(.LPIC1+4)
107 .cfi_endproc
108 .LFE118:
109 .fnend
111 .section .text.str_icase_equals,"ax",%progbits
112 .align 1
113 .thumb
114 .thumb_func
116 str_icase_equals:
117 .fnstart
ARM GAS /tmp/ccMR8LsA.s page 34
118 .LFB61:
198:system/core/sdcard/sdcard.c **** static bool str_icase_equals(void *keyA, void *keyB) {
119 .loc 1 198 0
120 .cfi_startproc
121 @ args = 0, pretend = 0, frame = 0
122 @ frame_needed = 0, uses_anonymous_args = 0
123 .LVL4:
124 0000 08B5 push {r3, lr}
125 .save {r3, lr}
126 .LCFI1:
127 .cfi_def_cfa_offset 8
128 .cfi_offset 3, -8
129 .cfi_offset 14, -4
199:system/core/sdcard/sdcard.c **** return strcasecmp(keyA, keyB) == 0;
130 .loc 1 199 0
131 0002 FFF7FEFF bl strcasecmp(PLT)
132 .LVL5:
200:system/core/sdcard/sdcard.c **** }
133 .loc 1 200 0
134 0006 D0F10100 rsbs r0, r0, #1
135 000a 38BF it cc
136 000c 0020 movcc r0, #0
137 000e 08BD pop {r3, pc}
138 .cfi_endproc
139 .LFE61:
140 .fnend
142 .section .text.str_hash,"ax",%progbits
143 .align 1
144 .thumb
145 .thumb_func
147 str_hash:
148 .fnstart
149 .LFB60:
193:system/core/sdcard/sdcard.c **** static int str_hash(void *key) {
150 .loc 1 193 0
151 .cfi_startproc
152 @ args = 0, pretend = 0, frame = 0
153 @ frame_needed = 0, uses_anonymous_args = 0
154 .LVL6:
155 0000 10B5 push {r4, lr}
156 .save {r4, lr}
157 .LCFI2:
158 .cfi_def_cfa_offset 8
159 .cfi_offset 4, -8
160 .cfi_offset 14, -4
193:system/core/sdcard/sdcard.c **** static int str_hash(void *key) {
161 .loc 1 193 0
162 0002 0446 mov r4, r0
163 .LVL7:
164 .LBB222:
165 .LBB223:
166 .file 2 "bionic/libc/include/string.h"
1:bionic/libc/include/string.h **** /*
2:bionic/libc/include/string.h **** * Copyright (C) 2008 The Android Open Source Project
3:bionic/libc/include/string.h **** * All rights reserved.
4:bionic/libc/include/string.h **** *
5:bionic/libc/include/string.h **** * Redistribution and use in source and binary forms, with or without
ARM GAS /tmp/ccMR8LsA.s page 35
6:bionic/libc/include/string.h **** * modification, are permitted provided that the following conditions
7:bionic/libc/include/string.h **** * are met:
8:bionic/libc/include/string.h **** * * Redistributions of source code must retain the above copyright
9:bionic/libc/include/string.h **** * notice, this list of conditions and the following disclaimer.
10:bionic/libc/include/string.h **** * * Redistributions in binary form must reproduce the above copyright
11:bionic/libc/include/string.h **** * notice, this list of conditions and the following disclaimer in
12:bionic/libc/include/string.h **** * the documentation and/or other materials provided with the
13:bionic/libc/include/string.h **** * distribution.
14:bionic/libc/include/string.h **** *
15:bionic/libc/include/string.h **** * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16:bionic/libc/include/string.h **** * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17:bionic/libc/include/string.h **** * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18:bionic/libc/include/string.h **** * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19:bionic/libc/include/string.h **** * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20:bionic/libc/include/string.h **** * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21:bionic/libc/include/string.h **** * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22:bionic/libc/include/string.h **** * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23:bionic/libc/include/string.h **** * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24:bionic/libc/include/string.h **** * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25:bionic/libc/include/string.h **** * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26:bionic/libc/include/string.h **** * SUCH DAMAGE.
27:bionic/libc/include/string.h **** */
28:bionic/libc/include/string.h **** #ifndef _STRING_H_
29:bionic/libc/include/string.h **** #define _STRING_H_
30:bionic/libc/include/string.h ****
31:bionic/libc/include/string.h **** #include <sys/cdefs.h>
32:bionic/libc/include/string.h **** #include <stddef.h>
33:bionic/libc/include/string.h **** #include <malloc.h>
34:bionic/libc/include/string.h ****
35:bionic/libc/include/string.h **** __BEGIN_DECLS
36:bionic/libc/include/string.h ****
37:bionic/libc/include/string.h **** extern void* memccpy(void* __restrict, const void* __restrict, int, size_t);
38:bionic/libc/include/string.h **** extern void* memchr(const void *, int, size_t) __purefunc;
39:bionic/libc/include/string.h **** extern void* memrchr(const void *, int, size_t) __purefunc;
40:bionic/libc/include/string.h **** extern int memcmp(const void *, const void *, size_t) __purefunc;
41:bionic/libc/include/string.h **** extern void* memcpy(void* __restrict, const void* __restrict, size_t);
42:bionic/libc/include/string.h **** extern void* memmove(void *, const void *, size_t);
43:bionic/libc/include/string.h **** extern void* memset(void *, int, size_t);
44:bionic/libc/include/string.h **** extern void* memmem(const void *, size_t, const void *, size_t) __purefunc;
45:bionic/libc/include/string.h **** extern void memswap(void *, void *, size_t);
46:bionic/libc/include/string.h ****
47:bionic/libc/include/string.h **** extern char* index(const char *, int) __purefunc;
48:bionic/libc/include/string.h **** extern char* strchr(const char *, int) __purefunc;
49:bionic/libc/include/string.h **** extern char* strrchr(const char *, int) __purefunc;
50:bionic/libc/include/string.h ****
51:bionic/libc/include/string.h **** extern size_t strlen(const char *) __purefunc;
52:bionic/libc/include/string.h **** extern size_t __strlen_chk(const char *, size_t);
53:bionic/libc/include/string.h **** extern int strcmp(const char *, const char *) __purefunc;
54:bionic/libc/include/string.h **** extern char* strcpy(char* __restrict, const char* __restrict);
55:bionic/libc/include/string.h **** extern char* strcat(char* __restrict, const char* __restrict);
56:bionic/libc/include/string.h ****
57:bionic/libc/include/string.h **** extern int strcasecmp(const char *, const char *) __purefunc;
58:bionic/libc/include/string.h **** extern int strncasecmp(const char *, const char *, size_t) __purefunc;
59:bionic/libc/include/string.h **** extern char* strdup(const char *);
60:bionic/libc/include/string.h ****
61:bionic/libc/include/string.h **** extern char* strstr(const char *, const char *) __purefunc;
62:bionic/libc/include/string.h **** extern char* strcasestr(const char *haystack, const char *needle) __purefunc;
ARM GAS /tmp/ccMR8LsA.s page 36
63:bionic/libc/include/string.h **** extern char* strtok(char* __restrict, const char* __restrict);
64:bionic/libc/include/string.h **** extern char* strtok_r(char* __restrict, const char* __restrict, char** __restrict);
65:bionic/libc/include/string.h ****
66:bionic/libc/include/string.h **** extern char* strerror(int);
67:bionic/libc/include/string.h **** extern int strerror_r(int errnum, char *buf, size_t n);
68:bionic/libc/include/string.h ****
69:bionic/libc/include/string.h **** extern size_t strnlen(const char *, size_t) __purefunc;
70:bionic/libc/include/string.h **** extern char* strncat(char* __restrict, const char* __restrict, size_t);
71:bionic/libc/include/string.h **** extern char* strndup(const char *, size_t);
72:bionic/libc/include/string.h **** extern int strncmp(const char *, const char *, size_t) __purefunc;
73:bionic/libc/include/string.h **** extern char* strncpy(char* __restrict, const char* __restrict, size_t);
74:bionic/libc/include/string.h ****
75:bionic/libc/include/string.h **** extern size_t strlcat(char* __restrict, const char* __restrict, size_t);
76:bionic/libc/include/string.h **** extern size_t strlcpy(char* __restrict, const char* __restrict, size_t);
77:bionic/libc/include/string.h ****
78:bionic/libc/include/string.h **** extern size_t strcspn(const char *, const char *) __purefunc;
79:bionic/libc/include/string.h **** extern char* strpbrk(const char *, const char *) __purefunc;
80:bionic/libc/include/string.h **** extern char* strsep(char** __restrict, const char* __restrict);
81:bionic/libc/include/string.h **** extern size_t strspn(const char *, const char *);
82:bionic/libc/include/string.h ****
83:bionic/libc/include/string.h **** extern char* strsignal(int sig);
84:bionic/libc/include/string.h ****
85:bionic/libc/include/string.h **** extern int strcoll(const char *, const char *) __purefunc;
86:bionic/libc/include/string.h **** extern size_t strxfrm(char* __restrict, const char* __restrict, size_t);
87:bionic/libc/include/string.h ****
88:bionic/libc/include/string.h **** #if defined(__BIONIC_FORTIFY)
89:bionic/libc/include/string.h ****
90:bionic/libc/include/string.h **** __errordecl(__memcpy_dest_size_error, "memcpy called with size bigger than destination");
91:bionic/libc/include/string.h **** __errordecl(__memcpy_src_size_error, "memcpy called with size bigger than source");
92:bionic/libc/include/string.h ****
93:bionic/libc/include/string.h **** __BIONIC_FORTIFY_INLINE
94:bionic/libc/include/string.h **** void* memcpy(void* __restrict dest, const void* __restrict src, size_t copy_amount) {
95:bionic/libc/include/string.h **** char *d = (char *) dest;
96:bionic/libc/include/string.h **** const char *s = (const char *) src;
97:bionic/libc/include/string.h **** size_t s_len = __builtin_object_size(s, 0);
98:bionic/libc/include/string.h **** size_t d_len = __builtin_object_size(d, 0);
99:bionic/libc/include/string.h ****
100:bionic/libc/include/string.h **** if (__builtin_constant_p(copy_amount) && (copy_amount > d_len)) {
101:bionic/libc/include/string.h **** __memcpy_dest_size_error();
102:bionic/libc/include/string.h **** }
103:bionic/libc/include/string.h ****
104:bionic/libc/include/string.h **** if (__builtin_constant_p(copy_amount) && (copy_amount > s_len)) {
105:bionic/libc/include/string.h **** __memcpy_src_size_error();
106:bionic/libc/include/string.h **** }
107:bionic/libc/include/string.h ****
108:bionic/libc/include/string.h **** return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
109:bionic/libc/include/string.h **** }
110:bionic/libc/include/string.h ****
111:bionic/libc/include/string.h **** __BIONIC_FORTIFY_INLINE
112:bionic/libc/include/string.h **** void* memmove(void *dest, const void *src, size_t len) {
113:bionic/libc/include/string.h **** return __builtin___memmove_chk(dest, src, len, __builtin_object_size (dest, 0));
114:bionic/libc/include/string.h **** }
115:bionic/libc/include/string.h ****
116:bionic/libc/include/string.h **** __BIONIC_FORTIFY_INLINE
117:bionic/libc/include/string.h **** char* strcpy(char* __restrict dest, const char* __restrict src) {
118:bionic/libc/include/string.h **** return __builtin___strcpy_chk(dest, src, __bos(dest));
119:bionic/libc/include/string.h **** }
ARM GAS /tmp/ccMR8LsA.s page 37
120:bionic/libc/include/string.h ****
121:bionic/libc/include/string.h **** __errordecl(__strncpy_error, "strncpy called with size bigger than buffer");
122:bionic/libc/include/string.h ****
123:bionic/libc/include/string.h **** __BIONIC_FORTIFY_INLINE
124:bionic/libc/include/string.h **** char* strncpy(char* __restrict dest, const char* __restrict src, size_t n) {
125:bionic/libc/include/string.h **** size_t bos = __bos(dest);
126:bionic/libc/include/string.h **** if (__builtin_constant_p(n) && (n > bos)) {
127:bionic/libc/include/string.h **** __strncpy_error();
128:bionic/libc/include/string.h **** }
129:bionic/libc/include/string.h **** return __builtin___strncpy_chk(dest, src, n, bos);
130:bionic/libc/include/string.h **** }
131:bionic/libc/include/string.h ****
132:bionic/libc/include/string.h **** __BIONIC_FORTIFY_INLINE
133:bionic/libc/include/string.h **** char* strcat(char* __restrict dest, const char* __restrict src) {
134:bionic/libc/include/string.h **** return __builtin___strcat_chk(dest, src, __bos(dest));
135:bionic/libc/include/string.h **** }
136:bionic/libc/include/string.h ****
137:bionic/libc/include/string.h **** __BIONIC_FORTIFY_INLINE
138:bionic/libc/include/string.h **** char *strncat(char* __restrict dest, const char* __restrict src, size_t n) {
139:bionic/libc/include/string.h **** return __builtin___strncat_chk(dest, src, n, __bos(dest));
140:bionic/libc/include/string.h **** }
141:bionic/libc/include/string.h ****
142:bionic/libc/include/string.h **** __BIONIC_FORTIFY_INLINE
143:bionic/libc/include/string.h **** void* memset(void *s, int c, size_t n) {
144:bionic/libc/include/string.h **** return __builtin___memset_chk(s, c, n, __builtin_object_size (s, 0));
145:bionic/libc/include/string.h **** }
146:bionic/libc/include/string.h ****
147:bionic/libc/include/string.h **** extern size_t __strlcpy_real(char* __restrict, const char* __restrict, size_t)
148:bionic/libc/include/string.h **** __asm__(__USER_LABEL_PREFIX__ "strlcpy");
149:bionic/libc/include/string.h **** __errordecl(__strlcpy_error, "strlcpy called with size bigger than buffer");
150:bionic/libc/include/string.h **** extern size_t __strlcpy_chk(char *, const char *, size_t, size_t);
151:bionic/libc/include/string.h ****
152:bionic/libc/include/string.h **** __BIONIC_FORTIFY_INLINE
153:bionic/libc/include/string.h **** size_t strlcpy(char* __restrict dest, const char* __restrict src, size_t size) {
154:bionic/libc/include/string.h **** size_t bos = __bos(dest);
155:bionic/libc/include/string.h ****
156:bionic/libc/include/string.h **** #if !defined(__clang__)
157:bionic/libc/include/string.h **** // Compiler doesn't know destination size. Don't call __strlcpy_chk
158:bionic/libc/include/string.h **** if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
159:bionic/libc/include/string.h **** return __strlcpy_real(dest, src, size);
160:bionic/libc/include/string.h **** }
161:bionic/libc/include/string.h ****
162:bionic/libc/include/string.h **** // Compiler can prove, at compile time, that the passed in size
163:bionic/libc/include/string.h **** // is always <= the actual object size. Don't call __strlcpy_chk
164:bionic/libc/include/string.h **** if (__builtin_constant_p(size) && (size <= bos)) {
165:bionic/libc/include/string.h **** return __strlcpy_real(dest, src, size);
166:bionic/libc/include/string.h **** }
167:bionic/libc/include/string.h ****
168:bionic/libc/include/string.h **** // Compiler can prove, at compile time, that the passed in size
169:bionic/libc/include/string.h **** // is always > the actual object size. Force a compiler error.
170:bionic/libc/include/string.h **** if (__builtin_constant_p(size) && (size > bos)) {
171:bionic/libc/include/string.h **** __strlcpy_error();
172:bionic/libc/include/string.h **** }
173:bionic/libc/include/string.h **** #endif /* !defined(__clang__) */
174:bionic/libc/include/string.h ****
175:bionic/libc/include/string.h **** return __strlcpy_chk(dest, src, size, bos);
176:bionic/libc/include/string.h **** }
ARM GAS /tmp/ccMR8LsA.s page 38
177:bionic/libc/include/string.h ****
178:bionic/libc/include/string.h **** extern size_t __strlcat_real(char* __restrict, const char* __restrict, size_t)
179:bionic/libc/include/string.h **** __asm__(__USER_LABEL_PREFIX__ "strlcat");
180:bionic/libc/include/string.h **** __errordecl(__strlcat_error, "strlcat called with size bigger than buffer");
181:bionic/libc/include/string.h **** extern size_t __strlcat_chk(char* __restrict, const char* __restrict, size_t, size_t);
182:bionic/libc/include/string.h ****
183:bionic/libc/include/string.h ****
184:bionic/libc/include/string.h **** __BIONIC_FORTIFY_INLINE
185:bionic/libc/include/string.h **** size_t strlcat(char* __restrict dest, const char* __restrict src, size_t size) {
186:bionic/libc/include/string.h **** size_t bos = __bos(dest);
187:bionic/libc/include/string.h ****
188:bionic/libc/include/string.h **** #if !defined(__clang__)
189:bionic/libc/include/string.h **** // Compiler doesn't know destination size. Don't call __strlcat_chk
190:bionic/libc/include/string.h **** if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
191:bionic/libc/include/string.h **** return __strlcat_real(dest, src, size);
192:bionic/libc/include/string.h **** }
193:bionic/libc/include/string.h ****
194:bionic/libc/include/string.h **** // Compiler can prove, at compile time, that the passed in size
195:bionic/libc/include/string.h **** // is always <= the actual object size. Don't call __strlcat_chk
196:bionic/libc/include/string.h **** if (__builtin_constant_p(size) && (size <= bos)) {
197:bionic/libc/include/string.h **** return __strlcat_real(dest, src, size);
198:bionic/libc/include/string.h **** }
199:bionic/libc/include/string.h ****
200:bionic/libc/include/string.h **** // Compiler can prove, at compile time, that the passed in size
201:bionic/libc/include/string.h **** // is always > the actual object size. Force a compiler error.
202:bionic/libc/include/string.h **** if (__builtin_constant_p(size) && (size > bos)) {
203:bionic/libc/include/string.h **** __strlcat_error();
204:bionic/libc/include/string.h **** }
205:bionic/libc/include/string.h **** #endif /* !defined(__clang__) */
206:bionic/libc/include/string.h ****
207:bionic/libc/include/string.h **** return __strlcat_chk(dest, src, size, bos);
208:bionic/libc/include/string.h **** }
209:bionic/libc/include/string.h ****
210:bionic/libc/include/string.h **** __BIONIC_FORTIFY_INLINE
211:bionic/libc/include/string.h **** size_t strlen(const char *s) {
212:bionic/libc/include/string.h **** size_t bos = __bos(s);
213:bionic/libc/include/string.h ****
214:bionic/libc/include/string.h **** #if !defined(__clang__)
215:bionic/libc/include/string.h **** // Compiler doesn't know destination size. Don't call __strlen_chk
216:bionic/libc/include/string.h **** if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
217:bionic/libc/include/string.h **** return __builtin_strlen(s);
167 .loc 2 217 0
168 0004 FFF7FEFF bl strlen(PLT)
169 .LVL8:
170 0008 0146 mov r1, r0
171 .LBE223:
172 .LBE222:
194:system/core/sdcard/sdcard.c **** return hashmapHash(key, strlen(key));
173 .loc 1 194 0
174 000a 2046 mov r0, r4
195:system/core/sdcard/sdcard.c **** }
175 .loc 1 195 0
176 000c BDE81040 pop {r4, lr}
194:system/core/sdcard/sdcard.c **** return hashmapHash(key, strlen(key));
177 .loc 1 194 0
178 0010 FFF7FEBF b hashmapHash(PLT)
179 .LVL9:
ARM GAS /tmp/ccMR8LsA.s page 39
180 .cfi_endproc
181 .LFE60:
182 .fnend
184 .section .text.get_node_path_locked,"ax",%progbits
185 .align 1
186 .thumb
187 .thumb_func
189 get_node_path_locked:
190 .fnstart
191 .LFB70:
308:system/core/sdcard/sdcard.c **** static ssize_t get_node_path_locked(struct node* node, char* buf, size_t bufsize) {
192 .loc 1 308 0
193 .cfi_startproc
194 @ args = 0, pretend = 0, frame = 0
195 @ frame_needed = 0, uses_anonymous_args = 0
196 .LVL10:
197 0000 2DE9F041 push {r4, r5, r6, r7, r8, lr}
198 .save {r4, r5, r6, r7, r8, lr}
199 .LCFI3:
200 .cfi_def_cfa_offset 24
201 .cfi_offset 4, -24
202 .cfi_offset 5, -20
203 .cfi_offset 6, -16
204 .cfi_offset 7, -12
205 .cfi_offset 8, -8
206 .cfi_offset 14, -4
308:system/core/sdcard/sdcard.c **** static ssize_t get_node_path_locked(struct node* node, char* buf, size_t bufsize) {
207 .loc 1 308 0
208 0004 0F46 mov r7, r1
311:system/core/sdcard/sdcard.c **** if (node->graft_path) {
209 .loc 1 311 0
210 0006 436C ldr r3, [r0, #68]
211 0008 13B1 cbz r3, .L9
212 .LVL11:
313:system/core/sdcard/sdcard.c **** namelen = node->graft_pathlen;
213 .loc 1 313 0
214 000a 846C ldr r4, [r0, #72]
215 .LVL12:
216 000c 1E46 mov r6, r3
217 000e 03E0 b .L10
218 .LVL13:
219 .L9:
314:system/core/sdcard/sdcard.c **** } else if (node->actual_name) {
220 .loc 1 314 0
221 0010 066C ldr r6, [r0, #64]
222 0012 846B ldr r4, [r0, #56]
223 0014 06B9 cbnz r6, .L10
318:system/core/sdcard/sdcard.c **** name = node->name;
224 .loc 1 318 0
225 0016 C66B ldr r6, [r0, #60]
226 .LVL14:
227 .L10:
322:system/core/sdcard/sdcard.c **** if (bufsize < namelen + 1) {
228 .loc 1 322 0
229 0018 04F10108 add r8, r4, #1
230 001c 4245 cmp r2, r8
231 001e 03D2 bcs .L12
ARM GAS /tmp/ccMR8LsA.s page 40
232 .LVL15:
233 .L15:
323:system/core/sdcard/sdcard.c **** return -1;
234 .loc 1 323 0
235 0020 4FF0FF30 mov r0, #-1
236 0024 BDE8F081 pop {r4, r5, r6, r7, r8, pc}
237 .LVL16:
238 .L12:
327:system/core/sdcard/sdcard.c **** if (node->parent && node->graft_path == NULL) {
239 .loc 1 327 0
240 0028 406B ldr r0, [r0, #52]
241 .LVL17:
242 002a 58B1 cbz r0, .L16
327:system/core/sdcard/sdcard.c **** if (node->parent && node->graft_path == NULL) {
243 .loc 1 327 0 is_stmt 0 discriminator 1
244 002c 63B9 cbnz r3, .L17
328:system/core/sdcard/sdcard.c **** pathlen = get_node_path_locked(node->parent, buf, bufsize - namelen - 2);
245 .loc 1 328 0 is_stmt 1
246 002e 023A subs r2, r2, #2
247 .LVL18:
248 0030 3946 mov r1, r7
249 .LVL19:
250 0032 121B subs r2, r2, r4
251 .LVL20:
252 0034 FFF7E4FF bl get_node_path_locked(PLT)
253 .LVL21:
329:system/core/sdcard/sdcard.c **** if (pathlen < 0) {
254 .loc 1 329 0
255 0038 0028 cmp r0, #0
256 003a F1DB blt .L15
332:system/core/sdcard/sdcard.c **** buf[pathlen++] = '/';
257 .loc 1 332 0
258 003c 2F21 movs r1, #47
259 003e 451C adds r5, r0, #1
260 .LVL22:
261 0040 3954 strb r1, [r7, r0]
262 0042 02E0 b .L14
263 .LVL23:
264 .L16:
326:system/core/sdcard/sdcard.c **** ssize_t pathlen = 0;
265 .loc 1 326 0
266 0044 0546 mov r5, r0
267 0046 00E0 b .L14
268 .L17:
269 0048 0025 movs r5, #0
270 .LVL24:
271 .L14:
272 .LBB224:
273 .LBB225:
108:bionic/libc/include/string.h **** return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
274 .loc 2 108 0
275 004a 7819 adds r0, r7, r5
276 .LVL25:
277 004c 3146 mov r1, r6
278 004e 4246 mov r2, r8
279 0050 FFF7FEFF bl memcpy(PLT)
280 .LVL26:
ARM GAS /tmp/ccMR8LsA.s page 41
281 .LBE225:
282 .LBE224:
336:system/core/sdcard/sdcard.c **** return pathlen + namelen;
283 .loc 1 336 0
284 0054 2819 adds r0, r5, r4
337:system/core/sdcard/sdcard.c **** }
285 .loc 1 337 0
286 0056 BDE8F081 pop {r4, r5, r6, r7, r8, pc}
287 .cfi_endproc
288 .LFE70:
289 .fnend
291 .section .text.remove_int_to_null,"ax",%progbits
292 .align 1
293 .thumb
294 .thumb_func
296 remove_int_to_null:
297 .fnstart
298 .LFB114:
1606:system/core/sdcard/sdcard.c **** static bool remove_int_to_null(void *key, void *value, void *context) {
299 .loc 1 1606 0
300 .cfi_startproc
301 @ args = 0, pretend = 0, frame = 0
302 @ frame_needed = 0, uses_anonymous_args = 0
303 .LVL27:
304 0000 0146 mov r1, r0
305 .LVL28:
306 0002 08B5 push {r3, lr}
307 .save {r3, lr}
308 .LCFI4:
309 .cfi_def_cfa_offset 8
310 .cfi_offset 3, -8
311 .cfi_offset 14, -4
1608:system/core/sdcard/sdcard.c **** hashmapRemove(map, key);
312 .loc 1 1608 0
313 0004 1046 mov r0, r2
314 .LVL29:
315 0006 FFF7FEFF bl hashmapRemove(PLT)
316 .LVL30:
1610:system/core/sdcard/sdcard.c **** }
317 .loc 1 1610 0
318 000a 0120 movs r0, #1
319 000c 08BD pop {r3, pc}
320 .cfi_endproc
321 .LFE114:
322 .fnend
324 .section .text.remove_str_to_int,"ax",%progbits
325 .align 1
326 .thumb
327 .thumb_func
329 remove_str_to_int:
330 .fnstart
331 .LFB113:
1599:system/core/sdcard/sdcard.c **** static bool remove_str_to_int(void *key, void *value, void *context) {
332 .loc 1 1599 0
333 .cfi_startproc
334 @ args = 0, pretend = 0, frame = 0
335 @ frame_needed = 0, uses_anonymous_args = 0
ARM GAS /tmp/ccMR8LsA.s page 42
336 .LVL31:
337 0000 10B5 push {r4, lr}
338 .save {r4, lr}
339 .LCFI5:
340 .cfi_def_cfa_offset 8
341 .cfi_offset 4, -8
342 .cfi_offset 14, -4
1599:system/core/sdcard/sdcard.c **** static bool remove_str_to_int(void *key, void *value, void *context) {
343 .loc 1 1599 0
344 0002 0446 mov r4, r0
1601:system/core/sdcard/sdcard.c **** hashmapRemove(map, key);
345 .loc 1 1601 0
346 0004 2146 mov r1, r4
347 .LVL32:
348 0006 1046 mov r0, r2
349 .LVL33:
350 0008 FFF7FEFF bl hashmapRemove(PLT)
351 .LVL34:
1602:system/core/sdcard/sdcard.c **** free(key);
352 .loc 1 1602 0
353 000c 2046 mov r0, r4
354 000e FFF7FEFF bl free(PLT)
355 .LVL35:
1604:system/core/sdcard/sdcard.c **** }
356 .loc 1 1604 0
357 0012 0120 movs r0, #1
358 0014 10BD pop {r4, pc}
359 .cfi_endproc
360 .LFE113:
361 .fnend
363 .section .text.check_caller_access_to_name,"ax",%progbits
364 .align 1
365 .thumb
366 .thumb_func
368 check_caller_access_to_name:
369 .fnstart
370 .LFB76:
522:system/core/sdcard/sdcard.c **** const char* name, int mode, bool has_rw) {
371 .loc 1 522 0
372 .cfi_startproc
373 @ args = 8, pretend = 0, frame = 0
374 @ frame_needed = 0, uses_anonymous_args = 0
375 .LVL36:
376 0000 2DE9F041 push {r4, r5, r6, r7, r8, lr}
377 .save {r4, r5, r6, r7, r8, lr}
378 .LCFI6:
379 .cfi_def_cfa_offset 24
380 .cfi_offset 4, -24
381 .cfi_offset 5, -20
382 .cfi_offset 6, -16
383 .cfi_offset 7, -12
384 .cfi_offset 8, -8
385 .cfi_offset 14, -4
522:system/core/sdcard/sdcard.c **** const char* name, int mode, bool has_rw) {
386 .loc 1 522 0
387 0004 8046 mov r8, r0
388 0006 0F46 mov r7, r1
ARM GAS /tmp/ccMR8LsA.s page 43
389 0008 1E46 mov r6, r3
524:system/core/sdcard/sdcard.c **** if (parent_node && parent_node->perm == PERM_ROOT) {
390 .loc 1 524 0
391 000a 1546 mov r5, r2
522:system/core/sdcard/sdcard.c **** const char* name, int mode, bool has_rw) {
392 .loc 1 522 0
393 000c 9DF81C40 ldrb r4, [sp, #28] @ zero_extendqisi2
524:system/core/sdcard/sdcard.c **** if (parent_node && parent_node->perm == PERM_ROOT) {
394 .loc 1 524 0
395 0010 A2B1 cbz r2, .L21
524:system/core/sdcard/sdcard.c **** if (parent_node && parent_node->perm == PERM_ROOT) {
396 .loc 1 524 0 is_stmt 0 discriminator 1
397 0012 9369 ldr r3, [r2, #24]
398 .LVL37:
399 0014 022B cmp r3, #2
400 0016 11D1 bne .L21
525:system/core/sdcard/sdcard.c **** if (!strcasecmp(name, "autorun.inf")
401 .loc 1 525 0 is_stmt 1
402 0018 1249 ldr r1, .L35
403 .LVL38:
404 001a 3046 mov r0, r6
405 .LVL39:
406 .LPIC2:
407 001c 7944 add r1, pc
408 001e FFF7FEFF bl strcasecmp(PLT)
409 .LVL40:
410 0022 C8B1 cbz r0, .L28
526:system/core/sdcard/sdcard.c **** || !strcasecmp(name, ".android_secure")
411 .loc 1 526 0
412 0024 1049 ldr r1, .L35+4
413 0026 3046 mov r0, r6
414 .LPIC3:
415 0028 7944 add r1, pc
416 002a FFF7FEFF bl strcasecmp(PLT)
417 .LVL41:
418 002e 98B1 cbz r0, .L28
527:system/core/sdcard/sdcard.c **** || !strcasecmp(name, "android_secure")) {
419 .loc 1 527 0
420 0030 0E49 ldr r1, .L35+8
421 0032 3046 mov r0, r6
422 .LPIC4:
423 0034 7944 add r1, pc
424 0036 FFF7FEFF bl strcasecmp(PLT)
425 .LVL42:
426 003a 68B1 cbz r0, .L28
427 .L21:
533:system/core/sdcard/sdcard.c **** if (fuse->derive == DERIVE_NONE) {
428 .loc 1 533 0
429 003c D8F81400 ldr r0, [r8, #20]
430 0040 60B1 cbz r0, .L29
431 .LVL43:
432 .LBB228:
433 .LBB229:
539:system/core/sdcard/sdcard.c **** if (hdr->uid == 0) {
434 .loc 1 539 0
435 0042 B969 ldr r1, [r7, #24]
436 0044 51B1 cbz r1, .L29
ARM GAS /tmp/ccMR8LsA.s page 44
545:system/core/sdcard/sdcard.c **** if (mode & W_OK) {
437 .loc 1 545 0
438 0046 069A ldr r2, [sp, #24]
439 0048 9207 lsls r2, r2, #30
440 004a 07D5 bpl .L29
546:system/core/sdcard/sdcard.c **** if (parent_node && hdr->uid == parent_node->uid) {
441 .loc 1 546 0
442 004c 3DB1 cbz r5, .L22
443 004e 2B6A ldr r3, [r5, #32]
540:system/core/sdcard/sdcard.c **** return true;
444 .loc 1 540 0
445 0050 9942 cmp r1, r3
446 0052 08BF it eq
447 0054 0124 moveq r4, #1
448 .LVL44:
449 0056 02E0 b .L22
450 .LVL45:
451 .L28:
452 .LBE229:
453 .LBE228:
528:system/core/sdcard/sdcard.c **** return false;
454 .loc 1 528 0
455 0058 0446 mov r4, r0
456 005a 00E0 b .L22
457 .L29:
534:system/core/sdcard/sdcard.c **** return true;
458 .loc 1 534 0
459 005c 0124 movs r4, #1
460 .L22:
555:system/core/sdcard/sdcard.c **** }
461 .loc 1 555 0
462 005e 2046 mov r0, r4
463 0060 BDE8F081 pop {r4, r5, r6, r7, r8, pc}
464 .L36:
465 .align 2
466 .L35:
467 0064 44000000 .word .LC1-(.LPIC2+4)
468 0068 3C000000 .word .LC2-(.LPIC3+4)
469 006c 34000000 .word .LC3-(.LPIC4+4)
470 .cfi_endproc
471 .LFE76:
472 .fnend
474 .section .text.fuse_reply,"ax",%progbits
475 .align 1
476 .thumb
477 .thumb_func
479 fuse_reply:
480 .fnstart
481 .LFB86:
746:system/core/sdcard/sdcard.c **** {
482 .loc 1 746 0
483 .cfi_startproc
484 @ args = 8, pretend = 0, frame = 32
485 @ frame_needed = 0, uses_anonymous_args = 0
486 .LVL46:
487 0000 30B5 push {r4, r5, lr}
488 .save {r4, r5, lr}
ARM GAS /tmp/ccMR8LsA.s page 45
489 .LCFI7:
490 .cfi_def_cfa_offset 12
491 .cfi_offset 4, -12
492 .cfi_offset 5, -8
493 .cfi_offset 14, -4
494 .pad #36
495 0002 89B0 sub sp, sp, #36
496 .LCFI8:
497 .cfi_def_cfa_offset 48
746:system/core/sdcard/sdcard.c **** {
498 .loc 1 746 0
499 0004 0D99 ldr r1, [sp, #52]
753:system/core/sdcard/sdcard.c **** hdr.unique = unique;
500 .loc 1 753 0
501 0006 CDE90223 strd r2, [sp, #8]
756:system/core/sdcard/sdcard.c **** vec[0].iov_len = sizeof(hdr);
502 .loc 1 756 0
503 000a 1022 movs r2, #16
504 .LVL47:
751:system/core/sdcard/sdcard.c **** hdr.len = len + sizeof(hdr);
505 .loc 1 751 0
506 000c 01F11005 add r5, r1, #16
756:system/core/sdcard/sdcard.c **** vec[0].iov_len = sizeof(hdr);
507 .loc 1 756 0
508 0010 0592 str r2, [sp, #20]
751:system/core/sdcard/sdcard.c **** hdr.len = len + sizeof(hdr);
509 .loc 1 751 0
510 0012 0095 str r5, [sp, #0]
752:system/core/sdcard/sdcard.c **** hdr.error = 0;
511 .loc 1 752 0
512 0014 0025 movs r5, #0
755:system/core/sdcard/sdcard.c **** vec[0].iov_base = &hdr;
513 .loc 1 755 0
514 0016 0DEB0503 add r3, sp, r5
758:system/core/sdcard/sdcard.c **** vec[1].iov_len = len;
515 .loc 1 758 0
516 001a 0791 str r1, [sp, #28]
755:system/core/sdcard/sdcard.c **** vec[0].iov_base = &hdr;
517 .loc 1 755 0
518 001c 0493 str r3, [sp, #16]
760:system/core/sdcard/sdcard.c **** res = writev(fuse->fd, vec, 2);
519 .loc 1 760 0
520 001e 0222 movs r2, #2
757:system/core/sdcard/sdcard.c **** vec[1].iov_base = data;
521 .loc 1 757 0
522 0020 0C9B ldr r3, [sp, #48]
760:system/core/sdcard/sdcard.c **** res = writev(fuse->fd, vec, 2);
523 .loc 1 760 0
524 0022 04A9 add r1, sp, #16
746:system/core/sdcard/sdcard.c **** {
525 .loc 1 746 0
526 0024 0A4C ldr r4, .L39
760:system/core/sdcard/sdcard.c **** res = writev(fuse->fd, vec, 2);
527 .loc 1 760 0
528 0026 0069 ldr r0, [r0, #16]
529 .LVL48:
752:system/core/sdcard/sdcard.c **** hdr.error = 0;
ARM GAS /tmp/ccMR8LsA.s page 46
530 .loc 1 752 0
531 0028 0195 str r5, [sp, #4]
757:system/core/sdcard/sdcard.c **** vec[1].iov_base = data;
532 .loc 1 757 0
533 002a 0693 str r3, [sp, #24]
746:system/core/sdcard/sdcard.c **** {
534 .loc 1 746 0
535 .LPIC5:
536 002c 7C44 add r4, pc
760:system/core/sdcard/sdcard.c **** res = writev(fuse->fd, vec, 2);
537 .loc 1 760 0
538 002e FFF7FEFF bl writev(PLT)
539 .LVL49:
761:system/core/sdcard/sdcard.c **** if (res < 0) {
540 .loc 1 761 0
541 0032 A842 cmp r0, r5
542 0034 09DA bge .L37
543 .LBB232:
544 .LBB233:
762:system/core/sdcard/sdcard.c **** ERROR("*** REPLY FAILED *** %d\n", errno);
545 .loc 1 762 0
546 0036 FFF7FEFF bl __errno(PLT)
547 .LVL50:
548 003a 0268 ldr r2, [r0, #0]
549 003c 0548 ldr r0, .L39+4
550 003e 0649 ldr r1, .L39+8
551 0040 2058 ldr r0, [r4, r0]
552 .LPIC6:
553 0042 7944 add r1, pc
554 0044 A830 adds r0, r0, #168
555 0046 FFF7FEFF bl fprintf(PLT)
556 .LVL51:
557 .L37:
558 .LBE233:
559 .LBE232:
764:system/core/sdcard/sdcard.c **** }
560 .loc 1 764 0
561 004a 09B0 add sp, sp, #36
562 004c 30BD pop {r4, r5, pc}
563 .L40:
564 004e 00BF .align 2
565 .L39:
566 0050 20000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC5+4)
567 0054 00000000 .word __sF(GOT)
568 0058 12000000 .word .LC4-(.LPIC6+4)
569 .cfi_endproc
570 .LFE86:
571 .fnend
573 .section .text.release_node_locked,"ax",%progbits
574 .align 1
575 .thumb
576 .thumb_func
578 release_node_locked:
579 .fnstart
580 .LFB67:
258:system/core/sdcard/sdcard.c **** {
581 .loc 1 258 0
ARM GAS /tmp/ccMR8LsA.s page 47
582 .cfi_startproc
583 @ args = 0, pretend = 0, frame = 0
584 @ frame_needed = 0, uses_anonymous_args = 0
585 .LVL52:
586 0000 10B5 push {r4, lr}
587 .save {r4, lr}
588 .LCFI9:
589 .cfi_def_cfa_offset 8
590 .cfi_offset 4, -8
591 .cfi_offset 14, -4
258:system/core/sdcard/sdcard.c **** {
592 .loc 1 258 0
593 0002 0446 mov r4, r0
594 0004 144B ldr r3, .L44
260:system/core/sdcard/sdcard.c **** if (node->refcount > 0) {
595 .loc 1 260 0
596 0006 0268 ldr r2, [r0, #0]
258:system/core/sdcard/sdcard.c **** {
597 .loc 1 258 0
598 .LPIC7:
599 0008 7B44 add r3, pc
260:system/core/sdcard/sdcard.c **** if (node->refcount > 0) {
600 .loc 1 260 0
601 000a D2B1 cbz r2, .L42
261:system/core/sdcard/sdcard.c **** node->refcount--;
602 .loc 1 261 0
603 000c 531E subs r3, r2, #1
604 000e 0360 str r3, [r0, #0]
262:system/core/sdcard/sdcard.c **** if (!node->refcount) {
605 .loc 1 262 0
606 0010 002B cmp r3, #0
607 0012 20D1 bne .L41
608 .LVL53:
609 .LBB240:
610 .LBB241:
264:system/core/sdcard/sdcard.c **** remove_node_from_parent_locked(node);
611 .loc 1 264 0
612 0014 FFF7FEFF bl remove_node_from_parent_locked(PLT)
613 .LVL54:
614 .LBB242:
615 .LBB243:
144:bionic/libc/include/string.h **** return __builtin___memset_chk(s, c, n, __builtin_object_size (s, 0));
616 .loc 2 144 0
617 0018 EF21 movs r1, #239
618 001a A26B ldr r2, [r4, #56]
619 001c E06B ldr r0, [r4, #60]
620 001e FFF7FEFF bl memset(PLT)
621 .LVL55:
622 .LBE243:
623 .LBE242:
268:system/core/sdcard/sdcard.c **** free(node->name);
624 .loc 1 268 0
625 0022 E06B ldr r0, [r4, #60]
626 0024 FFF7FEFF bl free(PLT)
627 .LVL56:
269:system/core/sdcard/sdcard.c **** free(node->actual_name);
628 .loc 1 269 0
ARM GAS /tmp/ccMR8LsA.s page 48
629 0028 206C ldr r0, [r4, #64]
630 002a FFF7FEFF bl free(PLT)
631 .LVL57:
632 .LBB244:
633 .LBB245:
144:bionic/libc/include/string.h **** return __builtin___memset_chk(s, c, n, __builtin_object_size (s, 0));
634 .loc 2 144 0
635 002e 2046 mov r0, r4
636 0030 FC21 movs r1, #252
637 0032 5022 movs r2, #80
638 0034 FFF7FEFF bl memset(PLT)
639 .LVL58:
640 .LBE245:
641 .LBE244:
271:system/core/sdcard/sdcard.c **** free(node);
642 .loc 1 271 0
643 0038 2046 mov r0, r4
644 .LBE241:
645 .LBE240:
276:system/core/sdcard/sdcard.c **** }
646 .loc 1 276 0
647 003a BDE81040 pop {r4, lr}
648 .LBB247:
649 .LBB246:
271:system/core/sdcard/sdcard.c **** free(node);
650 .loc 1 271 0
651 003e FFF7FEBF b free(PLT)
652 .LVL59:
653 .L42:
654 .LBE246:
655 .LBE247:
274:system/core/sdcard/sdcard.c **** ERROR("Zero refcnt %p\n", node);
656 .loc 1 274 0
657 0042 0648 ldr r0, .L44+4
658 .LVL60:
659 0044 2246 mov r2, r4
660 0046 0649 ldr r1, .L44+8
661 0048 1858 ldr r0, [r3, r0]
662 .LPIC8:
663 004a 7944 add r1, pc
664 004c A830 adds r0, r0, #168
276:system/core/sdcard/sdcard.c **** }
665 .loc 1 276 0
666 004e BDE81040 pop {r4, lr}
274:system/core/sdcard/sdcard.c **** ERROR("Zero refcnt %p\n", node);
667 .loc 1 274 0
668 0052 FFF7FEBF b fprintf(PLT)
669 .LVL61:
670 .L41:
671 0056 10BD pop {r4, pc}
672 .L45:
673 .align 2
674 .L44:
675 0058 4C000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC7+4)
676 005c 00000000 .word __sF(GOT)
677 0060 12000000 .word .LC5-(.LPIC8+4)
678 .cfi_endproc
ARM GAS /tmp/ccMR8LsA.s page 49
679 .LFE67:
680 .fnend
682 .section .text.remove_node_from_parent_locked,"ax",%progbits
683 .align 1
684 .thumb
685 .thumb_func
687 remove_node_from_parent_locked:
688 .fnstart
689 .LFB69:
286:system/core/sdcard/sdcard.c **** {
690 .loc 1 286 0
691 .cfi_startproc
692 @ args = 0, pretend = 0, frame = 0
693 @ frame_needed = 0, uses_anonymous_args = 0
694 .LVL62:
695 0000 10B5 push {r4, lr}
696 .save {r4, lr}
697 .LCFI10:
698 .cfi_def_cfa_offset 8
699 .cfi_offset 4, -8
700 .cfi_offset 14, -4
286:system/core/sdcard/sdcard.c **** {
701 .loc 1 286 0
702 0002 0446 mov r4, r0
287:system/core/sdcard/sdcard.c **** if (node->parent) {
703 .loc 1 287 0
704 0004 426B ldr r2, [r0, #52]
705 0006 8AB1 cbz r2, .L46
288:system/core/sdcard/sdcard.c **** if (node->parent->child == node) {
706 .loc 1 288 0
707 0008 136B ldr r3, [r2, #48]
708 000a 8342 cmp r3, r0
709 000c 03D1 bne .L54
289:system/core/sdcard/sdcard.c **** node->parent->child = node->parent->child->next;
710 .loc 1 289 0
711 000e C06A ldr r0, [r0, #44]
712 .LVL63:
713 0010 1063 str r0, [r2, #48]
714 0012 05E0 b .L49
715 .LVL64:
716 .L51:
717 .LBB248:
294:system/core/sdcard/sdcard.c **** node2 = node2->next;
718 .loc 1 294 0
719 0014 0346 mov r3, r0
720 .LVL65:
721 .L54:
293:system/core/sdcard/sdcard.c **** while (node2->next != node)
722 .loc 1 293 0 discriminator 1
723 0016 D86A ldr r0, [r3, #44]
724 0018 A042 cmp r0, r4
725 001a FBD1 bne .L51
295:system/core/sdcard/sdcard.c **** node2->next = node->next;
726 .loc 1 295 0
727 001c E16A ldr r1, [r4, #44]
728 001e D962 str r1, [r3, #44]
729 .LVL66:
ARM GAS /tmp/ccMR8LsA.s page 50
730 .L49:
731 .LBE248:
297:system/core/sdcard/sdcard.c **** release_node_locked(node->parent);
732 .loc 1 297 0
733 0020 606B ldr r0, [r4, #52]
734 0022 FFF7FEFF bl release_node_locked(PLT)
735 .LVL67:
298:system/core/sdcard/sdcard.c **** node->parent = NULL;
736 .loc 1 298 0
737 0026 0022 movs r2, #0
738 0028 6263 str r2, [r4, #52]
299:system/core/sdcard/sdcard.c **** node->next = NULL;
739 .loc 1 299 0
740 002a E262 str r2, [r4, #44]
741 .L46:
742 002c 10BD pop {r4, pc}
743 .cfi_endproc
744 .LFE69:
745 .fnend
747 .section .text.get_caller_has_rw_locked,"ax",%progbits
748 .align 1
749 .thumb
750 .thumb_func
752 get_caller_has_rw_locked:
753 .fnstart
754 .LFB75:
507:system/core/sdcard/sdcard.c **** static bool get_caller_has_rw_locked(struct fuse* fuse, const struct fuse_in_header *hdr) {
755 .loc 1 507 0
756 .cfi_startproc
757 @ args = 0, pretend = 0, frame = 0
758 @ frame_needed = 0, uses_anonymous_args = 0
759 .LVL68:
760 0000 10B5 push {r4, lr}
761 .save {r4, lr}
762 .LCFI11:
763 .cfi_def_cfa_offset 8
764 .cfi_offset 4, -8
765 .cfi_offset 14, -4
507:system/core/sdcard/sdcard.c **** static bool get_caller_has_rw_locked(struct fuse* fuse, const struct fuse_in_header *hdr) {
766 .loc 1 507 0
767 0002 0446 mov r4, r0
509:system/core/sdcard/sdcard.c **** if (fuse->derive == DERIVE_NONE) {
768 .loc 1 509 0
769 0004 4369 ldr r3, [r0, #20]
770 0006 53B1 cbz r3, .L57
771 .LVL69:
772 .LBB251:
773 .LBB252:
513:system/core/sdcard/sdcard.c **** appid_t appid = multiuser_get_app_id(hdr->uid);
774 .loc 1 513 0
775 0008 8869 ldr r0, [r1, #24]
776 .LVL70:
514:system/core/sdcard/sdcard.c **** return hashmapContainsKey(fuse->appid_with_rw, (void*) appid);
777 .loc 1 514 0
778 000a 04F58354 add r4, r4, #4192
779 .LVL71:
513:system/core/sdcard/sdcard.c **** appid_t appid = multiuser_get_app_id(hdr->uid);
ARM GAS /tmp/ccMR8LsA.s page 51
780 .loc 1 513 0
781 000e FFF7FEFF bl multiuser_get_app_id(PLT)
782 .LVL72:
783 0012 0146 mov r1, r0
784 .LVL73:
514:system/core/sdcard/sdcard.c **** return hashmapContainsKey(fuse->appid_with_rw, (void*) appid);
785 .loc 1 514 0
786 0014 6069 ldr r0, [r4, #20]
787 .LVL74:
788 .LBE252:
789 .LBE251:
515:system/core/sdcard/sdcard.c **** }
790 .loc 1 515 0
791 0016 BDE81040 pop {r4, lr}
792 .LBB254:
793 .LBB253:
514:system/core/sdcard/sdcard.c **** return hashmapContainsKey(fuse->appid_with_rw, (void*) appid);
794 .loc 1 514 0
795 001a FFF7FEBF b hashmapContainsKey(PLT)
796 .LVL75:
797 .L57:
798 .LBE253:
799 .LBE254:
515:system/core/sdcard/sdcard.c **** }
800 .loc 1 515 0
801 001e 0120 movs r0, #1
802 .LVL76:
803 0020 10BD pop {r4, pc}
804 .cfi_endproc
805 .LFE75:
806 .fnend
808 .section .text.handle_statfs.isra.19,"ax",%progbits
809 .align 1
810 .thumb
811 .thumb_func
813 handle_statfs.isra.19:
814 .fnstart
815 .LFB140:
1258:system/core/sdcard/sdcard.c **** static int handle_statfs(struct fuse* fuse, struct fuse_handler* handler,
816 .loc 1 1258 0
817 .cfi_startproc
818 @ args = 0, pretend = 0, frame = 4272
819 @ frame_needed = 0, uses_anonymous_args = 0
820 .LVL77:
821 0000 314B ldr r3, .L63
822 0002 324A ldr r2, .L63+4
823 0004 2DE9F042 push {r4, r5, r6, r7, r9, lr}
824 .save {r4, r5, r6, r7, r9, lr}
825 .LCFI12:
826 .cfi_def_cfa_offset 24
827 .cfi_offset 4, -24
828 .cfi_offset 5, -20
829 .cfi_offset 6, -16
830 .cfi_offset 7, -12
831 .cfi_offset 9, -8
832 .cfi_offset 14, -4
833 .pad #4256
ARM GAS /tmp/ccMR8LsA.s page 52
834 0008 ADF5855D sub sp, sp, #4256
835 .LCFI13:
836 .cfi_def_cfa_offset 4280
837 .LPIC9:
838 000c 7B44 add r3, pc
839 .pad #24
840 000e 86B0 sub sp, sp, #24
841 .LCFI14:
842 .cfi_def_cfa_offset 4304
1258:system/core/sdcard/sdcard.c **** static int handle_statfs(struct fuse* fuse, struct fuse_handler* handler,
843 .loc 1 1258 0
844 0010 8946 mov r9, r1
845 0012 0DF58551 add r1, sp, #4256
846 .LVL78:
847 0016 9C58 ldr r4, [r3, r2]
848 0018 1431 adds r1, r1, #20
849 001a 0746 mov r7, r0
850 001c 2368 ldr r3, [r4, #0]
851 001e 0B60 str r3, [r1, #0]
852 .LVL79:
1266:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
853 .loc 1 1266 0
854 0020 FFF7FEFF bl pthread_mutex_lock(PLT)
855 .LVL80:
1268:system/core/sdcard/sdcard.c **** res = get_node_path_locked(&fuse->root, path, sizeof(path));
856 .loc 1 1268 0
857 0024 2DA9 add r1, sp, #180
858 0026 4FF48052 mov r2, #4096
859 002a 07F12000 add r0, r7, #32
860 002e FFF7FEFF bl get_node_path_locked(PLT)
861 .LVL81:
862 0032 0546 mov r5, r0
863 .LVL82:
1269:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
864 .loc 1 1269 0
865 0034 3846 mov r0, r7
866 .LVL83:
867 0036 FFF7FEFF bl pthread_mutex_unlock(PLT)
868 .LVL84:
1270:system/core/sdcard/sdcard.c **** if (res < 0) {
869 .loc 1 1270 0
870 003a 002D cmp r5, #0
871 003c 34DB blt .L62
1273:system/core/sdcard/sdcard.c **** if (statfs(fuse->root.name, &stat) < 0) {
872 .loc 1 1273 0
873 003e F86D ldr r0, [r7, #92]
874 0040 16A9 add r1, sp, #88
875 0042 FFF7FEFF bl statfs(PLT)
876 .LVL85:
877 0046 0028 cmp r0, #0
878 0048 04DA bge .L60
1274:system/core/sdcard/sdcard.c **** return -errno;
879 .loc 1 1274 0
880 004a FFF7FEFF bl __errno(PLT)
881 .LVL86:
882 004e 0068 ldr r0, [r0, #0]
883 0050 4042 negs r0, r0
ARM GAS /tmp/ccMR8LsA.s page 53
884 0052 2BE0 b .L59
885 .L60:
886 .LVL87:
887 .LBB255:
888 .LBB256:
1276:system/core/sdcard/sdcard.c **** memset(&out, 0, sizeof(out));
889 .loc 1 1276 0
890 0054 02AE add r6, sp, #8
891 .LVL88:
144:bionic/libc/include/string.h **** return __builtin___memset_chk(s, c, n, __builtin_object_size (s, 0));
892 .loc 2 144 0
893 0056 5025 movs r5, #80
894 .LVL89:
895 0058 0021 movs r1, #0
896 005a 2A46 mov r2, r5
897 005c 3046 mov r0, r6
898 005e FFF7FEFF bl memset(PLT)
899 .LVL90:
900 .LBE256:
901 .LBE255:
1277:system/core/sdcard/sdcard.c **** out.st.blocks = stat.f_blocks;
902 .loc 1 1277 0
903 0062 DDE91801 ldrd r0, [sp, #96]
1278:system/core/sdcard/sdcard.c **** out.st.bfree = stat.f_bfree;
904 .loc 1 1278 0
905 0066 DDE91A23 ldrd r2, [sp, #104]
1277:system/core/sdcard/sdcard.c **** out.st.blocks = stat.f_blocks;
906 .loc 1 1277 0
907 006a CDE90201 strd r0, [sp, #8]
1279:system/core/sdcard/sdcard.c **** out.st.bavail = stat.f_bavail;
908 .loc 1 1279 0
909 006e DDE91C01 ldrd r0, [sp, #112]
1278:system/core/sdcard/sdcard.c **** out.st.bfree = stat.f_bfree;
910 .loc 1 1278 0
911 0072 CDE90423 strd r2, [sp, #16]
1280:system/core/sdcard/sdcard.c **** out.st.files = stat.f_files;
912 .loc 1 1280 0
913 0076 DDE91E23 ldrd r2, [sp, #120]
1279:system/core/sdcard/sdcard.c **** out.st.bavail = stat.f_bavail;
914 .loc 1 1279 0
915 007a C6E90401 strd r0, [r6, #16]
1281:system/core/sdcard/sdcard.c **** out.st.ffree = stat.f_ffree;
916 .loc 1 1281 0
917 007e DDE92001 ldrd r0, [sp, #128]
1280:system/core/sdcard/sdcard.c **** out.st.files = stat.f_files;
918 .loc 1 1280 0
919 0082 C6E90623 strd r2, [r6, #24]
1282:system/core/sdcard/sdcard.c **** out.st.bsize = stat.f_bsize;
920 .loc 1 1282 0
921 0086 179B ldr r3, [sp, #92]
1281:system/core/sdcard/sdcard.c **** out.st.ffree = stat.f_ffree;
922 .loc 1 1281 0
923 0088 C6E90801 strd r0, [r6, #32]
1285:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
924 .loc 1 1285 0
925 008c 3846 mov r0, r7
1284:system/core/sdcard/sdcard.c **** out.st.frsize = stat.f_frsize;
ARM GAS /tmp/ccMR8LsA.s page 54
926 .loc 1 1284 0
927 008e 259A ldr r2, [sp, #148]
1283:system/core/sdcard/sdcard.c **** out.st.namelen = stat.f_namelen;
928 .loc 1 1283 0
929 0090 2499 ldr r1, [sp, #144]
1282:system/core/sdcard/sdcard.c **** out.st.bsize = stat.f_bsize;
930 .loc 1 1282 0
931 0092 B362 str r3, [r6, #40]
1284:system/core/sdcard/sdcard.c **** out.st.frsize = stat.f_frsize;
932 .loc 1 1284 0
933 0094 3263 str r2, [r6, #48]
1283:system/core/sdcard/sdcard.c **** out.st.namelen = stat.f_namelen;
934 .loc 1 1283 0
935 0096 F162 str r1, [r6, #44]
1285:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
936 .loc 1 1285 0
937 0098 D9E90223 ldrd r2, [r9, #8]
938 009c 0096 str r6, [sp, #0]
939 009e 0195 str r5, [sp, #4]
940 00a0 FFF7FEFF bl fuse_reply(PLT)
941 .LVL91:
1286:system/core/sdcard/sdcard.c **** return NO_STATUS;
942 .loc 1 1286 0
943 00a4 0120 movs r0, #1
944 00a6 01E0 b .L59
945 .LVL92:
946 .L62:
1271:system/core/sdcard/sdcard.c **** return -ENOENT;
947 .loc 1 1271 0
948 00a8 6FF00100 mvn r0, #1
949 .LVL93:
950 .L59:
1287:system/core/sdcard/sdcard.c **** }
951 .loc 1 1287 0
952 00ac 0DF58553 add r3, sp, #4256
953 00b0 1433 adds r3, r3, #20
954 00b2 1968 ldr r1, [r3, #0]
955 00b4 2268 ldr r2, [r4, #0]
956 00b6 9142 cmp r1, r2
957 00b8 01D0 beq .L61
958 00ba FFF7FEFF bl __stack_chk_fail(PLT)
959 .LVL94:
960 .L61:
961 00be 2EB0 add sp, sp, #184
962 00c0 0DF5805D add sp, sp, #4096
963 00c4 BDE8F082 pop {r4, r5, r6, r7, r9, pc}
964 .L64:
965 .align 2
966 .L63:
967 00c8 B8000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC9+4)
968 00cc 00000000 .word __stack_chk_guard(GOT)
969 .cfi_endproc
970 .LFE140:
971 .fnend
973 .section .text.handle_readdir.isra.21,"ax",%progbits
974 .align 1
975 .thumb
ARM GAS /tmp/ccMR8LsA.s page 55
976 .thumb_func
978 handle_readdir.isra.21:
979 .fnstart
980 .LFB142:
1360:system/core/sdcard/sdcard.c **** static int handle_readdir(struct fuse* fuse, struct fuse_handler* handler,
981 .loc 1 1360 0
982 .cfi_startproc
983 @ args = 0, pretend = 0, frame = 8208
984 @ frame_needed = 0, uses_anonymous_args = 0
985 .LVL95:
986 0000 3B4B ldr r3, .L78+8
987 0002 2DE9F04F push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
988 .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
989 .LCFI15:
990 .cfi_def_cfa_offset 36
991 .cfi_offset 4, -36
992 .cfi_offset 5, -32
993 .cfi_offset 6, -28
994 .cfi_offset 7, -24
995 .cfi_offset 8, -20
996 .cfi_offset 9, -16
997 .cfi_offset 10, -12
998 .cfi_offset 11, -8
999 .cfi_offset 14, -4
1000 0006 9046 mov r8, r2
1001 0008 3A4A ldr r2, .L78+12
1002 .LVL96:
1003 000a 0F46 mov r7, r1
1004 .LPIC10:
1005 000c 7B44 add r3, pc
1006 .pad #8192
1007 000e ADF5005D sub sp, sp, #8192
1008 .LCFI16:
1009 .cfi_def_cfa_offset 8228
1010 .pad #28
1011 0012 87B0 sub sp, sp, #28
1012 .LCFI17:
1013 .cfi_def_cfa_offset 8256
1360:system/core/sdcard/sdcard.c **** static int handle_readdir(struct fuse* fuse, struct fuse_handler* handler,
1014 .loc 1 1360 0
1015 0014 0546 mov r5, r0
1016 0016 9958 ldr r1, [r3, r2]
1017 .LVL97:
1018 0018 0DF50050 add r0, sp, #8192
1019 .LVL98:
1020 001c 1430 adds r0, r0, #20
1021 .LBB257:
1022 .LBB258:
241:system/core/sdcard/sdcard.c **** return (void *) (uintptr_t) nid;
1023 .loc 1 241 0
1024 001e D8F800A0 ldr sl, [r8, #0]
1025 .LBE258:
1026 .LBE257:
1360:system/core/sdcard/sdcard.c **** static int handle_readdir(struct fuse* fuse, struct fuse_handler* handler,
1027 .loc 1 1360 0
1028 0022 0B68 ldr r3, [r1, #0]
1029 0024 8B46 mov fp, r1
ARM GAS /tmp/ccMR8LsA.s page 56
1030 0026 0360 str r3, [r0, #0]
1031 .LVL99:
1370:system/core/sdcard/sdcard.c **** if (req->offset == 0) {
1032 .loc 1 1370 0
1033 0028 D8E90223 ldrd r2, [r8, #8]
1034 002c 52EA0300 orrs r0, r2, r3
1035 0030 03D1 bne .L70
1373:system/core/sdcard/sdcard.c **** rewinddir(h->d);
1036 .loc 1 1373 0
1037 0032 DAF80000 ldr r0, [sl, #0]
1038 0036 FFF7FEFF bl rewinddir(PLT)
1039 .LVL100:
1040 .L70:
1380:system/core/sdcard/sdcard.c **** fde->ino = FUSE_UNKNOWN_INO;
1041 .loc 1 1380 0
1042 003a 05AC add r4, sp, #20
1043 .LVL101:
1044 .L75:
1376:system/core/sdcard/sdcard.c **** de = readdir(h->d);
1045 .loc 1 1376 0
1046 003c DAF80000 ldr r0, [sl, #0]
1047 0040 FFF7FEFF bl readdir(PLT)
1048 .LVL102:
1377:system/core/sdcard/sdcard.c **** if (!de) {
1049 .loc 1 1377 0
1050 0044 0028 cmp r0, #0
1051 0046 3ED0 beq .L67
1382:system/core/sdcard/sdcard.c **** fde->off = req->offset + 1;
1052 .loc 1 1382 0
1053 0048 DFED270B fldd d16, .L78 @ int
1380:system/core/sdcard/sdcard.c **** fde->ino = FUSE_UNKNOWN_INO;
1054 .loc 1 1380 0
1055 004c 0021 movs r1, #0
1382:system/core/sdcard/sdcard.c **** fde->off = req->offset + 1;
1056 .loc 1 1382 0
1057 004e D8ED021B fldd d17, [r8, #8] @ int
1380:system/core/sdcard/sdcard.c **** fde->ino = FUSE_UNKNOWN_INO;
1058 .loc 1 1380 0
1059 0052 4FF0FF36 mov r6, #-1
1060 0056 2660 str r6, [r4, #0]
1384:system/core/sdcard/sdcard.c **** fde->namelen = strlen(de->d_name);
1061 .loc 1 1384 0
1062 0058 00F11309 add r9, r0, #19
1063 .LVL103:
1380:system/core/sdcard/sdcard.c **** fde->ino = FUSE_UNKNOWN_INO;
1064 .loc 1 1380 0
1065 005c 6160 str r1, [r4, #4]
1382:system/core/sdcard/sdcard.c **** fde->off = req->offset + 1;
1066 .loc 1 1382 0
1067 005e 31EFA008 vadd.i64 d0, d17, d16
1068 0062 53EC102B fmrrd r2, r3, d0 @ int
1069 0066 84ED020A fsts s0, [r4, #8] @ int
1070 006a E360 str r3, [r4, #12]
1383:system/core/sdcard/sdcard.c **** fde->type = de->d_type;
1071 .loc 1 1383 0
1072 006c 837C ldrb r3, [r0, #18] @ zero_extendqisi2
1073 .LBB259:
ARM GAS /tmp/ccMR8LsA.s page 57
1074 .LBB260:
1075 .loc 2 217 0
1076 006e 4846 mov r0, r9
1077 .LVL104:
1078 .LBE260:
1079 .LBE259:
1383:system/core/sdcard/sdcard.c **** fde->type = de->d_type;
1080 .loc 1 1383 0
1081 0070 6361 str r3, [r4, #20]
1082 .LBB263:
1083 .LBB261:
1084 .loc 2 217 0
1085 0072 0391 str r1, [sp, #12]
1086 0074 FFF7FEFF bl strlen(PLT)
1087 .LVL105:
1088 .LBE261:
1089 .LBE263:
1386:system/core/sdcard/sdcard.c **** parent_node = lookup_node_by_id_locked(fuse, hdr->nodeid);
1090 .loc 1 1386 0
1091 0078 D7E90423 ldrd r2, [r7, #16]
1092 .LVL106:
1093 .LBB264:
1094 .LBB262:
1095 .loc 2 217 0
1096 007c 0646 mov r6, r0
1097 .LBE262:
1098 .LBE264:
1384:system/core/sdcard/sdcard.c **** fde->namelen = strlen(de->d_name);
1099 .loc 1 1384 0
1100 007e 2061 str r0, [r4, #16]
1101 0080 0398 ldr r0, [sp, #12]
1102 .LBB265:
1103 .LBB266:
640:system/core/sdcard/sdcard.c **** if (nid == FUSE_ROOT_ID) {
1104 .loc 1 640 0
1105 0082 002B cmp r3, #0
1106 0084 08BF it eq
1107 0086 012A cmpeq r2, #1
1108 .LBE266:
1109 .LBE265:
1388:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, parent_node, de->d_name, R_OK, false)) {
1110 .loc 1 1388 0
1111 0088 4B46 mov r3, r9
1112 .LBB268:
1113 .LBB267:
641:system/core/sdcard/sdcard.c **** return &fuse->root;
1114 .loc 1 641 0
1115 008a 08BF it eq
1116 008c 05F12002 addeq r2, r5, #32
1117 .LVL107:
1118 .LBE267:
1119 .LBE268:
1388:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, parent_node, de->d_name, R_OK, false)) {
1120 .loc 1 1388 0
1121 0090 0421 movs r1, #4
1122 0092 0091 str r1, [sp, #0]
1123 0094 3946 mov r1, r7
ARM GAS /tmp/ccMR8LsA.s page 58
1124 0096 0190 str r0, [sp, #4]
1125 0098 2846 mov r0, r5
1126 009a FFF7FEFF bl check_caller_access_to_name(PLT)
1127 .LVL108:
1128 009e 0028 cmp r0, #0
1129 00a0 CCD0 beq .L75
1130 .LVL109:
1131 .LBB269:
1132 .LBB270:
108:bionic/libc/include/string.h **** return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
1133 .loc 2 108 0
1134 00a2 721C adds r2, r6, #1
1135 .LVL110:
1136 .LBE270:
1137 .LBE269:
1394:system/core/sdcard/sdcard.c **** FUSE_DIRENT_ALIGN(sizeof(struct fuse_dirent) + fde->namelen));
1138 .loc 1 1394 0
1139 00a4 1F36 adds r6, r6, #31
1140 .LBB273:
1141 .LBB271:
108:bionic/libc/include/string.h **** return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
1142 .loc 2 108 0
1143 00a6 4946 mov r1, r9
1144 00a8 41F6E873 movw r3, #8168
1145 00ac 0BA8 add r0, sp, #44
1146 .LVL111:
1147 .LBE271:
1148 .LBE273:
1393:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, fde,
1149 .loc 1 1393 0
1150 00ae 26F00706 bic r6, r6, #7
1151 .LBB274:
1152 .LBB272:
108:bionic/libc/include/string.h **** return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
1153 .loc 2 108 0
1154 00b2 FFF7FEFF bl __memcpy_chk(PLT)
1155 .LVL112:
1156 .LBE272:
1157 .LBE274:
1393:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, fde,
1158 .loc 1 1393 0
1159 00b6 D7E90223 ldrd r2, [r7, #8]
1160 00ba 2846 mov r0, r5
1161 00bc 0094 str r4, [sp, #0]
1162 00be 0196 str r6, [sp, #4]
1163 00c0 FFF7FEFF bl fuse_reply(PLT)
1164 .LVL113:
1395:system/core/sdcard/sdcard.c **** return NO_STATUS;
1165 .loc 1 1395 0
1166 00c4 0120 movs r0, #1
1167 .LVL114:
1168 .L67:
1396:system/core/sdcard/sdcard.c **** }
1169 .loc 1 1396 0
1170 00c6 0DF50052 add r2, sp, #8192
1171 00ca 1432 adds r2, r2, #20
1172 00cc 1168 ldr r1, [r2, #0]
ARM GAS /tmp/ccMR8LsA.s page 59
1173 00ce DBF80030 ldr r3, [fp, #0]
1174 00d2 9942 cmp r1, r3
1175 00d4 01D0 beq .L71
1176 00d6 FFF7FEFF bl __stack_chk_fail(PLT)
1177 .LVL115:
1178 .L71:
1179 00da 07B0 add sp, sp, #28
1180 00dc 0DF5005D add sp, sp, #8192
1181 00e0 BDE8F08F pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
1182 .L79:
1183 00e4 AFF30080 .align 3
1184 .L78:
1185 00e8 01000000 .word 1
1186 00ec 00000000 .word 0
1187 00f0 E0000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC10+4)
1188 00f4 00000000 .word __stack_chk_guard(GOT)
1189 .cfi_endproc
1190 .LFE142:
1191 .fnend
1193 .section .text.touch.constprop.26,"ax",%progbits
1194 .align 1
1195 .thumb
1196 .thumb_func
1198 touch.constprop.26:
1199 .fnstart
1200 .LFB149:
407:system/core/sdcard/sdcard.c **** static int touch(char* path, mode_t mode) {
1201 .loc 1 407 0
1202 .cfi_startproc
1203 @ args = 0, pretend = 0, frame = 0
1204 @ frame_needed = 0, uses_anonymous_args = 0
1205 .LVL116:
1206 0000 70B5 push {r4, r5, r6, lr}
1207 .save {r4, r5, r6, lr}
1208 .LCFI18:
1209 .cfi_def_cfa_offset 16
1210 .cfi_offset 4, -16
1211 .cfi_offset 5, -12
1212 .cfi_offset 6, -8
1213 .cfi_offset 14, -4
1214 .LBB281:
1215 .LBB282:
1216 .file 3 "bionic/libc/include/fcntl.h"
1:bionic/libc/include/fcntl.h **** /*
2:bionic/libc/include/fcntl.h **** * Copyright (C) 2008 The Android Open Source Project
3:bionic/libc/include/fcntl.h **** * All rights reserved.
4:bionic/libc/include/fcntl.h **** *
5:bionic/libc/include/fcntl.h **** * Redistribution and use in source and binary forms, with or without
6:bionic/libc/include/fcntl.h **** * modification, are permitted provided that the following conditions
7:bionic/libc/include/fcntl.h **** * are met:
8:bionic/libc/include/fcntl.h **** * * Redistributions of source code must retain the above copyright
9:bionic/libc/include/fcntl.h **** * notice, this list of conditions and the following disclaimer.
10:bionic/libc/include/fcntl.h **** * * Redistributions in binary form must reproduce the above copyright
11:bionic/libc/include/fcntl.h **** * notice, this list of conditions and the following disclaimer in
12:bionic/libc/include/fcntl.h **** * the documentation and/or other materials provided with the
13:bionic/libc/include/fcntl.h **** * distribution.
14:bionic/libc/include/fcntl.h **** *
ARM GAS /tmp/ccMR8LsA.s page 60
15:bionic/libc/include/fcntl.h **** * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16:bionic/libc/include/fcntl.h **** * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17:bionic/libc/include/fcntl.h **** * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18:bionic/libc/include/fcntl.h **** * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19:bionic/libc/include/fcntl.h **** * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20:bionic/libc/include/fcntl.h **** * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21:bionic/libc/include/fcntl.h **** * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22:bionic/libc/include/fcntl.h **** * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23:bionic/libc/include/fcntl.h **** * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24:bionic/libc/include/fcntl.h **** * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25:bionic/libc/include/fcntl.h **** * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26:bionic/libc/include/fcntl.h **** * SUCH DAMAGE.
27:bionic/libc/include/fcntl.h **** */
28:bionic/libc/include/fcntl.h **** #ifndef _FCNTL_H
29:bionic/libc/include/fcntl.h **** #define _FCNTL_H
30:bionic/libc/include/fcntl.h ****
31:bionic/libc/include/fcntl.h **** #include <sys/cdefs.h>
32:bionic/libc/include/fcntl.h **** #include <sys/types.h>
33:bionic/libc/include/fcntl.h **** #include <linux/fcntl.h>
34:bionic/libc/include/fcntl.h **** #include <unistd.h> /* this is not required, but makes client code much happier */
35:bionic/libc/include/fcntl.h ****
36:bionic/libc/include/fcntl.h **** __BEGIN_DECLS
37:bionic/libc/include/fcntl.h ****
38:bionic/libc/include/fcntl.h **** #ifndef O_ASYNC
39:bionic/libc/include/fcntl.h **** #define O_ASYNC FASYNC
40:bionic/libc/include/fcntl.h **** #endif
41:bionic/libc/include/fcntl.h ****
42:bionic/libc/include/fcntl.h **** #ifndef O_CLOEXEC
43:bionic/libc/include/fcntl.h **** #define O_CLOEXEC 02000000
44:bionic/libc/include/fcntl.h **** #endif
45:bionic/libc/include/fcntl.h ****
46:bionic/libc/include/fcntl.h **** extern int open(const char* path, int mode, ...);
47:bionic/libc/include/fcntl.h **** extern int openat(int fd, const char* path, int mode, ...);
48:bionic/libc/include/fcntl.h **** extern int unlinkat(int dirfd, const char *pathname, int flags);
49:bionic/libc/include/fcntl.h **** extern int fcntl(int fd, int command, ...);
50:bionic/libc/include/fcntl.h **** extern int creat(const char* path, mode_t mode);
51:bionic/libc/include/fcntl.h ****
52:bionic/libc/include/fcntl.h **** #if defined(__BIONIC_FORTIFY) && !defined(__clang__)
53:bionic/libc/include/fcntl.h **** __errordecl(__creat_missing_mode, "called with O_CREAT, but missing mode");
54:bionic/libc/include/fcntl.h **** __errordecl(__creat_too_many_args, "too many arguments");
55:bionic/libc/include/fcntl.h **** extern int __open_real(const char *pathname, int flags, ...)
56:bionic/libc/include/fcntl.h **** __asm__(__USER_LABEL_PREFIX__ "open");
57:bionic/libc/include/fcntl.h **** extern int __open_2(const char *, int);
58:bionic/libc/include/fcntl.h ****
59:bionic/libc/include/fcntl.h **** __BIONIC_FORTIFY_INLINE
60:bionic/libc/include/fcntl.h **** int open(const char *pathname, int flags, ...) {
61:bionic/libc/include/fcntl.h **** if (__builtin_constant_p(flags)) {
62:bionic/libc/include/fcntl.h **** if ((flags & O_CREAT) && __builtin_va_arg_pack_len() == 0) {
63:bionic/libc/include/fcntl.h **** __creat_missing_mode(); // compile time error
64:bionic/libc/include/fcntl.h **** }
65:bionic/libc/include/fcntl.h **** }
66:bionic/libc/include/fcntl.h ****
67:bionic/libc/include/fcntl.h **** if (__builtin_va_arg_pack_len() > 1) {
68:bionic/libc/include/fcntl.h **** __creat_too_many_args(); // compile time error
69:bionic/libc/include/fcntl.h **** }
70:bionic/libc/include/fcntl.h ****
71:bionic/libc/include/fcntl.h **** if ((__builtin_va_arg_pack_len() == 0) && !__builtin_constant_p(flags)) {
ARM GAS /tmp/ccMR8LsA.s page 61
72:bionic/libc/include/fcntl.h **** return __open_2(pathname, flags);
73:bionic/libc/include/fcntl.h **** }
74:bionic/libc/include/fcntl.h ****
75:bionic/libc/include/fcntl.h **** return __open_real(pathname, flags, __builtin_va_arg_pack());
1217 .loc 3 75 0
1218 0002 48F2C201 movw r1, #32962
1219 .LBE282:
1220 .LBE281:
407:system/core/sdcard/sdcard.c **** static int touch(char* path, mode_t mode) {
1221 .loc 1 407 0
1222 0006 104D ldr r5, .L86
1223 .LBB286:
1224 .LBB283:
1225 .loc 3 75 0
1226 0008 4FF4DA72 mov r2, #436
1227 .LBE283:
1228 .LBE286:
407:system/core/sdcard/sdcard.c **** static int touch(char* path, mode_t mode) {
1229 .loc 1 407 0
1230 000c 0646 mov r6, r0
1231 .LBB287:
1232 .LBB284:
1233 .loc 3 75 0
1234 000e FFF7FEFF bl open(PLT)
1235 .LVL117:
1236 .LBE284:
1237 .LBE287:
409:system/core/sdcard/sdcard.c **** if (fd == -1) {
1238 .loc 1 409 0
1239 0012 411C adds r1, r0, #1
407:system/core/sdcard/sdcard.c **** static int touch(char* path, mode_t mode) {
1240 .loc 1 407 0
1241 .LPIC11:
1242 0014 7D44 add r5, pc
1243 .LBB288:
1244 .LBB285:
1245 .loc 3 75 0
1246 0016 0446 mov r4, r0
1247 .LVL118:
1248 .LBE285:
1249 .LBE288:
409:system/core/sdcard/sdcard.c **** if (fd == -1) {
1250 .loc 1 409 0
1251 0018 12D1 bne .L81
1252 .LVL119:
1253 .LBB289:
1254 .LBB290:
410:system/core/sdcard/sdcard.c **** if (errno == EEXIST) {
1255 .loc 1 410 0
1256 001a FFF7FEFF bl __errno(PLT)
1257 .LVL120:
1258 001e 0368 ldr r3, [r0, #0]
1259 0020 112B cmp r3, #17
1260 0022 0FD0 beq .L85
413:system/core/sdcard/sdcard.c **** ERROR("Failed to open(%s): %s\n", path, strerror(errno));
1261 .loc 1 413 0
1262 0024 0068 ldr r0, [r0, #0]
ARM GAS /tmp/ccMR8LsA.s page 62
1263 0026 FFF7FEFF bl strerror(PLT)
1264 .LVL121:
1265 002a 084A ldr r2, .L86+4
1266 002c 0346 mov r3, r0
1267 002e 0849 ldr r1, .L86+8
1268 0030 A858 ldr r0, [r5, r2]
1269 0032 3246 mov r2, r6
1270 .LPIC12:
1271 0034 7944 add r1, pc
1272 0036 A830 adds r0, r0, #168
1273 0038 FFF7FEFF bl fprintf(PLT)
1274 .LVL122:
414:system/core/sdcard/sdcard.c **** return -1;
1275 .loc 1 414 0
1276 003c 2046 mov r0, r4
1277 003e 70BD pop {r4, r5, r6, pc}
1278 .LVL123:
1279 .L81:
1280 .LBE290:
1281 .LBE289:
417:system/core/sdcard/sdcard.c **** close(fd);
1282 .loc 1 417 0
1283 0040 FFF7FEFF bl close(PLT)
1284 .LVL124:
1285 .L85:
418:system/core/sdcard/sdcard.c **** return 0;
1286 .loc 1 418 0
1287 0044 0020 movs r0, #0
419:system/core/sdcard/sdcard.c **** }
1288 .loc 1 419 0
1289 0046 70BD pop {r4, r5, r6, pc}
1290 .L87:
1291 .align 2
1292 .L86:
1293 0048 30000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC11+4)
1294 004c 00000000 .word __sF(GOT)
1295 0050 18000000 .word .LC6-(.LPIC12+4)
1296 .cfi_endproc
1297 .LFE149:
1298 .fnend
1300 .section .text.find_file_within.constprop.27,"ax",%progbits
1301 .align 1
1302 .thumb
1303 .thumb_func
1305 find_file_within.constprop.27:
1306 .fnstart
1307 .LFB148:
347:system/core/sdcard/sdcard.c **** static char* find_file_within(const char* path, const char* name,
1308 .loc 1 347 0
1309 .cfi_startproc
1310 @ args = 0, pretend = 0, frame = 0
1311 @ frame_needed = 0, uses_anonymous_args = 0
1312 .LVL125:
1313 0000 2DE9F84F push {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
1314 .save {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
1315 .LCFI19:
1316 .cfi_def_cfa_offset 40
ARM GAS /tmp/ccMR8LsA.s page 63
1317 .cfi_offset 3, -40
1318 .cfi_offset 4, -36
1319 .cfi_offset 5, -32
1320 .cfi_offset 6, -28
1321 .cfi_offset 7, -24
1322 .cfi_offset 8, -20
1323 .cfi_offset 9, -16
1324 .cfi_offset 10, -12
1325 .cfi_offset 11, -8
1326 .cfi_offset 14, -4
347:system/core/sdcard/sdcard.c **** static char* find_file_within(const char* path, const char* name,
1327 .loc 1 347 0
1328 0004 0E46 mov r6, r1
1329 0006 9B46 mov fp, r3
1330 0008 1546 mov r5, r2
1331 000a 8046 mov r8, r0
1332 .LBB291:
1333 .LBB292:
1334 .loc 2 217 0
1335 000c FFF7FEFF bl strlen(PLT)
1336 .LVL126:
1337 0010 8146 mov r9, r0
1338 .LBE292:
1339 .LBE291:
1340 .LBB293:
1341 .LBB294:
1342 0012 3046 mov r0, r6
1343 .LBE294:
1344 .LBE293:
352:system/core/sdcard/sdcard.c **** size_t childlen = pathlen + namelen + 1;
1345 .loc 1 352 0
1346 0014 09F10104 add r4, r9, #1
347:system/core/sdcard/sdcard.c **** static char* find_file_within(const char* path, const char* name,
1347 .loc 1 347 0
1348 0018 DFF89CA0 ldr sl, .L102
1349 .LBB297:
1350 .LBB295:
1351 .loc 2 217 0
1352 001c FFF7FEFF bl strlen(PLT)
1353 .LVL127:
1354 .LBE295:
1355 .LBE297:
352:system/core/sdcard/sdcard.c **** size_t childlen = pathlen + namelen + 1;
1356 .loc 1 352 0
1357 0020 2318 adds r3, r4, r0
1358 .LBB298:
1359 .LBB296:
1360 .loc 2 217 0
1361 0022 0746 mov r7, r0
1362 .LBE296:
1363 .LBE298:
355:system/core/sdcard/sdcard.c **** if (bufsize <= childlen) {
1364 .loc 1 355 0
1365 0024 B3F5805F cmp r3, #4096
347:system/core/sdcard/sdcard.c **** static char* find_file_within(const char* path, const char* name,
1366 .loc 1 347 0
1367 .LPIC13:
ARM GAS /tmp/ccMR8LsA.s page 64
1368 0028 FA44 add sl, pc
1369 .LVL128:
355:system/core/sdcard/sdcard.c **** if (bufsize <= childlen) {
1370 .loc 1 355 0
1371 002a 40D2 bcs .L93
1372 .LVL129:
1373 .LBB299:
1374 .LBB300:
108:bionic/libc/include/string.h **** return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
1375 .loc 2 108 0
1376 002c 4146 mov r1, r8
1377 002e 4A46 mov r2, r9
1378 0030 2846 mov r0, r5
1379 .LBE300:
1380 .LBE299:
361:system/core/sdcard/sdcard.c **** actual = buf + pathlen + 1;
1381 .loc 1 361 0
1382 0032 2C19 adds r4, r5, r4
1383 .LBB302:
1384 .LBB301:
108:bionic/libc/include/string.h **** return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
1385 .loc 2 108 0
1386 0034 FFF7FEFF bl memcpy(PLT)
1387 .LVL130:
1388 .LBE301:
1389 .LBE302:
360:system/core/sdcard/sdcard.c **** buf[pathlen] = '/';
1390 .loc 1 360 0
1391 0038 2F20 movs r0, #47
1392 .LBB303:
1393 .LBB304:
108:bionic/libc/include/string.h **** return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
1394 .loc 2 108 0
1395 003a 3146 mov r1, r6
1396 .LBE304:
1397 .LBE303:
360:system/core/sdcard/sdcard.c **** buf[pathlen] = '/';
1398 .loc 1 360 0
1399 003c 05F80900 strb r0, [r5, r9]
1400 .LBB306:
1401 .LBB305:
108:bionic/libc/include/string.h **** return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
1402 .loc 2 108 0
1403 0040 7A1C adds r2, r7, #1
1404 .LVL131:
1405 0042 2046 mov r0, r4
1406 0044 FFF7FEFF bl memcpy(PLT)
1407 .LVL132:
1408 .LBE305:
1409 .LBE306:
364:system/core/sdcard/sdcard.c **** if (search && access(buf, F_OK)) {
1410 .loc 1 364 0
1411 0048 BBF1000F cmp fp, #0
1412 004c 30D0 beq .L89
1413 004e 2846 mov r0, r5
1414 0050 0021 movs r1, #0
1415 0052 FFF7FEFF bl access(PLT)
ARM GAS /tmp/ccMR8LsA.s page 65
1416 .LVL133:
1417 0056 58B3 cbz r0, .L89
1418 .LBB307:
366:system/core/sdcard/sdcard.c **** DIR* dir = opendir(path);
1419 .loc 1 366 0
1420 0058 4046 mov r0, r8
1421 005a FFF7FEFF bl opendir(PLT)
1422 .LVL134:
367:system/core/sdcard/sdcard.c **** if (!dir) {
1423 .loc 1 367 0
1424 005e 0546 mov r5, r0
1425 .LVL135:
1426 0060 E0B9 cbnz r0, .L98
368:system/core/sdcard/sdcard.c **** ERROR("opendir %s failed: %s\n", path, strerror(errno));
1427 .loc 1 368 0
1428 0062 FFF7FEFF bl __errno(PLT)
1429 .LVL136:
1430 0066 0068 ldr r0, [r0, #0]
1431 0068 FFF7FEFF bl strerror(PLT)
1432 .LVL137:
1433 006c 134A ldr r2, .L102+4
1434 006e 0346 mov r3, r0
1435 0070 1349 ldr r1, .L102+8
1436 0072 5AF80200 ldr r0, [sl, r2]
1437 0076 4246 mov r2, r8
1438 .LPIC14:
1439 0078 7944 add r1, pc
1440 007a A830 adds r0, r0, #168
1441 007c FFF7FEFF bl fprintf(PLT)
1442 .LVL138:
1443 0080 16E0 b .L89
1444 .LVL139:
1445 .L92:
372:system/core/sdcard/sdcard.c **** if (!strcasecmp(entry->d_name, name)) {
1446 .loc 1 372 0
1447 0082 00F11308 add r8, r0, #19
1448 0086 3146 mov r1, r6
1449 0088 4046 mov r0, r8
1450 .LVL140:
1451 008a FFF7FEFF bl strcasecmp(PLT)
1452 .LVL141:
1453 008e 28B9 cbnz r0, .L98
1454 .LVL142:
1455 .LBB308:
1456 .LBB309:
108:bionic/libc/include/string.h **** return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
1457 .loc 2 108 0
1458 0090 2046 mov r0, r4
1459 0092 4146 mov r1, r8
1460 0094 3A46 mov r2, r7
1461 0096 FFF7FEFF bl memcpy(PLT)
1462 .LVL143:
1463 009a 04E0 b .L91
1464 .LVL144:
1465 .L98:
1466 .LBE309:
1467 .LBE308:
ARM GAS /tmp/ccMR8LsA.s page 66
371:system/core/sdcard/sdcard.c **** while ((entry = readdir(dir))) {
1468 .loc 1 371 0
1469 009c 2846 mov r0, r5
1470 009e FFF7FEFF bl readdir(PLT)
1471 .LVL145:
1472 00a2 0028 cmp r0, #0
1473 00a4 EDD1 bne .L92
1474 .LVL146:
1475 .L91:
378:system/core/sdcard/sdcard.c **** closedir(dir);
1476 .loc 1 378 0
1477 00a6 2846 mov r0, r5
1478 00a8 FFF7FEFF bl closedir(PLT)
1479 .LVL147:
1480 00ac 00E0 b .L89
1481 .LVL148:
1482 .L93:
1483 .LBE307:
356:system/core/sdcard/sdcard.c **** return NULL;
1484 .loc 1 356 0
1485 00ae 0024 movs r4, #0
1486 .LVL149:
1487 .L89:
381:system/core/sdcard/sdcard.c **** }
1488 .loc 1 381 0
1489 00b0 2046 mov r0, r4
1490 00b2 BDE8F88F pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
1491 .L103:
1492 00b6 00BF .align 2
1493 .L102:
1494 00b8 8C000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC13+4)
1495 00bc 00000000 .word __sF(GOT)
1496 00c0 44000000 .word .LC7-(.LPIC14+4)
1497 .cfi_endproc
1498 .LFE148:
1499 .fnend
1501 .section .text.lookup_node_and_path_by_id_locked.constprop.28,"ax",%progbits
1502 .align 1
1503 .thumb
1504 .thumb_func
1506 lookup_node_and_path_by_id_locked.constprop.28:
1507 .fnstart
1508 .LFB147:
647:system/core/sdcard/sdcard.c **** static struct node* lookup_node_and_path_by_id_locked(struct fuse* fuse, __u64 nid,
1509 .loc 1 647 0
1510 .cfi_startproc
1511 @ args = 4, pretend = 0, frame = 0
1512 @ frame_needed = 0, uses_anonymous_args = 0
1513 .LVL150:
1514 .LBB310:
1515 .LBB311:
640:system/core/sdcard/sdcard.c **** if (nid == FUSE_ROOT_ID) {
1516 .loc 1 640 0
1517 0000 002B cmp r3, #0
1518 0002 08BF it eq
1519 0004 012A cmpeq r2, #1
1520 .LBE311:
ARM GAS /tmp/ccMR8LsA.s page 67
1521 .LBE310:
647:system/core/sdcard/sdcard.c **** static struct node* lookup_node_and_path_by_id_locked(struct fuse* fuse, __u64 nid,
1522 .loc 1 647 0
1523 0006 10B5 push {r4, lr}
1524 .save {r4, lr}
1525 .LCFI20:
1526 .cfi_def_cfa_offset 8
1527 .cfi_offset 4, -8
1528 .cfi_offset 14, -4
1529 .LBB315:
1530 .LBB314:
641:system/core/sdcard/sdcard.c **** return &fuse->root;
1531 .loc 1 641 0
1532 0008 0CBF ite eq
1533 000a 00F12004 addeq r4, r0, #32
1534 .LBB312:
1535 .LBB313:
241:system/core/sdcard/sdcard.c **** return (void *) (uintptr_t) nid;
1536 .loc 1 241 0
1537 000e 1446 movne r4, r2
1538 .LBE313:
1539 .LBE312:
1540 .LBE314:
1541 .LBE315:
651:system/core/sdcard/sdcard.c **** if (node && get_node_path_locked(node, buf, bufsize) < 0) {
1542 .loc 1 651 0
1543 0010 3CB1 cbz r4, .L107
1544 0012 2046 mov r0, r4
1545 .LVL151:
1546 0014 0299 ldr r1, [sp, #8]
1547 0016 4FF48052 mov r2, #4096
1548 .LVL152:
1549 001a FFF7FEFF bl get_node_path_locked(PLT)
1550 .LVL153:
652:system/core/sdcard/sdcard.c **** node = NULL;
1551 .loc 1 652 0
1552 001e 24EAE074 bic r4, r4, r0, asr #31
1553 .L107:
1554 .LVL154:
655:system/core/sdcard/sdcard.c **** }
1555 .loc 1 655 0
1556 0022 2046 mov r0, r4
1557 0024 10BD pop {r4, pc}
1558 .cfi_endproc
1559 .LFE147:
1560 .fnend
1562 .section .text.handle_rmdir.isra.16,"ax",%progbits
1563 .align 1
1564 .thumb
1565 .thumb_func
1567 handle_rmdir.isra.16:
1568 .fnstart
1569 .LFB137:
1051:system/core/sdcard/sdcard.c **** static int handle_rmdir(struct fuse* fuse, struct fuse_handler* handler,
1570 .loc 1 1051 0
1571 .cfi_startproc
1572 @ args = 0, pretend = 0, frame = 8200
ARM GAS /tmp/ccMR8LsA.s page 68
1573 @ frame_needed = 0, uses_anonymous_args = 0
1574 .LVL155:
1575 0000 2E4B ldr r3, .L122
1576 0002 2DE9F047 push {r4, r5, r6, r7, r8, r9, sl, lr}
1577 .save {r4, r5, r6, r7, r8, r9, sl, lr}
1578 .LCFI21:
1579 .cfi_def_cfa_offset 32
1580 .cfi_offset 4, -32
1581 .cfi_offset 5, -28
1582 .cfi_offset 6, -24
1583 .cfi_offset 7, -20
1584 .cfi_offset 8, -16
1585 .cfi_offset 9, -12
1586 .cfi_offset 10, -8
1587 .cfi_offset 14, -4
1588 0006 1646 mov r6, r2
1589 0008 2D4A ldr r2, .L122+4
1590 .LVL156:
1591 .pad #8192
1592 000a ADF5005D sub sp, sp, #8192
1593 .LCFI22:
1594 .cfi_def_cfa_offset 8224
1595 .LPIC15:
1596 000e 7B44 add r3, pc
1597 .pad #16
1598 0010 84B0 sub sp, sp, #16
1599 .LCFI23:
1600 .cfi_def_cfa_offset 8240
1051:system/core/sdcard/sdcard.c **** static int handle_rmdir(struct fuse* fuse, struct fuse_handler* handler,
1601 .loc 1 1051 0
1602 0012 0D46 mov r5, r1
1603 0014 0DF50051 add r1, sp, #8192
1604 .LVL157:
1605 0018 53F80280 ldr r8, [r3, r2]
1606 001c 0446 mov r4, r0
1607 001e 0C31 adds r1, r1, #12
1062:system/core/sdcard/sdcard.c **** parent_path, sizeof(parent_path));
1608 .loc 1 1062 0
1609 0020 0DF10C0A add sl, sp, #12
1051:system/core/sdcard/sdcard.c **** static int handle_rmdir(struct fuse* fuse, struct fuse_handler* handler,
1610 .loc 1 1051 0
1611 0024 D8F80030 ldr r3, [r8, #0]
1612 0028 0B60 str r3, [r1, #0]
1613 .LVL158:
1059:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
1614 .loc 1 1059 0
1615 002a FFF7FEFF bl pthread_mutex_lock(PLT)
1616 .LVL159:
1060:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
1617 .loc 1 1060 0
1618 002e 2946 mov r1, r5
1619 0030 2046 mov r0, r4
1620 0032 FFF7FEFF bl get_caller_has_rw_locked(PLT)
1621 .LVL160:
1061:system/core/sdcard/sdcard.c **** parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
1622 .loc 1 1061 0
1623 0036 D5E90423 ldrd r2, [r5, #16]
ARM GAS /tmp/ccMR8LsA.s page 69
1060:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
1624 .loc 1 1060 0
1625 003a 8146 mov r9, r0
1626 .LVL161:
1061:system/core/sdcard/sdcard.c **** parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
1627 .loc 1 1061 0
1628 003c CDF800A0 str sl, [sp, #0]
1629 0040 2046 mov r0, r4
1630 .LVL162:
1631 0042 FFF7FEFF bl lookup_node_and_path_by_id_locked.constprop.28(PLT)
1632 .LVL163:
1633 0046 0746 mov r7, r0
1634 .LVL164:
1065:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
1635 .loc 1 1065 0
1636 0048 2046 mov r0, r4
1637 .LVL165:
1638 004a FFF7FEFF bl pthread_mutex_unlock(PLT)
1639 .LVL166:
1067:system/core/sdcard/sdcard.c **** if (!parent_node || !find_file_within(parent_path, name,
1640 .loc 1 1067 0
1641 004e 17B9 cbnz r7, .L113
1642 .L115:
1069:system/core/sdcard/sdcard.c **** return -ENOENT;
1643 .loc 1 1069 0
1644 0050 6FF00100 mvn r0, #1
1645 0054 23E0 b .L114
1646 .L113:
1067:system/core/sdcard/sdcard.c **** if (!parent_node || !find_file_within(parent_path, name,
1647 .loc 1 1067 0
1648 0056 0DF58052 add r2, sp, #4096
1649 005a 5046 mov r0, sl
1650 005c 3146 mov r1, r6
1651 005e 0C32 adds r2, r2, #12
1652 0060 0123 movs r3, #1
1653 0062 FFF7FEFF bl find_file_within.constprop.27(PLT)
1654 .LVL167:
1655 0066 0028 cmp r0, #0
1656 0068 F2D0 beq .L115
1071:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK, has_rw)) {
1657 .loc 1 1071 0
1658 006a 0223 movs r3, #2
1659 006c 2046 mov r0, r4
1660 006e 8DE80802 stmia sp, {r3, r9}
1661 0072 2946 mov r1, r5
1662 0074 3A46 mov r2, r7
1663 0076 3346 mov r3, r6
1664 0078 FFF7FEFF bl check_caller_access_to_name(PLT)
1665 .LVL168:
1666 007c 58B1 cbz r0, .L117
1074:system/core/sdcard/sdcard.c **** if (rmdir(child_path) < 0) {
1667 .loc 1 1074 0
1668 007e 0DF58050 add r0, sp, #4096
1669 0082 0C30 adds r0, r0, #12
1670 0084 FFF7FEFF bl rmdir(PLT)
1671 .LVL169:
1672 0088 0028 cmp r0, #0
ARM GAS /tmp/ccMR8LsA.s page 70
1673 008a 07DA bge .L118
1075:system/core/sdcard/sdcard.c **** return -errno;
1674 .loc 1 1075 0
1675 008c FFF7FEFF bl __errno(PLT)
1676 .LVL170:
1677 0090 0068 ldr r0, [r0, #0]
1678 0092 4042 negs r0, r0
1679 0094 03E0 b .L114
1680 .L117:
1072:system/core/sdcard/sdcard.c **** return -EACCES;
1681 .loc 1 1072 0
1682 0096 6FF00C00 mvn r0, #12
1683 009a 00E0 b .L114
1684 .L118:
1077:system/core/sdcard/sdcard.c **** return 0;
1685 .loc 1 1077 0
1686 009c 0020 movs r0, #0
1687 .L114:
1078:system/core/sdcard/sdcard.c **** }
1688 .loc 1 1078 0
1689 009e 0DF50052 add r2, sp, #8192
1690 00a2 0C32 adds r2, r2, #12
1691 00a4 1168 ldr r1, [r2, #0]
1692 00a6 D8F80030 ldr r3, [r8, #0]
1693 00aa 9942 cmp r1, r3
1694 00ac 01D0 beq .L116
1695 00ae FFF7FEFF bl __stack_chk_fail(PLT)
1696 .LVL171:
1697 .L116:
1698 00b2 04B0 add sp, sp, #16
1699 00b4 0DF5005D add sp, sp, #8192
1700 00b8 BDE8F087 pop {r4, r5, r6, r7, r8, r9, sl, pc}
1701 .L123:
1702 .align 2
1703 .L122:
1704 00bc AA000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC15+4)
1705 00c0 00000000 .word __stack_chk_guard(GOT)
1706 .cfi_endproc
1707 .LFE137:
1708 .fnend
1710 .section .text.handle_unlink.isra.15,"ax",%progbits
1711 .align 1
1712 .thumb
1713 .thumb_func
1715 handle_unlink.isra.15:
1716 .fnstart
1717 .LFB136:
1022:system/core/sdcard/sdcard.c **** static int handle_unlink(struct fuse* fuse, struct fuse_handler* handler,
1718 .loc 1 1022 0
1719 .cfi_startproc
1720 @ args = 0, pretend = 0, frame = 8200
1721 @ frame_needed = 0, uses_anonymous_args = 0
1722 .LVL172:
1723 0000 2E4B ldr r3, .L134
1724 0002 2DE9F047 push {r4, r5, r6, r7, r8, r9, sl, lr}
1725 .save {r4, r5, r6, r7, r8, r9, sl, lr}
1726 .LCFI24:
ARM GAS /tmp/ccMR8LsA.s page 71
1727 .cfi_def_cfa_offset 32
1728 .cfi_offset 4, -32
1729 .cfi_offset 5, -28
1730 .cfi_offset 6, -24
1731 .cfi_offset 7, -20
1732 .cfi_offset 8, -16
1733 .cfi_offset 9, -12
1734 .cfi_offset 10, -8
1735 .cfi_offset 14, -4
1736 0006 1646 mov r6, r2
1737 0008 2D4A ldr r2, .L134+4
1738 .LVL173:
1739 .pad #8192
1740 000a ADF5005D sub sp, sp, #8192
1741 .LCFI25:
1742 .cfi_def_cfa_offset 8224
1743 .LPIC16:
1744 000e 7B44 add r3, pc
1745 .pad #16
1746 0010 84B0 sub sp, sp, #16
1747 .LCFI26:
1748 .cfi_def_cfa_offset 8240
1022:system/core/sdcard/sdcard.c **** static int handle_unlink(struct fuse* fuse, struct fuse_handler* handler,
1749 .loc 1 1022 0
1750 0012 0D46 mov r5, r1
1751 0014 0DF50051 add r1, sp, #8192
1752 .LVL174:
1753 0018 53F80280 ldr r8, [r3, r2]
1754 001c 0446 mov r4, r0
1755 001e 0C31 adds r1, r1, #12
1033:system/core/sdcard/sdcard.c **** parent_path, sizeof(parent_path));
1756 .loc 1 1033 0
1757 0020 0DF10C0A add sl, sp, #12
1022:system/core/sdcard/sdcard.c **** static int handle_unlink(struct fuse* fuse, struct fuse_handler* handler,
1758 .loc 1 1022 0
1759 0024 D8F80030 ldr r3, [r8, #0]
1760 0028 0B60 str r3, [r1, #0]
1761 .LVL175:
1030:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
1762 .loc 1 1030 0
1763 002a FFF7FEFF bl pthread_mutex_lock(PLT)
1764 .LVL176:
1031:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
1765 .loc 1 1031 0
1766 002e 2946 mov r1, r5
1767 0030 2046 mov r0, r4
1768 0032 FFF7FEFF bl get_caller_has_rw_locked(PLT)
1769 .LVL177:
1032:system/core/sdcard/sdcard.c **** parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
1770 .loc 1 1032 0
1771 0036 D5E90423 ldrd r2, [r5, #16]
1031:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
1772 .loc 1 1031 0
1773 003a 8146 mov r9, r0
1774 .LVL178:
1032:system/core/sdcard/sdcard.c **** parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
1775 .loc 1 1032 0
ARM GAS /tmp/ccMR8LsA.s page 72
1776 003c CDF800A0 str sl, [sp, #0]
1777 0040 2046 mov r0, r4
1778 .LVL179:
1779 0042 FFF7FEFF bl lookup_node_and_path_by_id_locked.constprop.28(PLT)
1780 .LVL180:
1781 0046 0746 mov r7, r0
1782 .LVL181:
1036:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
1783 .loc 1 1036 0
1784 0048 2046 mov r0, r4
1785 .LVL182:
1786 004a FFF7FEFF bl pthread_mutex_unlock(PLT)
1787 .LVL183:
1038:system/core/sdcard/sdcard.c **** if (!parent_node || !find_file_within(parent_path, name,
1788 .loc 1 1038 0
1789 004e 17B9 cbnz r7, .L125
1790 .L127:
1040:system/core/sdcard/sdcard.c **** return -ENOENT;
1791 .loc 1 1040 0
1792 0050 6FF00100 mvn r0, #1
1793 0054 23E0 b .L126
1794 .L125:
1038:system/core/sdcard/sdcard.c **** if (!parent_node || !find_file_within(parent_path, name,
1795 .loc 1 1038 0
1796 0056 0DF58052 add r2, sp, #4096
1797 005a 5046 mov r0, sl
1798 005c 3146 mov r1, r6
1799 005e 0C32 adds r2, r2, #12
1800 0060 0123 movs r3, #1
1801 0062 FFF7FEFF bl find_file_within.constprop.27(PLT)
1802 .LVL184:
1803 0066 0028 cmp r0, #0
1804 0068 F2D0 beq .L127
1042:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK, has_rw)) {
1805 .loc 1 1042 0
1806 006a 0223 movs r3, #2
1807 006c 2046 mov r0, r4
1808 006e 8DE80802 stmia sp, {r3, r9}
1809 0072 2946 mov r1, r5
1810 0074 3A46 mov r2, r7
1811 0076 3346 mov r3, r6
1812 0078 FFF7FEFF bl check_caller_access_to_name(PLT)
1813 .LVL185:
1814 007c 58B1 cbz r0, .L129
1045:system/core/sdcard/sdcard.c **** if (unlink(child_path) < 0) {
1815 .loc 1 1045 0
1816 007e 0DF58050 add r0, sp, #4096
1817 0082 0C30 adds r0, r0, #12
1818 0084 FFF7FEFF bl unlink(PLT)
1819 .LVL186:
1820 0088 0028 cmp r0, #0
1821 008a 07DA bge .L130
1046:system/core/sdcard/sdcard.c **** return -errno;
1822 .loc 1 1046 0
1823 008c FFF7FEFF bl __errno(PLT)
1824 .LVL187:
1825 0090 0068 ldr r0, [r0, #0]
ARM GAS /tmp/ccMR8LsA.s page 73
1826 0092 4042 negs r0, r0
1827 0094 03E0 b .L126
1828 .L129:
1043:system/core/sdcard/sdcard.c **** return -EACCES;
1829 .loc 1 1043 0
1830 0096 6FF00C00 mvn r0, #12
1831 009a 00E0 b .L126
1832 .L130:
1048:system/core/sdcard/sdcard.c **** return 0;
1833 .loc 1 1048 0
1834 009c 0020 movs r0, #0
1835 .L126:
1049:system/core/sdcard/sdcard.c **** }
1836 .loc 1 1049 0
1837 009e 0DF50052 add r2, sp, #8192
1838 00a2 0C32 adds r2, r2, #12
1839 00a4 1168 ldr r1, [r2, #0]
1840 00a6 D8F80030 ldr r3, [r8, #0]
1841 00aa 9942 cmp r1, r3
1842 00ac 01D0 beq .L128
1843 00ae FFF7FEFF bl __stack_chk_fail(PLT)
1844 .LVL188:
1845 .L128:
1846 00b2 04B0 add sp, sp, #16
1847 00b4 0DF5005D add sp, sp, #8192
1848 00b8 BDE8F087 pop {r4, r5, r6, r7, r8, r9, sl, pc}
1849 .L135:
1850 .align 2
1851 .L134:
1852 00bc AA000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC16+4)
1853 00c0 00000000 .word __stack_chk_guard(GOT)
1854 .cfi_endproc
1855 .LFE136:
1856 .fnend
1858 .section .text.handle_open.isra.14,"ax",%progbits
1859 .align 1
1860 .thumb
1861 .thumb_func
1863 handle_open.isra.14:
1864 .fnstart
1865 .LFB135:
1173:system/core/sdcard/sdcard.c **** static int handle_open(struct fuse* fuse, struct fuse_handler* handler,
1866 .loc 1 1173 0
1867 .cfi_startproc
1868 @ args = 0, pretend = 0, frame = 4120
1869 @ frame_needed = 0, uses_anonymous_args = 0
1870 .LVL189:
1871 0000 3C4B ldr r3, .L146
1872 0002 2DE9F04F push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
1873 .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
1874 .LCFI27:
1875 .cfi_def_cfa_offset 36
1876 .cfi_offset 4, -36
1877 .cfi_offset 5, -32
1878 .cfi_offset 6, -28
1879 .cfi_offset 7, -24
1880 .cfi_offset 8, -20
ARM GAS /tmp/ccMR8LsA.s page 74
1881 .cfi_offset 9, -16
1882 .cfi_offset 10, -12
1883 .cfi_offset 11, -8
1884 .cfi_offset 14, -4
1885 0006 1646 mov r6, r2
1886 0008 3B4A ldr r2, .L146+4
1887 .LVL190:
1888 .pad #4128
1889 000a ADF5815D sub sp, sp, #4128
1890 .LCFI28:
1891 .cfi_def_cfa_offset 4164
1892 .LPIC17:
1893 000e 7B44 add r3, pc
1894 .pad #4
1895 0010 81B0 sub sp, sp, #4
1896 .LCFI29:
1897 .cfi_def_cfa_offset 4168
1173:system/core/sdcard/sdcard.c **** static int handle_open(struct fuse* fuse, struct fuse_handler* handler,
1898 .loc 1 1173 0
1899 0012 0D46 mov r5, r1
1900 0014 0DF58051 add r1, sp, #4096
1901 .LVL191:
1902 0018 9F58 ldr r7, [r3, r2]
1903 001a 0446 mov r4, r0
1904 001c 1C31 adds r1, r1, #28
1184:system/core/sdcard/sdcard.c **** node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path));
1905 .loc 1 1184 0
1906 001e 0DF11C09 add r9, sp, #28
1173:system/core/sdcard/sdcard.c **** static int handle_open(struct fuse* fuse, struct fuse_handler* handler,
1907 .loc 1 1173 0
1908 0022 3B68 ldr r3, [r7, #0]
1909 0024 B846 mov r8, r7
1910 0026 0B60 str r3, [r1, #0]
1911 .LVL192:
1182:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
1912 .loc 1 1182 0
1913 0028 FFF7FEFF bl pthread_mutex_lock(PLT)
1914 .LVL193:
1183:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
1915 .loc 1 1183 0
1916 002c 2946 mov r1, r5
1917 002e 2046 mov r0, r4
1918 0030 FFF7FEFF bl get_caller_has_rw_locked(PLT)
1919 .LVL194:
1184:system/core/sdcard/sdcard.c **** node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path));
1920 .loc 1 1184 0
1921 0034 D5E90423 ldrd r2, [r5, #16]
1183:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
1922 .loc 1 1183 0
1923 0038 8246 mov sl, r0
1924 .LVL195:
1184:system/core/sdcard/sdcard.c **** node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path));
1925 .loc 1 1184 0
1926 003a CDF80090 str r9, [sp, #0]
1927 003e 2046 mov r0, r4
1928 .LVL196:
1929 0040 FFF7FEFF bl lookup_node_and_path_by_id_locked.constprop.28(PLT)
ARM GAS /tmp/ccMR8LsA.s page 75
1930 .LVL197:
1931 0044 8346 mov fp, r0
1932 .LVL198:
1187:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
1933 .loc 1 1187 0
1934 0046 2046 mov r0, r4
1935 .LVL199:
1936 0048 FFF7FEFF bl pthread_mutex_unlock(PLT)
1937 .LVL200:
1189:system/core/sdcard/sdcard.c **** if (!node) {
1938 .loc 1 1189 0
1939 004c BBF1000F cmp fp, #0
1940 0050 38D0 beq .L141
1193:system/core/sdcard/sdcard.c **** open_flags_to_access_mode(req->flags), has_rw)) {
1941 .loc 1 1193 0
1942 0052 3768 ldr r7, [r6, #0]
1943 .LVL201:
1944 .LBB324:
1945 .LBB325:
1163:system/core/sdcard/sdcard.c **** if ((open_flags & O_ACCMODE) == O_RDONLY) {
1946 .loc 1 1163 0
1947 0054 17F00300 ands r0, r7, #3
1948 0058 04D0 beq .L142
1166:system/core/sdcard/sdcard.c **** return W_OK;
1949 .loc 1 1166 0
1950 005a 0128 cmp r0, #1
1951 005c 14BF ite ne
1952 005e 0623 movne r3, #6
1953 0060 0223 moveq r3, #2
1954 0062 00E0 b .L138
1955 .L142:
1164:system/core/sdcard/sdcard.c **** return R_OK;
1956 .loc 1 1164 0
1957 0064 0423 movs r3, #4
1958 .L138:
1959 .LVL202:
1960 .LBE325:
1961 .LBE324:
1962 .LBB326:
1963 .LBB327:
559:system/core/sdcard/sdcard.c **** return check_caller_access_to_name(fuse, hdr, node->parent, node->name, mode, has_rw);
1964 .loc 1 559 0
1965 0066 8DE80804 stmia sp, {r3, sl}
1966 006a 2046 mov r0, r4
1967 006c 2946 mov r1, r5
1968 006e DBF83420 ldr r2, [fp, #52]
1969 0072 DBF83C30 ldr r3, [fp, #60]
1970 .LVL203:
1971 0076 FFF7FEFF bl check_caller_access_to_name(PLT)
1972 .LVL204:
1973 .LBE327:
1974 .LBE326:
1192:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_node(fuse, hdr, node,
1975 .loc 1 1192 0
1976 007a 30B3 cbz r0, .L144
1196:system/core/sdcard/sdcard.c **** h = malloc(sizeof(*h));
1977 .loc 1 1196 0
ARM GAS /tmp/ccMR8LsA.s page 76
1978 007c 0420 movs r0, #4
1979 007e FFF7FEFF bl malloc(PLT)
1980 .LVL205:
1197:system/core/sdcard/sdcard.c **** if (!h) {
1981 .loc 1 1197 0
1982 0082 0646 mov r6, r0
1983 .LVL206:
1984 0084 20B3 cbz r0, .L145
1985 .LVL207:
1986 .LBB328:
1987 .LBB329:
72:bionic/libc/include/fcntl.h **** return __open_2(pathname, flags);
1988 .loc 3 72 0
1989 0086 4846 mov r0, r9
1990 .LVL208:
1991 0088 3946 mov r1, r7
1992 008a FFF7FEFF bl __open_2(PLT)
1993 .LVL209:
1994 .LBE329:
1995 .LBE328:
1202:system/core/sdcard/sdcard.c **** if (h->fd < 0) {
1996 .loc 1 1202 0
1997 008e 0028 cmp r0, #0
1201:system/core/sdcard/sdcard.c **** h->fd = open(path, req->flags);
1998 .loc 1 1201 0
1999 0090 3060 str r0, [r6, #0]
1202:system/core/sdcard/sdcard.c **** if (h->fd < 0) {
2000 .loc 1 1202 0
2001 0092 07DA bge .L139
1203:system/core/sdcard/sdcard.c **** free(h);
2002 .loc 1 1203 0
2003 0094 3046 mov r0, r6
2004 0096 FFF7FEFF bl free(PLT)
2005 .LVL210:
1204:system/core/sdcard/sdcard.c **** return -errno;
2006 .loc 1 1204 0
2007 009a FFF7FEFF bl __errno(PLT)
2008 .LVL211:
2009 009e 0368 ldr r3, [r0, #0]
2010 00a0 5842 negs r0, r3
2011 00a2 17E0 b .L137
2012 .L139:
2013 .LVL212:
2014 .LBB330:
2015 .LBB331:
246:system/core/sdcard/sdcard.c **** return (__u64) (uintptr_t) ptr;
2016 .loc 1 246 0
2017 00a4 0022 movs r2, #0
2018 .LBE331:
2019 .LBE330:
1206:system/core/sdcard/sdcard.c **** out.fh = ptr_to_id(h);
2020 .loc 1 1206 0
2021 00a6 02A9 add r1, sp, #8
1209:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
2022 .loc 1 1209 0
2023 00a8 1020 movs r0, #16
2024 .LBB334:
ARM GAS /tmp/ccMR8LsA.s page 77
2025 .LBB332:
246:system/core/sdcard/sdcard.c **** return (__u64) (uintptr_t) ptr;
2026 .loc 1 246 0
2027 00aa 0392 str r2, [sp, #12]
2028 .LBE332:
2029 .LBE334:
1207:system/core/sdcard/sdcard.c **** out.open_flags = 0;
2030 .loc 1 1207 0
2031 00ac 0492 str r2, [sp, #16]
1208:system/core/sdcard/sdcard.c **** out.padding = 0;
2032 .loc 1 1208 0
2033 00ae 0592 str r2, [sp, #20]
1209:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
2034 .loc 1 1209 0
2035 00b0 0190 str r0, [sp, #4]
2036 00b2 2046 mov r0, r4
2037 00b4 D5E90223 ldrd r2, [r5, #8]
2038 00b8 0091 str r1, [sp, #0]
2039 .LBB335:
2040 .LBB333:
246:system/core/sdcard/sdcard.c **** return (__u64) (uintptr_t) ptr;
2041 .loc 1 246 0
2042 00ba 0296 str r6, [sp, #8]
2043 .LBE333:
2044 .LBE335:
1209:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
2045 .loc 1 1209 0
2046 00bc FFF7FEFF bl fuse_reply(PLT)
2047 .LVL213:
1210:system/core/sdcard/sdcard.c **** return NO_STATUS;
2048 .loc 1 1210 0
2049 00c0 0120 movs r0, #1
2050 00c2 07E0 b .L137
2051 .LVL214:
2052 .L141:
1190:system/core/sdcard/sdcard.c **** return -ENOENT;
2053 .loc 1 1190 0
2054 00c4 6FF00100 mvn r0, #1
2055 00c8 04E0 b .L137
2056 .LVL215:
2057 .L144:
1194:system/core/sdcard/sdcard.c **** return -EACCES;
2058 .loc 1 1194 0
2059 00ca 6FF00C00 mvn r0, #12
2060 00ce 01E0 b .L137
2061 .LVL216:
2062 .L145:
1198:system/core/sdcard/sdcard.c **** return -ENOMEM;
2063 .loc 1 1198 0
2064 00d0 6FF00B00 mvn r0, #11
2065 .LVL217:
2066 .L137:
1211:system/core/sdcard/sdcard.c **** }
2067 .loc 1 1211 0
2068 00d4 0DF58051 add r1, sp, #4096
2069 00d8 1C31 adds r1, r1, #28
2070 00da 0A68 ldr r2, [r1, #0]
ARM GAS /tmp/ccMR8LsA.s page 78
2071 00dc D8F80030 ldr r3, [r8, #0]
2072 00e0 9A42 cmp r2, r3
2073 00e2 01D0 beq .L140
2074 00e4 FFF7FEFF bl __stack_chk_fail(PLT)
2075 .LVL218:
2076 .L140:
2077 00e8 09B0 add sp, sp, #36
2078 00ea 0DF5805D add sp, sp, #4096
2079 00ee BDE8F08F pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
2080 .L147:
2081 00f2 00BF .align 2
2082 .L146:
2083 00f4 E2000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC17+4)
2084 00f8 00000000 .word __stack_chk_guard(GOT)
2085 .cfi_endproc
2086 .LFE135:
2087 .fnend
2089 .section .text.handle_opendir.isra.10,"ax",%progbits
2090 .align 1
2091 .thumb
2092 .thumb_func
2094 handle_opendir.isra.10:
2095 .fnstart
2096 .LFB131:
1323:system/core/sdcard/sdcard.c **** static int handle_opendir(struct fuse* fuse, struct fuse_handler* handler,
2097 .loc 1 1323 0
2098 .cfi_startproc
2099 @ args = 0, pretend = 0, frame = 4120
2100 @ frame_needed = 0, uses_anonymous_args = 0
2101 .LVL219:
2102 0000 324B ldr r3, .L155
2103 0002 334A ldr r2, .L155+4
2104 0004 2DE9F047 push {r4, r5, r6, r7, r8, r9, sl, lr}
2105 .save {r4, r5, r6, r7, r8, r9, sl, lr}
2106 .LCFI30:
2107 .cfi_def_cfa_offset 32
2108 .cfi_offset 4, -32
2109 .cfi_offset 5, -28
2110 .cfi_offset 6, -24
2111 .cfi_offset 7, -20
2112 .cfi_offset 8, -16
2113 .cfi_offset 9, -12
2114 .cfi_offset 10, -8
2115 .cfi_offset 14, -4
2116 .pad #4128
2117 0008 ADF5815D sub sp, sp, #4128
2118 .LCFI31:
2119 .cfi_def_cfa_offset 4160
1323:system/core/sdcard/sdcard.c **** static int handle_opendir(struct fuse* fuse, struct fuse_handler* handler,
2120 .loc 1 1323 0
2121 .LPIC18:
2122 000c 7B44 add r3, pc
2123 000e 0F46 mov r7, r1
2124 0010 0DF58051 add r1, sp, #4096
2125 .LVL220:
2126 0014 0446 mov r4, r0
2127 0016 9D58 ldr r5, [r3, r2]
ARM GAS /tmp/ccMR8LsA.s page 79
2128 0018 1C31 adds r1, r1, #28
1332:system/core/sdcard/sdcard.c **** node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path));
2129 .loc 1 1332 0
2130 001a 0DF11C09 add r9, sp, #28
1323:system/core/sdcard/sdcard.c **** static int handle_opendir(struct fuse* fuse, struct fuse_handler* handler,
2131 .loc 1 1323 0
2132 001e 2B68 ldr r3, [r5, #0]
2133 0020 A846 mov r8, r5
2134 0022 0B60 str r3, [r1, #0]
2135 .LVL221:
1331:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
2136 .loc 1 1331 0
2137 0024 FFF7FEFF bl pthread_mutex_lock(PLT)
2138 .LVL222:
1332:system/core/sdcard/sdcard.c **** node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path));
2139 .loc 1 1332 0
2140 0028 D7E90423 ldrd r2, [r7, #16]
2141 002c 2046 mov r0, r4
2142 002e CDF80090 str r9, [sp, #0]
2143 0032 FFF7FEFF bl lookup_node_and_path_by_id_locked.constprop.28(PLT)
2144 .LVL223:
2145 0036 0646 mov r6, r0
2146 .LVL224:
1335:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
2147 .loc 1 1335 0
2148 0038 2046 mov r0, r4
2149 .LVL225:
2150 003a FFF7FEFF bl pthread_mutex_unlock(PLT)
2151 .LVL226:
1337:system/core/sdcard/sdcard.c **** if (!node) {
2152 .loc 1 1337 0
2153 003e 002E cmp r6, #0
2154 0040 2DD0 beq .L152
2155 .LVL227:
2156 .LBB340:
2157 .LBB341:
559:system/core/sdcard/sdcard.c **** return check_caller_access_to_name(fuse, hdr, node->parent, node->name, mode, has_rw);
2158 .loc 1 559 0
2159 0042 4FF0040A mov sl, #4
2160 0046 0025 movs r5, #0
2161 0048 CDF800A0 str sl, [sp, #0]
2162 004c 2046 mov r0, r4
2163 004e 0195 str r5, [sp, #4]
2164 0050 3946 mov r1, r7
2165 0052 726B ldr r2, [r6, #52]
2166 0054 F36B ldr r3, [r6, #60]
2167 0056 FFF7FEFF bl check_caller_access_to_name(PLT)
2168 .LVL228:
2169 .LBE341:
2170 .LBE340:
1340:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_node(fuse, hdr, node, R_OK, false)) {
2171 .loc 1 1340 0
2172 005a 18B3 cbz r0, .L153
1343:system/core/sdcard/sdcard.c **** h = malloc(sizeof(*h));
2173 .loc 1 1343 0
2174 005c 5046 mov r0, sl
2175 005e FFF7FEFF bl malloc(PLT)
ARM GAS /tmp/ccMR8LsA.s page 80
2176 .LVL229:
1344:system/core/sdcard/sdcard.c **** if (!h) {
2177 .loc 1 1344 0
2178 0062 0646 mov r6, r0
2179 .LVL230:
2180 0064 08B3 cbz r0, .L154
1348:system/core/sdcard/sdcard.c **** h->d = opendir(path);
2181 .loc 1 1348 0
2182 0066 4846 mov r0, r9
2183 .LVL231:
2184 0068 FFF7FEFF bl opendir(PLT)
2185 .LVL232:
2186 006c 3060 str r0, [r6, #0]
1349:system/core/sdcard/sdcard.c **** if (!h->d) {
2187 .loc 1 1349 0
2188 006e 38B9 cbnz r0, .L150
1350:system/core/sdcard/sdcard.c **** free(h);
2189 .loc 1 1350 0
2190 0070 3046 mov r0, r6
2191 0072 FFF7FEFF bl free(PLT)
2192 .LVL233:
1351:system/core/sdcard/sdcard.c **** return -errno;
2193 .loc 1 1351 0
2194 0076 FFF7FEFF bl __errno(PLT)
2195 .LVL234:
2196 007a 0268 ldr r2, [r0, #0]
2197 007c 5042 negs r0, r2
2198 007e 16E0 b .L149
2199 .L150:
2200 .LVL235:
1353:system/core/sdcard/sdcard.c **** out.fh = ptr_to_id(h);
2201 .loc 1 1353 0
2202 0080 02A8 add r0, sp, #8
1356:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
2203 .loc 1 1356 0
2204 0082 1021 movs r1, #16
2205 0084 D7E90223 ldrd r2, [r7, #8]
2206 0088 0090 str r0, [sp, #0]
2207 008a 2046 mov r0, r4
2208 008c 0191 str r1, [sp, #4]
2209 .LBB342:
2210 .LBB343:
246:system/core/sdcard/sdcard.c **** return (__u64) (uintptr_t) ptr;
2211 .loc 1 246 0
2212 008e 0296 str r6, [sp, #8]
2213 0090 0395 str r5, [sp, #12]
2214 .LBE343:
2215 .LBE342:
1354:system/core/sdcard/sdcard.c **** out.open_flags = 0;
2216 .loc 1 1354 0
2217 0092 0495 str r5, [sp, #16]
1355:system/core/sdcard/sdcard.c **** out.padding = 0;
2218 .loc 1 1355 0
2219 0094 0595 str r5, [sp, #20]
1356:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
2220 .loc 1 1356 0
2221 0096 FFF7FEFF bl fuse_reply(PLT)
ARM GAS /tmp/ccMR8LsA.s page 81
2222 .LVL236:
1357:system/core/sdcard/sdcard.c **** return NO_STATUS;
2223 .loc 1 1357 0
2224 009a 0120 movs r0, #1
2225 009c 07E0 b .L149
2226 .LVL237:
2227 .L152:
1338:system/core/sdcard/sdcard.c **** return -ENOENT;
2228 .loc 1 1338 0
2229 009e 6FF00100 mvn r0, #1
2230 00a2 04E0 b .L149
2231 .LVL238:
2232 .L153:
1341:system/core/sdcard/sdcard.c **** return -EACCES;
2233 .loc 1 1341 0
2234 00a4 6FF00C00 mvn r0, #12
2235 00a8 01E0 b .L149
2236 .LVL239:
2237 .L154:
1345:system/core/sdcard/sdcard.c **** return -ENOMEM;
2238 .loc 1 1345 0
2239 00aa 6FF00B00 mvn r0, #11
2240 .LVL240:
2241 .L149:
1358:system/core/sdcard/sdcard.c **** }
2242 .loc 1 1358 0
2243 00ae 0DF58053 add r3, sp, #4096
2244 00b2 1C33 adds r3, r3, #28
2245 00b4 1968 ldr r1, [r3, #0]
2246 00b6 D8F80020 ldr r2, [r8, #0]
2247 00ba 9142 cmp r1, r2
2248 00bc 01D0 beq .L151
2249 00be FFF7FEFF bl __stack_chk_fail(PLT)
2250 .LVL241:
2251 .L151:
2252 00c2 08B0 add sp, sp, #32
2253 00c4 0DF5805D add sp, sp, #4096
2254 00c8 BDE8F087 pop {r4, r5, r6, r7, r8, r9, sl, pc}
2255 .L156:
2256 .align 2
2257 .L155:
2258 00cc BC000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC18+4)
2259 00d0 00000000 .word __stack_chk_guard(GOT)
2260 .cfi_endproc
2261 .LFE131:
2262 .fnend
2264 .section .text.fuse_reply_attr,"ax",%progbits
2265 .align 1
2266 .thumb
2267 .thumb_func
2269 fuse_reply_attr:
2270 .fnstart
2271 .LFB88:
797:system/core/sdcard/sdcard.c **** {
2272 .loc 1 797 0
2273 .cfi_startproc
2274 @ args = 8, pretend = 0, frame = 208
ARM GAS /tmp/ccMR8LsA.s page 82
2275 @ frame_needed = 0, uses_anonymous_args = 0
2276 .LVL242:
2277 0000 2DE9F043 push {r4, r5, r6, r7, r8, r9, lr}
2278 .save {r4, r5, r6, r7, r8, r9, lr}
2279 .LCFI32:
2280 .cfi_def_cfa_offset 28
2281 .cfi_offset 4, -28
2282 .cfi_offset 5, -24
2283 .cfi_offset 6, -20
2284 .cfi_offset 7, -16
2285 .cfi_offset 8, -12
2286 .cfi_offset 9, -8
2287 .cfi_offset 14, -4
2288 .pad #220
2289 0004 B7B0 sub sp, sp, #220
2290 .LCFI33:
2291 .cfi_def_cfa_offset 248
797:system/core/sdcard/sdcard.c **** {
2292 .loc 1 797 0
2293 0006 8146 mov r9, r0
801:system/core/sdcard/sdcard.c **** if (lstat(path, &s) < 0) {
2294 .loc 1 801 0
2295 0008 1CA9 add r1, sp, #112
797:system/core/sdcard/sdcard.c **** {
2296 .loc 1 797 0
2297 000a 1446 mov r4, r2
2298 000c 1D46 mov r5, r3
801:system/core/sdcard/sdcard.c **** if (lstat(path, &s) < 0) {
2299 .loc 1 801 0
2300 000e 3F98 ldr r0, [sp, #252]
2301 .LVL243:
797:system/core/sdcard/sdcard.c **** {
2302 .loc 1 797 0
2303 0010 DDF8F880 ldr r8, [sp, #248]
801:system/core/sdcard/sdcard.c **** if (lstat(path, &s) < 0) {
2304 .loc 1 801 0
2305 0014 FFF7FEFF bl lstat(PLT)
2306 .LVL244:
2307 0018 0028 cmp r0, #0
2308 001a 04DA bge .L158
2309 .LBB352:
2310 .LBB353:
802:system/core/sdcard/sdcard.c **** return -errno;
2311 .loc 1 802 0
2312 001c FFF7FEFF bl __errno(PLT)
2313 .LVL245:
2314 0020 0368 ldr r3, [r0, #0]
2315 0022 5842 negs r0, r3
2316 0024 47E0 b .L159
2317 .L158:
2318 .LVL246:
2319 .LBE353:
2320 .LBE352:
2321 .LBB354:
2322 .LBB355:
804:system/core/sdcard/sdcard.c **** memset(&out, 0, sizeof(out));
2323 .loc 1 804 0
ARM GAS /tmp/ccMR8LsA.s page 83
2324 0026 02AF add r7, sp, #8
2325 .LVL247:
144:bionic/libc/include/string.h **** return __builtin___memset_chk(s, c, n, __builtin_object_size (s, 0));
2326 .loc 2 144 0
2327 0028 6826 movs r6, #104
2328 002a 0021 movs r1, #0
2329 002c 3246 mov r2, r6
2330 002e 3846 mov r0, r7
2331 0030 FFF7FEFF bl memset(PLT)
2332 .LVL248:
2333 .LBE355:
2334 .LBE354:
2335 .LBB356:
2336 .LBB357:
385:system/core/sdcard/sdcard.c **** attr->ino = node->nid;
2337 .loc 1 385 0
2338 0034 D8E90223 ldrd r2, [r8, #8]
386:system/core/sdcard/sdcard.c **** attr->size = s->st_size;
2339 .loc 1 386 0
2340 0038 DDE92801 ldrd r0, [sp, #160]
385:system/core/sdcard/sdcard.c **** attr->ino = node->nid;
2341 .loc 1 385 0
2342 003c CDE90623 strd r2, [sp, #24]
387:system/core/sdcard/sdcard.c **** attr->blocks = s->st_blocks;
2343 .loc 1 387 0
2344 0040 DDE92C23 ldrd r2, [sp, #176]
386:system/core/sdcard/sdcard.c **** attr->size = s->st_size;
2345 .loc 1 386 0
2346 0044 CDE90801 strd r0, [sp, #32]
388:system/core/sdcard/sdcard.c **** attr->atime = s->st_atime;
2347 .loc 1 388 0
2348 0048 2E99 ldr r1, [sp, #184]
387:system/core/sdcard/sdcard.c **** attr->blocks = s->st_blocks;
2349 .loc 1 387 0
2350 004a CDE90A23 strd r2, [sp, #40]
388:system/core/sdcard/sdcard.c **** attr->atime = s->st_atime;
2351 .loc 1 388 0
2352 004e 0023 movs r3, #0
389:system/core/sdcard/sdcard.c **** attr->mtime = s->st_mtime;
2353 .loc 1 389 0
2354 0050 3098 ldr r0, [sp, #192]
390:system/core/sdcard/sdcard.c **** attr->ctime = s->st_ctime;
2355 .loc 1 390 0
2356 0052 329A ldr r2, [sp, #200]
388:system/core/sdcard/sdcard.c **** attr->atime = s->st_atime;
2357 .loc 1 388 0
2358 0054 0D93 str r3, [sp, #52]
389:system/core/sdcard/sdcard.c **** attr->mtime = s->st_mtime;
2359 .loc 1 389 0
2360 0056 0F93 str r3, [sp, #60]
390:system/core/sdcard/sdcard.c **** attr->ctime = s->st_ctime;
2361 .loc 1 390 0
2362 0058 1193 str r3, [sp, #68]
391:system/core/sdcard/sdcard.c **** attr->atimensec = s->st_atime_nsec;
2363 .loc 1 391 0
2364 005a 2F9B ldr r3, [sp, #188]
388:system/core/sdcard/sdcard.c **** attr->atime = s->st_atime;
ARM GAS /tmp/ccMR8LsA.s page 84
2365 .loc 1 388 0
2366 005c 0C91 str r1, [sp, #48]
392:system/core/sdcard/sdcard.c **** attr->mtimensec = s->st_mtime_nsec;
2367 .loc 1 392 0
2368 005e 3199 ldr r1, [sp, #196]
389:system/core/sdcard/sdcard.c **** attr->mtime = s->st_mtime;
2369 .loc 1 389 0
2370 0060 0E90 str r0, [sp, #56]
390:system/core/sdcard/sdcard.c **** attr->ctime = s->st_ctime;
2371 .loc 1 390 0
2372 0062 1092 str r2, [sp, #64]
393:system/core/sdcard/sdcard.c **** attr->ctimensec = s->st_ctime_nsec;
2373 .loc 1 393 0
2374 0064 3398 ldr r0, [sp, #204]
394:system/core/sdcard/sdcard.c **** attr->mode = s->st_mode;
2375 .loc 1 394 0
2376 0066 209A ldr r2, [sp, #128]
391:system/core/sdcard/sdcard.c **** attr->atimensec = s->st_atime_nsec;
2377 .loc 1 391 0
2378 0068 1293 str r3, [sp, #72]
395:system/core/sdcard/sdcard.c **** attr->nlink = s->st_nlink;
2379 .loc 1 395 0
2380 006a 219B ldr r3, [sp, #132]
392:system/core/sdcard/sdcard.c **** attr->mtimensec = s->st_mtime_nsec;
2381 .loc 1 392 0
2382 006c 1391 str r1, [sp, #76]
397:system/core/sdcard/sdcard.c **** attr->uid = node->uid;
2383 .loc 1 397 0
2384 006e D8F82010 ldr r1, [r8, #32]
393:system/core/sdcard/sdcard.c **** attr->ctimensec = s->st_ctime_nsec;
2385 .loc 1 393 0
2386 0072 1490 str r0, [sp, #80]
395:system/core/sdcard/sdcard.c **** attr->nlink = s->st_nlink;
2387 .loc 1 395 0
2388 0074 1693 str r3, [sp, #88]
2389 .LBE357:
402:system/core/sdcard/sdcard.c **** int owner_mode = s->st_mode & 0700;
2390 .loc 1 402 0
2391 0076 02F4E073 and r3, r2, #448
2392 .LVL249:
2393 .LBB358:
398:system/core/sdcard/sdcard.c **** attr->gid = node->gid;
2394 .loc 1 398 0
2395 007a D8F82400 ldr r0, [r8, #36]
404:system/core/sdcard/sdcard.c **** attr->mode = (attr->mode & S_IFMT) | filtered_mode;
2396 .loc 1 404 0
2397 007e 02F47042 and r2, r2, #61440
397:system/core/sdcard/sdcard.c **** attr->uid = node->uid;
2398 .loc 1 397 0
2399 0082 1791 str r1, [sp, #92]
403:system/core/sdcard/sdcard.c **** int filtered_mode = node->mode & (owner_mode | (owner_mode >> 3) | (owner_mode >> 6));
2400 .loc 1 403 0
2401 0084 9911 asrs r1, r3, #6
398:system/core/sdcard/sdcard.c **** attr->gid = node->gid;
2402 .loc 1 398 0
2403 0086 1890 str r0, [sp, #96]
403:system/core/sdcard/sdcard.c **** int filtered_mode = node->mode & (owner_mode | (owner_mode >> 3) | (owner_mode >> 6));
ARM GAS /tmp/ccMR8LsA.s page 85
2404 .loc 1 403 0
2405 0088 41EAD300 orr r0, r1, r3, lsr #3
2406 008c 40EA030C orr ip, r0, r3
2407 0090 B8F82830 ldrh r3, [r8, #40]
2408 .LVL250:
2409 .LBE358:
2410 .LBE356:
807:system/core/sdcard/sdcard.c **** fuse_reply(fuse, unique, &out, sizeof(out));
2411 .loc 1 807 0
2412 0094 0097 str r7, [sp, #0]
2413 0096 0196 str r6, [sp, #4]
2414 .LBB362:
2415 .LBB359:
403:system/core/sdcard/sdcard.c **** int filtered_mode = node->mode & (owner_mode | (owner_mode >> 3) | (owner_mode >> 6));
2416 .loc 1 403 0
2417 0098 0CEA0301 and r1, ip, r3
2418 .LBE359:
2419 .LBE362:
806:system/core/sdcard/sdcard.c **** out.attr_valid = 10;
2420 .loc 1 806 0
2421 009c 0023 movs r3, #0
2422 .LBB363:
2423 .LBB360:
404:system/core/sdcard/sdcard.c **** attr->mode = (attr->mode & S_IFMT) | filtered_mode;
2424 .loc 1 404 0
2425 009e 41EA0200 orr r0, r1, r2
2426 .LBE360:
2427 .LBE363:
806:system/core/sdcard/sdcard.c **** out.attr_valid = 10;
2428 .loc 1 806 0
2429 00a2 0A22 movs r2, #10
2430 00a4 CDE90223 strd r2, [sp, #8]
807:system/core/sdcard/sdcard.c **** fuse_reply(fuse, unique, &out, sizeof(out));
2431 .loc 1 807 0
2432 00a8 2246 mov r2, r4
2433 .LBB364:
2434 .LBB361:
404:system/core/sdcard/sdcard.c **** attr->mode = (attr->mode & S_IFMT) | filtered_mode;
2435 .loc 1 404 0
2436 00aa 1590 str r0, [sp, #84]
2437 .LBE361:
2438 .LBE364:
807:system/core/sdcard/sdcard.c **** fuse_reply(fuse, unique, &out, sizeof(out));
2439 .loc 1 807 0
2440 00ac 2B46 mov r3, r5
2441 00ae 4846 mov r0, r9
2442 00b0 FFF7FEFF bl fuse_reply(PLT)
2443 .LVL251:
808:system/core/sdcard/sdcard.c **** return NO_STATUS;
2444 .loc 1 808 0
2445 00b4 0120 movs r0, #1
2446 .LVL252:
2447 .L159:
809:system/core/sdcard/sdcard.c **** }
2448 .loc 1 809 0
2449 00b6 37B0 add sp, sp, #220
2450 00b8 BDE8F083 pop {r4, r5, r6, r7, r8, r9, pc}
ARM GAS /tmp/ccMR8LsA.s page 86
2451 .cfi_endproc
2452 .LFE88:
2453 .fnend
2455 .section .text.handle_getattr.isra.5,"ax",%progbits
2456 .align 1
2457 .thumb
2458 .thumb_func
2460 handle_getattr.isra.5:
2461 .fnstart
2462 .LFB126:
856:system/core/sdcard/sdcard.c **** static int handle_getattr(struct fuse* fuse, struct fuse_handler* handler,
2463 .loc 1 856 0
2464 .cfi_startproc
2465 @ args = 0, pretend = 0, frame = 4104
2466 @ frame_needed = 0, uses_anonymous_args = 0
2467 .LVL253:
2468 0000 234B ldr r3, .L165
2469 0002 244A ldr r2, .L165+4
2470 0004 2DE9F041 push {r4, r5, r6, r7, r8, lr}
2471 .save {r4, r5, r6, r7, r8, lr}
2472 .LCFI34:
2473 .cfi_def_cfa_offset 24
2474 .cfi_offset 4, -24
2475 .cfi_offset 5, -20
2476 .cfi_offset 6, -16
2477 .cfi_offset 7, -12
2478 .cfi_offset 8, -8
2479 .cfi_offset 14, -4
2480 .pad #4096
2481 0008 ADF5805D sub sp, sp, #4096
2482 .LCFI35:
2483 .cfi_def_cfa_offset 4120
2484 .LPIC19:
2485 000c 7B44 add r3, pc
2486 .pad #16
2487 000e 84B0 sub sp, sp, #16
2488 .LCFI36:
2489 .cfi_def_cfa_offset 4136
856:system/core/sdcard/sdcard.c **** static int handle_getattr(struct fuse* fuse, struct fuse_handler* handler,
2490 .loc 1 856 0
2491 0010 0F46 mov r7, r1
2492 0012 0DF58051 add r1, sp, #4096
2493 .LVL254:
2494 0016 53F80280 ldr r8, [r3, r2]
2495 001a 0546 mov r5, r0
2496 001c 0C31 adds r1, r1, #12
863:system/core/sdcard/sdcard.c **** node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path));
2497 .loc 1 863 0
2498 001e 03AC add r4, sp, #12
856:system/core/sdcard/sdcard.c **** static int handle_getattr(struct fuse* fuse, struct fuse_handler* handler,
2499 .loc 1 856 0
2500 0020 D8F80030 ldr r3, [r8, #0]
2501 0024 0B60 str r3, [r1, #0]
2502 .LVL255:
862:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
2503 .loc 1 862 0
2504 0026 FFF7FEFF bl pthread_mutex_lock(PLT)
ARM GAS /tmp/ccMR8LsA.s page 87
2505 .LVL256:
863:system/core/sdcard/sdcard.c **** node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path));
2506 .loc 1 863 0
2507 002a D7E90423 ldrd r2, [r7, #16]
2508 002e 2846 mov r0, r5
2509 0030 0094 str r4, [sp, #0]
2510 0032 FFF7FEFF bl lookup_node_and_path_by_id_locked.constprop.28(PLT)
2511 .LVL257:
2512 0036 0646 mov r6, r0
2513 .LVL258:
866:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
2514 .loc 1 866 0
2515 0038 2846 mov r0, r5
2516 .LVL259:
2517 003a FFF7FEFF bl pthread_mutex_unlock(PLT)
2518 .LVL260:
868:system/core/sdcard/sdcard.c **** if (!node) {
2519 .loc 1 868 0
2520 003e 96B1 cbz r6, .L163
2521 .LVL261:
2522 .LBB367:
2523 .LBB368:
559:system/core/sdcard/sdcard.c **** return check_caller_access_to_name(fuse, hdr, node->parent, node->name, mode, has_rw);
2524 .loc 1 559 0
2525 0040 0420 movs r0, #4
2526 0042 0023 movs r3, #0
2527 0044 8DE80900 stmia sp, {r0, r3}
2528 0048 3946 mov r1, r7
2529 004a 2846 mov r0, r5
2530 004c 726B ldr r2, [r6, #52]
2531 004e F36B ldr r3, [r6, #60]
2532 0050 FFF7FEFF bl check_caller_access_to_name(PLT)
2533 .LVL262:
2534 .LBE368:
2535 .LBE367:
871:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_node(fuse, hdr, node, R_OK, false)) {
2536 .loc 1 871 0
2537 0054 50B1 cbz r0, .L164
875:system/core/sdcard/sdcard.c **** return fuse_reply_attr(fuse, hdr->unique, node, path);
2538 .loc 1 875 0
2539 0056 D7E90223 ldrd r2, [r7, #8]
2540 005a 2846 mov r0, r5
2541 005c 0096 str r6, [sp, #0]
2542 005e 0194 str r4, [sp, #4]
2543 0060 FFF7FEFF bl fuse_reply_attr(PLT)
2544 .LVL263:
2545 0064 04E0 b .L161
2546 .LVL264:
2547 .L163:
869:system/core/sdcard/sdcard.c **** return -ENOENT;
2548 .loc 1 869 0
2549 0066 6FF00100 mvn r0, #1
2550 006a 01E0 b .L161
2551 .LVL265:
2552 .L164:
872:system/core/sdcard/sdcard.c **** return -EACCES;
2553 .loc 1 872 0
ARM GAS /tmp/ccMR8LsA.s page 88
2554 006c 6FF00C00 mvn r0, #12
2555 .LVL266:
2556 .L161:
876:system/core/sdcard/sdcard.c **** }
2557 .loc 1 876 0
2558 0070 0DF58052 add r2, sp, #4096
2559 0074 0C32 adds r2, r2, #12
2560 0076 1168 ldr r1, [r2, #0]
2561 0078 D8F80030 ldr r3, [r8, #0]
2562 007c 9942 cmp r1, r3
2563 007e 01D0 beq .L162
2564 0080 FFF7FEFF bl __stack_chk_fail(PLT)
2565 .LVL267:
2566 .L162:
2567 0084 04B0 add sp, sp, #16
2568 0086 0DF5805D add sp, sp, #4096
2569 008a BDE8F081 pop {r4, r5, r6, r7, r8, pc}
2570 .L166:
2571 008e 00BF .align 2
2572 .L165:
2573 0090 80000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC19+4)
2574 0094 00000000 .word __stack_chk_guard(GOT)
2575 .cfi_endproc
2576 .LFE126:
2577 .fnend
2579 .section .text.handle_setattr.isra.13,"ax",%progbits
2580 .align 1
2581 .thumb
2582 .thumb_func
2584 handle_setattr.isra.13:
2585 .fnstart
2586 .LFB134:
878:system/core/sdcard/sdcard.c **** static int handle_setattr(struct fuse* fuse, struct fuse_handler* handler,
2587 .loc 1 878 0
2588 .cfi_startproc
2589 @ args = 0, pretend = 0, frame = 4120
2590 @ frame_needed = 0, uses_anonymous_args = 0
2591 .LVL268:
2592 0000 404B ldr r3, .L193+4
2593 0002 2DE9F047 push {r4, r5, r6, r7, r8, r9, sl, lr}
2594 .save {r4, r5, r6, r7, r8, r9, sl, lr}
2595 .LCFI37:
2596 .cfi_def_cfa_offset 32
2597 .cfi_offset 4, -32
2598 .cfi_offset 5, -28
2599 .cfi_offset 6, -24
2600 .cfi_offset 7, -20
2601 .cfi_offset 8, -16
2602 .cfi_offset 9, -12
2603 .cfi_offset 10, -8
2604 .cfi_offset 14, -4
2605 0006 1446 mov r4, r2
2606 0008 3F4A ldr r2, .L193+8
2607 .LVL269:
2608 .pad #4128
2609 000a ADF5815D sub sp, sp, #4128
2610 .LCFI38:
ARM GAS /tmp/ccMR8LsA.s page 89
2611 .cfi_def_cfa_offset 4160
878:system/core/sdcard/sdcard.c **** static int handle_setattr(struct fuse* fuse, struct fuse_handler* handler,
2612 .loc 1 878 0
2613 .LPIC20:
2614 000e 7B44 add r3, pc
2615 0010 8846 mov r8, r1
2616 0012 0DF58051 add r1, sp, #4096
2617 .LVL270:
2618 0016 0646 mov r6, r0
2619 0018 53F80290 ldr r9, [r3, r2]
2620 001c 1C31 adds r1, r1, #28
888:system/core/sdcard/sdcard.c **** node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path));
2621 .loc 1 888 0
2622 001e 07AD add r5, sp, #28
878:system/core/sdcard/sdcard.c **** static int handle_setattr(struct fuse* fuse, struct fuse_handler* handler,
2623 .loc 1 878 0
2624 0020 D9F80030 ldr r3, [r9, #0]
2625 0024 0B60 str r3, [r1, #0]
2626 .LVL271:
886:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
2627 .loc 1 886 0
2628 0026 FFF7FEFF bl pthread_mutex_lock(PLT)
2629 .LVL272:
887:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
2630 .loc 1 887 0
2631 002a 4146 mov r1, r8
2632 002c 3046 mov r0, r6
2633 002e FFF7FEFF bl get_caller_has_rw_locked(PLT)
2634 .LVL273:
888:system/core/sdcard/sdcard.c **** node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path));
2635 .loc 1 888 0
2636 0032 D8E90423 ldrd r2, [r8, #16]
887:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
2637 .loc 1 887 0
2638 0036 8246 mov sl, r0
2639 .LVL274:
888:system/core/sdcard/sdcard.c **** node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, path, sizeof(path));
2640 .loc 1 888 0
2641 0038 0095 str r5, [sp, #0]
2642 003a 3046 mov r0, r6
2643 .LVL275:
2644 003c FFF7FEFF bl lookup_node_and_path_by_id_locked.constprop.28(PLT)
2645 .LVL276:
2646 0040 0746 mov r7, r0
2647 .LVL277:
891:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
2648 .loc 1 891 0
2649 0042 3046 mov r0, r6
2650 .LVL278:
2651 0044 FFF7FEFF bl pthread_mutex_unlock(PLT)
2652 .LVL279:
893:system/core/sdcard/sdcard.c **** if (!node) {
2653 .loc 1 893 0
2654 0048 002F cmp r7, #0
2655 004a 45D0 beq .L176
2656 .LVL280:
2657 .LBB371:
ARM GAS /tmp/ccMR8LsA.s page 90
2658 .LBB372:
559:system/core/sdcard/sdcard.c **** return check_caller_access_to_name(fuse, hdr, node->parent, node->name, mode, has_rw);
2659 .loc 1 559 0
2660 004c 0223 movs r3, #2
2661 004e 3046 mov r0, r6
2662 0050 8DE80804 stmia sp, {r3, sl}
2663 0054 4146 mov r1, r8
2664 0056 7A6B ldr r2, [r7, #52]
2665 0058 FB6B ldr r3, [r7, #60]
2666 005a FFF7FEFF bl check_caller_access_to_name(PLT)
2667 .LVL281:
2668 .LBE372:
2669 .LBE371:
896:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_node(fuse, hdr, node, W_OK, has_rw)) {
2670 .loc 1 896 0
2671 005e 0028 cmp r0, #0
2672 0060 3DD0 beq .L177
903:system/core/sdcard/sdcard.c **** if ((req->valid & FATTR_SIZE) && truncate(path, req->size) < 0) {
2673 .loc 1 903 0
2674 0062 2068 ldr r0, [r4, #0]
2675 0064 0307 lsls r3, r0, #28
2676 0066 06D5 bpl .L169
2677 0068 2846 mov r0, r5
2678 006a 2169 ldr r1, [r4, #16]
2679 006c FFF7FEFF bl truncate(PLT)
2680 .LVL282:
2681 0070 0028 cmp r0, #0
2682 0072 00DA bge .L169
2683 0074 23E0 b .L192
2684 .L169:
913:system/core/sdcard/sdcard.c **** if (req->valid & (FATTR_ATIME | FATTR_MTIME)) {
2685 .loc 1 913 0
2686 0076 2368 ldr r3, [r4, #0]
2687 0078 13F0300F tst r3, #48
2688 007c 24D0 beq .L170
914:system/core/sdcard/sdcard.c **** times[0].tv_nsec = UTIME_OMIT;
2689 .loc 1 914 0
2690 007e 204A ldr r2, .L193
916:system/core/sdcard/sdcard.c **** if (req->valid & FATTR_ATIME) {
2691 .loc 1 916 0
2692 0080 D806 lsls r0, r3, #27
914:system/core/sdcard/sdcard.c **** times[0].tv_nsec = UTIME_OMIT;
2693 .loc 1 914 0
2694 0082 0492 str r2, [sp, #16]
915:system/core/sdcard/sdcard.c **** times[1].tv_nsec = UTIME_OMIT;
2695 .loc 1 915 0
2696 0084 0692 str r2, [sp, #24]
916:system/core/sdcard/sdcard.c **** if (req->valid & FATTR_ATIME) {
2697 .loc 1 916 0
2698 0086 07D5 bpl .L171
917:system/core/sdcard/sdcard.c **** if (req->valid & FATTR_ATIME_NOW) {
2699 .loc 1 917 0
2700 0088 1906 lsls r1, r3, #24
920:system/core/sdcard/sdcard.c **** times[0].tv_sec = req->atime;
2701 .loc 1 920 0
2702 008a 57BF itett pl
2703 008c 226A ldrpl r2, [r4, #32]
ARM GAS /tmp/ccMR8LsA.s page 91
918:system/core/sdcard/sdcard.c **** times[0].tv_nsec = UTIME_NOW;
2704 .loc 1 918 0
2705 008e 6FF04042 mvnmi r2, #-1073741824
920:system/core/sdcard/sdcard.c **** times[0].tv_sec = req->atime;
2706 .loc 1 920 0
2707 0092 0392 strpl r2, [sp, #12]
921:system/core/sdcard/sdcard.c **** times[0].tv_nsec = req->atimensec;
2708 .loc 1 921 0
2709 0094 A26B ldrpl r2, [r4, #56]
2710 0096 0492 str r2, [sp, #16]
2711 .L171:
924:system/core/sdcard/sdcard.c **** if (req->valid & FATTR_MTIME) {
2712 .loc 1 924 0
2713 0098 9A06 lsls r2, r3, #26
2714 009a 07D5 bpl .L173
925:system/core/sdcard/sdcard.c **** if (req->valid & FATTR_MTIME_NOW) {
2715 .loc 1 925 0
2716 009c D905 lsls r1, r3, #23
928:system/core/sdcard/sdcard.c **** times[1].tv_sec = req->mtime;
2717 .loc 1 928 0
2718 009e 57BF itett pl
2719 00a0 A16A ldrpl r1, [r4, #40]
926:system/core/sdcard/sdcard.c **** times[1].tv_nsec = UTIME_NOW;
2720 .loc 1 926 0
2721 00a2 6FF04041 mvnmi r1, #-1073741824
928:system/core/sdcard/sdcard.c **** times[1].tv_sec = req->mtime;
2722 .loc 1 928 0
2723 00a6 0591 strpl r1, [sp, #20]
929:system/core/sdcard/sdcard.c **** times[1].tv_nsec = req->mtimensec;
2724 .loc 1 929 0
2725 00a8 E16B ldrpl r1, [r4, #60]
2726 00aa 0691 str r1, [sp, #24]
2727 .L173:
934:system/core/sdcard/sdcard.c **** if (utimensat(-1, path, times, 0) < 0) {
2728 .loc 1 934 0
2729 00ac 0023 movs r3, #0
2730 00ae 4FF0FF30 mov r0, #-1
2731 00b2 2946 mov r1, r5
2732 00b4 03AA add r2, sp, #12
2733 00b6 FFF7FEFF bl utimensat(PLT)
2734 .LVL283:
2735 00ba 0028 cmp r0, #0
2736 00bc 04DA bge .L170
2737 .L192:
935:system/core/sdcard/sdcard.c **** return -errno;
2738 .loc 1 935 0
2739 00be FFF7FEFF bl __errno(PLT)
2740 .LVL284:
2741 00c2 0068 ldr r0, [r0, #0]
2742 00c4 4042 negs r0, r0
2743 00c6 0CE0 b .L168
2744 .L170:
938:system/core/sdcard/sdcard.c **** return fuse_reply_attr(fuse, hdr->unique, node, path);
2745 .loc 1 938 0
2746 00c8 D8E90223 ldrd r2, [r8, #8]
2747 00cc 3046 mov r0, r6
2748 00ce 0097 str r7, [sp, #0]
ARM GAS /tmp/ccMR8LsA.s page 92
2749 00d0 0195 str r5, [sp, #4]
2750 00d2 FFF7FEFF bl fuse_reply_attr(PLT)
2751 .LVL285:
2752 00d6 04E0 b .L168
2753 .LVL286:
2754 .L176:
894:system/core/sdcard/sdcard.c **** return -ENOENT;
2755 .loc 1 894 0
2756 00d8 6FF00100 mvn r0, #1
2757 00dc 01E0 b .L168
2758 .LVL287:
2759 .L177:
897:system/core/sdcard/sdcard.c **** return -EACCES;
2760 .loc 1 897 0
2761 00de 6FF00C00 mvn r0, #12
2762 .LVL288:
2763 .L168:
939:system/core/sdcard/sdcard.c **** }
2764 .loc 1 939 0
2765 00e2 0DF58053 add r3, sp, #4096
2766 00e6 1C33 adds r3, r3, #28
2767 00e8 1A68 ldr r2, [r3, #0]
2768 00ea D9F80010 ldr r1, [r9, #0]
2769 00ee 8A42 cmp r2, r1
2770 00f0 01D0 beq .L175
2771 00f2 FFF7FEFF bl __stack_chk_fail(PLT)
2772 .LVL289:
2773 .L175:
2774 00f6 08B0 add sp, sp, #32
2775 00f8 0DF5805D add sp, sp, #4096
2776 00fc BDE8F087 pop {r4, r5, r6, r7, r8, r9, sl, pc}
2777 .L194:
2778 .align 2
2779 .L193:
2780 0100 FEFFFF3F .word 1073741822
2781 0104 F2000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC20+4)
2782 0108 00000000 .word __stack_chk_guard(GOT)
2783 .cfi_endproc
2784 .LFE134:
2785 .fnend
2787 .section .text.handle_rename.isra.17,"ax",%progbits
2788 .align 1
2789 .thumb
2790 .thumb_func
2792 handle_rename.isra.17:
2793 .fnstart
2794 .LFB138:
1080:system/core/sdcard/sdcard.c **** static int handle_rename(struct fuse* fuse, struct fuse_handler* handler,
2795 .loc 1 1080 0
2796 .cfi_startproc
2797 @ args = 4, pretend = 0, frame = 16400
2798 @ frame_needed = 0, uses_anonymous_args = 0
2799 .LVL290:
2800 0000 2DE9F04F push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
2801 .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
2802 .LCFI39:
2803 .cfi_def_cfa_offset 36
ARM GAS /tmp/ccMR8LsA.s page 93
2804 .cfi_offset 4, -36
2805 .cfi_offset 5, -32
2806 .cfi_offset 6, -28
2807 .cfi_offset 7, -24
2808 .cfi_offset 8, -20
2809 .cfi_offset 9, -16
2810 .cfi_offset 10, -12
2811 .cfi_offset 11, -8
2812 .cfi_offset 14, -4
2813 0004 9946 mov r9, r3
2814 0006 8D4B ldr r3, .L243
2815 .LVL291:
2816 0008 1546 mov r5, r2
2817 .pad #16384
2818 000a ADF5804D sub sp, sp, #16384
2819 .LCFI40:
2820 .cfi_def_cfa_offset 16420
2821 000e 8846 mov r8, r1
2822 0010 8B4A ldr r2, .L243+4
2823 .LVL292:
2824 .pad #28
2825 0012 87B0 sub sp, sp, #28
2826 .LCFI41:
2827 .cfi_def_cfa_offset 16448
1080:system/core/sdcard/sdcard.c **** static int handle_rename(struct fuse* fuse, struct fuse_handler* handler,
2828 .loc 1 1080 0
2829 .LPIC21:
2830 0014 7B44 add r3, pc
2831 0016 0DF58041 add r1, sp, #16384
2832 .LVL293:
2833 001a 4031 adds r1, r1, #64
2834 001c 0446 mov r4, r0
2835 001e 9B58 ldr r3, [r3, r2]
1100:system/core/sdcard/sdcard.c **** new_parent_path, sizeof(new_parent_path));
2836 .loc 1 1100 0
2837 0020 0DF5805A add sl, sp, #4096
1080:system/core/sdcard/sdcard.c **** static int handle_rename(struct fuse* fuse, struct fuse_handler* handler,
2838 .loc 1 1080 0
2839 0024 0E68 ldr r6, [r1, #0]
2840 0026 0DF58041 add r1, sp, #16384
2841 002a 1431 adds r1, r1, #20
1100:system/core/sdcard/sdcard.c **** new_parent_path, sizeof(new_parent_path));
2842 .loc 1 1100 0
2843 002c 0AF1140A add sl, sl, #20
1080:system/core/sdcard/sdcard.c **** static int handle_rename(struct fuse* fuse, struct fuse_handler* handler,
2844 .loc 1 1080 0
2845 0030 1F68 ldr r7, [r3, #0]
2846 0032 0393 str r3, [sp, #12]
2847 0034 0F60 str r7, [r1, #0]
2848 .LVL294:
1095:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
2849 .loc 1 1095 0
2850 0036 FFF7FEFF bl pthread_mutex_lock(PLT)
2851 .LVL295:
1096:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
2852 .loc 1 1096 0
2853 003a 4146 mov r1, r8
ARM GAS /tmp/ccMR8LsA.s page 94
2854 003c 2046 mov r0, r4
2855 003e FFF7FEFF bl get_caller_has_rw_locked(PLT)
2856 .LVL296:
2857 0042 8346 mov fp, r0
2858 .LVL297:
1098:system/core/sdcard/sdcard.c **** old_parent_path, sizeof(old_parent_path));
2859 .loc 1 1098 0
2860 0044 05A8 add r0, sp, #20
2861 .LVL298:
1097:system/core/sdcard/sdcard.c **** old_parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
2862 .loc 1 1097 0
2863 0046 D8E90423 ldrd r2, [r8, #16]
2864 004a 0090 str r0, [sp, #0]
2865 004c 2046 mov r0, r4
2866 004e FFF7FEFF bl lookup_node_and_path_by_id_locked.constprop.28(PLT)
2867 .LVL299:
1099:system/core/sdcard/sdcard.c **** new_parent_node = lookup_node_and_path_by_id_locked(fuse, req->newdir,
2868 .loc 1 1099 0
2869 0052 CDF800A0 str sl, [sp, #0]
1097:system/core/sdcard/sdcard.c **** old_parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
2870 .loc 1 1097 0
2871 0056 0746 mov r7, r0
2872 .LVL300:
1099:system/core/sdcard/sdcard.c **** new_parent_node = lookup_node_and_path_by_id_locked(fuse, req->newdir,
2873 .loc 1 1099 0
2874 0058 D5E90023 ldrd r2, [r5]
2875 005c 2046 mov r0, r4
2876 .LVL301:
2877 005e FFF7FEFF bl lookup_node_and_path_by_id_locked.constprop.28(PLT)
2878 .LVL302:
2879 0062 0546 mov r5, r0
2880 .LVL303:
1105:system/core/sdcard/sdcard.c **** if (!old_parent_node || !new_parent_node) {
2881 .loc 1 1105 0
2882 0064 17B9 cbnz r7, .L196
2883 .LVL304:
2884 .L198:
2885 .LBB391:
2886 .LBB392:
2887 .LBB393:
2888 .LBB394:
1106:system/core/sdcard/sdcard.c **** res = -ENOENT;
2889 .loc 1 1106 0
2890 0066 6FF00105 mvn r5, #1
2891 .LVL305:
2892 006a C3E0 b .L197
2893 .LVL306:
2894 .L196:
2895 .LBE394:
2896 .LBE393:
2897 .LBE392:
2898 .LBE391:
1105:system/core/sdcard/sdcard.c **** if (!old_parent_node || !new_parent_node) {
2899 .loc 1 1105 0
2900 006c 0028 cmp r0, #0
2901 006e FAD0 beq .L198
1109:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, old_parent_node, old_name, W_OK, has_rw)) {
ARM GAS /tmp/ccMR8LsA.s page 95
2902 .loc 1 1109 0
2903 0070 4FF0020C mov ip, #2
2904 0074 CDF804B0 str fp, [sp, #4]
2905 0078 CDF800C0 str ip, [sp, #0]
2906 007c 2046 mov r0, r4
2907 .LVL307:
2908 007e 4146 mov r1, r8
2909 0080 3A46 mov r2, r7
2910 0082 4B46 mov r3, r9
2911 0084 CDF808C0 str ip, [sp, #8]
2912 0088 FFF7FEFF bl check_caller_access_to_name(PLT)
2913 .LVL308:
2914 008c DDF808C0 ldr ip, [sp, #8]
2915 0090 0028 cmp r0, #0
2916 0092 00F0AD80 beq .L217
1113:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, new_parent_node, new_name, W_OK, has_rw)) {
2917 .loc 1 1113 0
2918 0096 CDF800C0 str ip, [sp, #0]
2919 009a 2046 mov r0, r4
2920 009c CDF804B0 str fp, [sp, #4]
2921 00a0 4146 mov r1, r8
2922 00a2 2A46 mov r2, r5
2923 00a4 3346 mov r3, r6
2924 00a6 FFF7FEFF bl check_caller_access_to_name(PLT)
2925 .LVL309:
2926 00aa 0028 cmp r0, #0
2927 00ac 00F0A080 beq .L217
2928 .LVL310:
2929 .LBB400:
2930 .LBB401:
659:system/core/sdcard/sdcard.c **** for (node = node->child; node; node = node->next) {
2931 .loc 1 659 0
2932 00b0 D7F83080 ldr r8, [r7, #48]
2933 .LVL311:
2934 00b4 09E0 b .L199
2935 .L201:
664:system/core/sdcard/sdcard.c **** if (!strcmp(name, node->name)) {
2936 .loc 1 664 0
2937 00b6 4846 mov r0, r9
2938 00b8 D8F83C10 ldr r1, [r8, #60]
2939 00bc FFF7FEFF bl strcmp(PLT)
2940 .LVL312:
2941 00c0 0028 cmp r0, #0
2942 00c2 00F0A480 beq .L200
659:system/core/sdcard/sdcard.c **** for (node = node->child; node; node = node->next) {
2943 .loc 1 659 0
2944 00c6 D8F82C80 ldr r8, [r8, #44]
2945 .LVL313:
2946 .L199:
2947 00ca B8F1000F cmp r8, #0
2948 00ce F2D1 bne .L201
2949 00d0 C9E7 b .L198
2950 .L242:
2951 .LBE401:
2952 .LBE400:
2953 .LBB402:
2954 .LBB403:
ARM GAS /tmp/ccMR8LsA.s page 96
251:system/core/sdcard/sdcard.c **** node->refcount++;
2955 .loc 1 251 0
2956 00d2 D8F80020 ldr r2, [r8, #0]
2957 .LBE403:
2958 .LBE402:
1124:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
2959 .loc 1 1124 0
2960 00d6 2046 mov r0, r4
2961 .LBB405:
2962 .LBB404:
251:system/core/sdcard/sdcard.c **** node->refcount++;
2963 .loc 1 251 0
2964 00d8 531C adds r3, r2, #1
2965 00da C8F80030 str r3, [r8, #0]
2966 .LBE404:
2967 .LBE405:
1124:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
2968 .loc 1 1124 0
2969 00de FFF7FEFF bl pthread_mutex_unlock(PLT)
2970 .LVL314:
1131:system/core/sdcard/sdcard.c **** || strcasecmp(old_name, new_name);
2971 .loc 1 1131 0
2972 00e2 AF42 cmp r7, r5
2973 00e4 07D1 bne .L218
2974 00e6 4846 mov r0, r9
2975 00e8 3146 mov r1, r6
2976 00ea FFF7FEFF bl strcasecmp(PLT)
2977 .LVL315:
2978 00ee 031C adds r3, r0, #0
2979 00f0 18BF it ne
2980 00f2 0123 movne r3, #1
2981 00f4 00E0 b .L202
2982 .L218:
2983 00f6 0123 movs r3, #1
2984 .L202:
2985 .LVL316:
1132:system/core/sdcard/sdcard.c **** if (!(new_actual_name = find_file_within(new_parent_path, new_name,
2986 .loc 1 1132 0
2987 00f8 0DF54052 add r2, sp, #12288
2988 00fc 5046 mov r0, sl
2989 00fe 3146 mov r1, r6
2990 0100 1432 adds r2, r2, #20
2991 0102 FFF7FEFF bl find_file_within.constprop.27(PLT)
2992 .LVL317:
2993 0106 8146 mov r9, r0
2994 .LVL318:
2995 0108 0028 cmp r0, #0
2996 010a 68D0 beq .L219
1139:system/core/sdcard/sdcard.c **** res = rename(old_child_path, new_child_path);
2997 .loc 1 1139 0
2998 010c 0DF50050 add r0, sp, #8192
2999 .LVL319:
3000 0110 0DF54051 add r1, sp, #12288
3001 0114 1430 adds r0, r0, #20
3002 0116 1431 adds r1, r1, #20
3003 0118 FFF7FEFF bl rename(PLT)
3004 .LVL320:
ARM GAS /tmp/ccMR8LsA.s page 97
1140:system/core/sdcard/sdcard.c **** if (res < 0) {
3005 .loc 1 1140 0
3006 011c 0028 cmp r0, #0
3007 011e 04DA bge .L204
1141:system/core/sdcard/sdcard.c **** res = -errno;
3008 .loc 1 1141 0
3009 0120 FFF7FEFF bl __errno(PLT)
3010 .LVL321:
3011 0124 0568 ldr r5, [r0, #0]
3012 .LVL322:
3013 0126 6D42 negs r5, r5
3014 .LVL323:
3015 0128 5BE0 b .L203
3016 .LVL324:
3017 .L204:
1145:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
3018 .loc 1 1145 0
3019 012a 2046 mov r0, r4
3020 .LVL325:
3021 012c FFF7FEFF bl pthread_mutex_lock(PLT)
3022 .LVL326:
3023 .LBB406:
3024 .LBB407:
3025 .LBB408:
3026 .LBB409:
3027 .loc 2 217 0
3028 0130 3046 mov r0, r6
3029 0132 FFF7FEFF bl strlen(PLT)
3030 .LVL327:
3031 .LBE409:
3032 .LBE408:
601:system/core/sdcard/sdcard.c **** int need_actual_name = strcmp(name, actual_name);
3033 .loc 1 601 0
3034 0136 4946 mov r1, r9
3035 .LBB411:
3036 .LBB410:
3037 .loc 2 217 0
3038 0138 0746 mov r7, r0
3039 .LVL328:
3040 .LBE410:
3041 .LBE411:
601:system/core/sdcard/sdcard.c **** int need_actual_name = strcmp(name, actual_name);
3042 .loc 1 601 0
3043 013a 3046 mov r0, r6
3044 013c FFF7FEFF bl strcmp(PLT)
3045 .LVL329:
605:system/core/sdcard/sdcard.c **** if (namelen > node->namelen) {
3046 .loc 1 605 0
3047 0140 D8F83810 ldr r1, [r8, #56]
601:system/core/sdcard/sdcard.c **** int need_actual_name = strcmp(name, actual_name);
3048 .loc 1 601 0
3049 0144 8246 mov sl, r0
3050 .LVL330:
605:system/core/sdcard/sdcard.c **** if (namelen > node->namelen) {
3051 .loc 1 605 0
3052 0146 8F42 cmp r7, r1
3053 0148 18D9 bls .L205
ARM GAS /tmp/ccMR8LsA.s page 98
3054 .LBB412:
606:system/core/sdcard/sdcard.c **** char* new_name = realloc(node->name, namelen + 1);
3055 .loc 1 606 0
3056 014a 07F1010B add fp, r7, #1
3057 .LVL331:
3058 014e D8F83C00 ldr r0, [r8, #60]
3059 .LVL332:
3060 0152 5946 mov r1, fp
3061 0154 FFF7FEFF bl realloc(PLT)
3062 .LVL333:
607:system/core/sdcard/sdcard.c **** if (!new_name) {
3063 .loc 1 607 0
3064 0158 0028 cmp r0, #0
3065 015a 64D0 beq .L206
610:system/core/sdcard/sdcard.c **** node->name = new_name;
3066 .loc 1 610 0
3067 015c C8F83C00 str r0, [r8, #60]
611:system/core/sdcard/sdcard.c **** if (need_actual_name && node->actual_name) {
3068 .loc 1 611 0
3069 0160 BAF1000F cmp sl, #0
3070 0164 1DD0 beq .L207
3071 0166 D8F84000 ldr r0, [r8, #64]
3072 .LVL334:
3073 016a 40B1 cbz r0, .L213
3074 .LBB413:
612:system/core/sdcard/sdcard.c **** char* new_actual_name = realloc(node->actual_name, namelen + 1);
3075 .loc 1 612 0
3076 016c 5946 mov r1, fp
3077 016e FFF7FEFF bl realloc(PLT)
3078 .LVL335:
613:system/core/sdcard/sdcard.c **** if (!new_actual_name) {
3079 .loc 1 613 0
3080 0172 0028 cmp r0, #0
3081 0174 57D0 beq .L206
616:system/core/sdcard/sdcard.c **** node->actual_name = new_actual_name;
3082 .loc 1 616 0
3083 0176 C8F84000 str r0, [r8, #64]
3084 017a 00E0 b .L213
3085 .LVL336:
3086 .L205:
3087 .LBE413:
3088 .LBE412:
621:system/core/sdcard/sdcard.c **** if (need_actual_name) {
3089 .loc 1 621 0
3090 017c 88B1 cbz r0, .L207
3091 .LVL337:
3092 .L213:
622:system/core/sdcard/sdcard.c **** if (!node->actual_name) {
3093 .loc 1 622 0
3094 017e D8F84020 ldr r2, [r8, #64]
3095 0182 32B1 cbz r2, .L209
3096 .L211:
3097 .LVL338:
3098 .LBB414:
3099 .LBB415:
108:bionic/libc/include/string.h **** return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
3100 .loc 2 108 0
ARM GAS /tmp/ccMR8LsA.s page 99
3101 0184 D8F84000 ldr r0, [r8, #64]
3102 0188 4946 mov r1, r9
3103 018a 7A1C adds r2, r7, #1
3104 .LVL339:
3105 018c FFF7FEFF bl memcpy(PLT)
3106 .LVL340:
3107 0190 0EE0 b .L210
3108 .LVL341:
3109 .L209:
3110 .LBE415:
3111 .LBE414:
623:system/core/sdcard/sdcard.c **** node->actual_name = malloc(namelen + 1);
3112 .loc 1 623 0
3113 0192 781C adds r0, r7, #1
3114 0194 FFF7FEFF bl malloc(PLT)
3115 .LVL342:
3116 0198 C8F84000 str r0, [r8, #64]
624:system/core/sdcard/sdcard.c **** if (!node->actual_name) {
3117 .loc 1 624 0
3118 019c 0028 cmp r0, #0
3119 019e F1D1 bne .L211
3120 01a0 41E0 b .L206
3121 .L207:
630:system/core/sdcard/sdcard.c **** free(node->actual_name);
3122 .loc 1 630 0
3123 01a2 D8F84000 ldr r0, [r8, #64]
3124 01a6 FFF7FEFF bl free(PLT)
3125 .LVL343:
631:system/core/sdcard/sdcard.c **** node->actual_name = NULL;
3126 .loc 1 631 0
3127 01aa 0020 movs r0, #0
3128 01ac C8F84000 str r0, [r8, #64]
3129 .L210:
3130 .LVL344:
3131 .LBB416:
3132 .LBB417:
108:bionic/libc/include/string.h **** return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
3133 .loc 2 108 0
3134 01b0 3146 mov r1, r6
3135 01b2 7A1C adds r2, r7, #1
3136 .LVL345:
3137 01b4 D8F83C00 ldr r0, [r8, #60]
3138 01b8 FFF7FEFF bl memcpy(PLT)
3139 .LVL346:
3140 .LBE417:
3141 .LBE416:
3142 .LBE407:
3143 .LBE406:
1148:system/core/sdcard/sdcard.c **** remove_node_from_parent_locked(child_node);
3144 .loc 1 1148 0
3145 01bc 4046 mov r0, r8
3146 .LBB419:
3147 .LBB418:
634:system/core/sdcard/sdcard.c **** node->namelen = namelen;
3148 .loc 1 634 0
3149 01be C8F83870 str r7, [r8, #56]
3150 .LBE418:
ARM GAS /tmp/ccMR8LsA.s page 100
3151 .LBE419:
1148:system/core/sdcard/sdcard.c **** remove_node_from_parent_locked(child_node);
3152 .loc 1 1148 0
3153 01c2 FFF7FEFF bl remove_node_from_parent_locked(PLT)
3154 .LVL347:
3155 .LBB420:
3156 .LBB399:
279:system/core/sdcard/sdcard.c **** node->parent = parent;
3157 .loc 1 279 0
3158 01c6 C8F83450 str r5, [r8, #52]
280:system/core/sdcard/sdcard.c **** node->next = parent->child;
3159 .loc 1 280 0
3160 01ca 2B6B ldr r3, [r5, #48]
3161 01cc C8F82C30 str r3, [r8, #44]
3162 .LBB397:
3163 .LBB395:
251:system/core/sdcard/sdcard.c **** node->refcount++;
3164 .loc 1 251 0
3165 01d0 2968 ldr r1, [r5, #0]
3166 .LBE395:
3167 .LBE397:
281:system/core/sdcard/sdcard.c **** parent->child = node;
3168 .loc 1 281 0
3169 01d2 C5F83080 str r8, [r5, #48]
3170 .LVL348:
3171 .LBB398:
3172 .LBB396:
251:system/core/sdcard/sdcard.c **** node->refcount++;
3173 .loc 1 251 0
3174 01d6 481C adds r0, r1, #1
3175 01d8 2860 str r0, [r5, #0]
3176 01da 0025 movs r5, #0
3177 .LVL349:
3178 01dc 04E0 b .L212
3179 .LVL350:
3180 .L219:
3181 .LBE396:
3182 .LBE398:
3183 .LBE399:
3184 .LBE420:
1134:system/core/sdcard/sdcard.c **** res = -ENOENT;
3185 .loc 1 1134 0
3186 01de 6FF00105 mvn r5, #1
3187 .LVL351:
3188 .L203:
1154:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
3189 .loc 1 1154 0
3190 01e2 2046 mov r0, r4
3191 01e4 FFF7FEFF bl pthread_mutex_lock(PLT)
3192 .LVL352:
3193 .L212:
1156:system/core/sdcard/sdcard.c **** release_node_locked(child_node);
3194 .loc 1 1156 0
3195 01e8 4046 mov r0, r8
3196 01ea FFF7FEFF bl release_node_locked(PLT)
3197 .LVL353:
3198 01ee 01E0 b .L197
ARM GAS /tmp/ccMR8LsA.s page 101
3199 .LVL354:
3200 .L217:
1110:system/core/sdcard/sdcard.c **** res = -EACCES;
3201 .loc 1 1110 0
3202 01f0 6FF00C05 mvn r5, #12
3203 .LVL355:
3204 .L197:
1158:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
3205 .loc 1 1158 0
3206 01f4 2046 mov r0, r4
3207 01f6 FFF7FEFF bl pthread_mutex_unlock(PLT)
3208 .LVL356:
1160:system/core/sdcard/sdcard.c **** }
3209 .loc 1 1160 0
3210 01fa 039B ldr r3, [sp, #12]
3211 01fc 0DF58042 add r2, sp, #16384
3212 0200 1432 adds r2, r2, #20
3213 0202 2846 mov r0, r5
3214 0204 1268 ldr r2, [r2, #0]
3215 0206 1968 ldr r1, [r3, #0]
3216 0208 8A42 cmp r2, r1
3217 020a 11D0 beq .L215
3218 020c 0EE0 b .L241
3219 .LVL357:
3220 .L200:
1118:system/core/sdcard/sdcard.c **** if (!child_node || get_node_path_locked(child_node,
3221 .loc 1 1118 0
3222 020e 0DF50051 add r1, sp, #8192
3223 0212 4046 mov r0, r8
3224 0214 1431 adds r1, r1, #20
3225 0216 4FF48052 mov r2, #4096
3226 021a FFF7FEFF bl get_node_path_locked(PLT)
3227 .LVL358:
3228 021e 0028 cmp r0, #0
3229 0220 BFF657AF bge .L242
3230 0224 1FE7 b .L198
3231 .LVL359:
3232 .L206:
1134:system/core/sdcard/sdcard.c **** res = -ENOENT;
3233 .loc 1 1134 0
3234 0226 6FF00B05 mvn r5, #11
3235 .LVL360:
3236 022a DDE7 b .L212
3237 .LVL361:
3238 .L241:
1160:system/core/sdcard/sdcard.c **** }
3239 .loc 1 1160 0
3240 022c FFF7FEFF bl __stack_chk_fail(PLT)
3241 .LVL362:
3242 .L215:
3243 0230 07B0 add sp, sp, #28
3244 0232 0DF5804D add sp, sp, #16384
3245 0236 BDE8F08F pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
3246 .L244:
3247 023a 00BF .align 2
3248 .L243:
3249 023c 24020000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC21+4)
ARM GAS /tmp/ccMR8LsA.s page 102
3250 0240 00000000 .word __stack_chk_guard(GOT)
3251 .cfi_endproc
3252 .LFE138:
3253 .fnend
3255 .section .text.create_node_locked,"ax",%progbits
3256 .align 1
3257 .global create_node_locked
3258 .thumb
3259 .thumb_func
3261 create_node_locked:
3262 .fnstart
3263 .LFB78:
564:system/core/sdcard/sdcard.c **** {
3264 .loc 1 564 0
3265 .cfi_startproc
3266 @ args = 0, pretend = 0, frame = 0
3267 @ frame_needed = 0, uses_anonymous_args = 0
3268 .LVL363:
3269 0000 2DE9F84F push {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
3270 .save {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}
3271 .LCFI42:
3272 .cfi_def_cfa_offset 40
3273 .cfi_offset 3, -40
3274 .cfi_offset 4, -36
3275 .cfi_offset 5, -32
3276 .cfi_offset 6, -28
3277 .cfi_offset 7, -24
3278 .cfi_offset 8, -20
3279 .cfi_offset 9, -16
3280 .cfi_offset 10, -12
3281 .cfi_offset 11, -8
3282 .cfi_offset 14, -4
564:system/core/sdcard/sdcard.c **** {
3283 .loc 1 564 0
3284 0004 0746 mov r7, r0
3285 .LBB439:
3286 .LBB440:
3287 .loc 2 217 0
3288 0006 1046 mov r0, r2
3289 .LVL364:
3290 .LBE440:
3291 .LBE439:
564:system/core/sdcard/sdcard.c **** {
3292 .loc 1 564 0
3293 0008 0D46 mov r5, r1
3294 000a 9146 mov r9, r2
3295 000c 9B46 mov fp, r3
3296 .LBB443:
3297 .LBB441:
3298 .loc 2 217 0
3299 000e FFF7FEFF bl strlen(PLT)
3300 .LVL365:
3301 .LBE441:
3302 .LBE443:
568:system/core/sdcard/sdcard.c **** node = calloc(1, sizeof(struct node));
3303 .loc 1 568 0
3304 0012 5021 movs r1, #80
ARM GAS /tmp/ccMR8LsA.s page 103
3305 .LBB444:
3306 .LBB442:
3307 .loc 2 217 0
3308 0014 8246 mov sl, r0
3309 .LBE442:
3310 .LBE444:
568:system/core/sdcard/sdcard.c **** node = calloc(1, sizeof(struct node));
3311 .loc 1 568 0
3312 0016 0120 movs r0, #1
3313 0018 FFF7FEFF bl calloc(PLT)
3314 .LVL366:
569:system/core/sdcard/sdcard.c **** if (!node) {
3315 .loc 1 569 0
3316 001c 0446 mov r4, r0
3317 001e 0028 cmp r0, #0
3318 0020 00F0F180 beq .L246
572:system/core/sdcard/sdcard.c **** node->name = malloc(namelen + 1);
3319 .loc 1 572 0
3320 0024 0AF10106 add r6, sl, #1
3321 0028 3046 mov r0, r6
3322 .LVL367:
3323 002a FFF7FEFF bl malloc(PLT)
3324 .LVL368:
3325 002e 8046 mov r8, r0
3326 0030 E063 str r0, [r4, #60]
573:system/core/sdcard/sdcard.c **** if (!node->name) {
3327 .loc 1 573 0
3328 0032 20B9 cbnz r0, .L247
574:system/core/sdcard/sdcard.c **** free(node);
3329 .loc 1 574 0
3330 0034 2046 mov r0, r4
575:system/core/sdcard/sdcard.c **** return NULL;
3331 .loc 1 575 0
3332 0036 4446 mov r4, r8
3333 .LVL369:
574:system/core/sdcard/sdcard.c **** free(node);
3334 .loc 1 574 0
3335 0038 FFF7FEFF bl free(PLT)
3336 .LVL370:
575:system/core/sdcard/sdcard.c **** return NULL;
3337 .loc 1 575 0
3338 003c E3E0 b .L246
3339 .LVL371:
3340 .L247:
3341 .LBB445:
3342 .LBB446:
108:bionic/libc/include/string.h **** return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
3343 .loc 2 108 0
3344 003e 4946 mov r1, r9
3345 0040 3246 mov r2, r6
3346 0042 FFF7FEFF bl memcpy(PLT)
3347 .LVL372:
3348 .LBE446:
3349 .LBE445:
578:system/core/sdcard/sdcard.c **** if (strcmp(name, actual_name)) {
3350 .loc 1 578 0
3351 0046 4846 mov r0, r9
ARM GAS /tmp/ccMR8LsA.s page 104
3352 0048 5946 mov r1, fp
3353 004a FFF7FEFF bl strcmp(PLT)
3354 .LVL373:
3355 004e 88B1 cbz r0, .L248
579:system/core/sdcard/sdcard.c **** node->actual_name = malloc(namelen + 1);
3356 .loc 1 579 0
3357 0050 3046 mov r0, r6
3358 0052 FFF7FEFF bl malloc(PLT)
3359 .LVL374:
3360 0056 8146 mov r9, r0
3361 .LVL375:
3362 0058 2064 str r0, [r4, #64]
580:system/core/sdcard/sdcard.c **** if (!node->actual_name) {
3363 .loc 1 580 0
3364 005a 38B9 cbnz r0, .L249
581:system/core/sdcard/sdcard.c **** free(node->name);
3365 .loc 1 581 0
3366 005c 4046 mov r0, r8
3367 005e FFF7FEFF bl free(PLT)
3368 .LVL376:
582:system/core/sdcard/sdcard.c **** free(node);
3369 .loc 1 582 0
3370 0062 2046 mov r0, r4
583:system/core/sdcard/sdcard.c **** return NULL;
3371 .loc 1 583 0
3372 0064 4C46 mov r4, r9
3373 .LVL377:
582:system/core/sdcard/sdcard.c **** free(node);
3374 .loc 1 582 0
3375 0066 FFF7FEFF bl free(PLT)
3376 .LVL378:
583:system/core/sdcard/sdcard.c **** return NULL;
3377 .loc 1 583 0
3378 006a CCE0 b .L246
3379 .LVL379:
3380 .L249:
3381 .LBB447:
3382 .LBB448:
108:bionic/libc/include/string.h **** return __builtin___memcpy_chk(dest, src, copy_amount, d_len);
3383 .loc 2 108 0
3384 006c 5946 mov r1, fp
3385 006e 3246 mov r2, r6
3386 0070 FFF7FEFF bl memcpy(PLT)
3387 .LVL380:
3388 .L248:
3389 .LBE448:
3390 .LBE447:
3391 .LBB449:
3392 .LBB450:
246:system/core/sdcard/sdcard.c **** return (__u64) (uintptr_t) ptr;
3393 .loc 1 246 0
3394 0074 0023 movs r3, #0
3395 .LBE450:
3396 .LBE449:
587:system/core/sdcard/sdcard.c **** node->namelen = namelen;
3397 .loc 1 587 0
3398 0076 C4F838A0 str sl, [r4, #56]
ARM GAS /tmp/ccMR8LsA.s page 105
3399 .LVL381:
3400 .LBB452:
3401 .LBB451:
246:system/core/sdcard/sdcard.c **** return (__u64) (uintptr_t) ptr;
3402 .loc 1 246 0
3403 007a A460 str r4, [r4, #8]
3404 007c E360 str r3, [r4, #12]
3405 .LBE451:
3406 .LBE452:
589:system/core/sdcard/sdcard.c **** node->gen = fuse->next_generation++;
3407 .loc 1 589 0
3408 007e D7ED020B fldd d16, [r7, #8] @ int
3409 0082 DFED631B fldd d17, .L300 @ int
3410 0086 C4ED040B fstd d16, [r4, #16] @ int
3411 008a 30EFA108 vadd.i64 d0, d16, d17
3412 008e 87ED020B fstd d0, [r7, #8] @ int
3413 .LVL382:
3414 .LBB453:
3415 .LBB454:
426:system/core/sdcard/sdcard.c **** node->perm = PERM_INHERIT;
3416 .loc 1 426 0
3417 0092 A361 str r3, [r4, #24]
427:system/core/sdcard/sdcard.c **** node->userid = parent->userid;
3418 .loc 1 427 0
3419 0094 E869 ldr r0, [r5, #28]
3420 0096 E061 str r0, [r4, #28]
428:system/core/sdcard/sdcard.c **** node->uid = parent->uid;
3421 .loc 1 428 0
3422 0098 296A ldr r1, [r5, #32]
3423 009a 2162 str r1, [r4, #32]
429:system/core/sdcard/sdcard.c **** node->gid = parent->gid;
3424 .loc 1 429 0
3425 009c 6A6A ldr r2, [r5, #36]
3426 009e 6262 str r2, [r4, #36]
430:system/core/sdcard/sdcard.c **** node->mode = parent->mode;
3427 .loc 1 430 0
3428 00a0 B5F828C0 ldrh ip, [r5, #40]
3429 00a4 A4F828C0 strh ip, [r4, #40] @ movhi
432:system/core/sdcard/sdcard.c **** if (fuse->derive == DERIVE_NONE) {
3430 .loc 1 432 0
3431 00a8 7B69 ldr r3, [r7, #20]
3432 00aa 002B cmp r3, #0
3433 00ac 00F0A180 beq .L251
437:system/core/sdcard/sdcard.c **** switch (parent->perm) {
3434 .loc 1 437 0
3435 00b0 A869 ldr r0, [r5, #24]
3436 00b2 421E subs r2, r0, #1
3437 00b4 052A cmp r2, #5
3438 00b6 00F29C80 bhi .L251
3439 00ba DFE802F0 tbb [pc, r2]
3440 .L257:
3441 00be 03 .byte (.L252-.L257)/2
3442 00bf 0C .byte (.L253-.L257)/2
3443 00c0 53 .byte (.L254-.L257)/2
3444 00c1 7D .byte (.L255-.L257)/2
3445 00c2 7D .byte (.L255-.L257)/2
3446 00c3 8C .byte (.L256-.L257)/2
ARM GAS /tmp/ccMR8LsA.s page 106
3447 .align 1
3448 .L252:
443:system/core/sdcard/sdcard.c **** node->perm = PERM_ROOT;
3449 .loc 1 443 0
3450 00c4 0222 movs r2, #2
444:system/core/sdcard/sdcard.c **** node->userid = strtoul(node->name, NULL, 10);
3451 .loc 1 444 0
3452 00c6 E06B ldr r0, [r4, #60]
443:system/core/sdcard/sdcard.c **** node->perm = PERM_ROOT;
3453 .loc 1 443 0
3454 00c8 A261 str r2, [r4, #24]
444:system/core/sdcard/sdcard.c **** node->userid = strtoul(node->name, NULL, 10);
3455 .loc 1 444 0
3456 00ca 0021 movs r1, #0
3457 00cc 0A22 movs r2, #10
3458 00ce FFF7FEFF bl strtoul(PLT)
3459 .LVL383:
3460 00d2 E061 str r0, [r4, #28]
3461 00d4 8DE0 b .L251
3462 .L253:
448:system/core/sdcard/sdcard.c **** node->mode = 0770;
3463 .loc 1 448 0
3464 00d6 4FF4FC76 mov r6, #504
3465 .LVL384:
449:system/core/sdcard/sdcard.c **** if (!strcasecmp(node->name, "Android")) {
3466 .loc 1 449 0
3467 00da 4F49 ldr r1, .L300+8
448:system/core/sdcard/sdcard.c **** node->mode = 0770;
3468 .loc 1 448 0
3469 00dc 2685 strh r6, [r4, #40] @ movhi
449:system/core/sdcard/sdcard.c **** if (!strcasecmp(node->name, "Android")) {
3470 .loc 1 449 0
3471 00de E66B ldr r6, [r4, #60]
3472 .LPIC22:
3473 00e0 7944 add r1, pc
3474 00e2 3046 mov r0, r6
3475 00e4 FFF7FEFF bl strcasecmp(PLT)
3476 .LVL385:
3477 00e8 08B9 cbnz r0, .L258
451:system/core/sdcard/sdcard.c **** node->perm = PERM_ANDROID;
3478 .loc 1 451 0
3479 00ea 0321 movs r1, #3
3480 00ec 42E0 b .L299
3481 .L258:
453:system/core/sdcard/sdcard.c **** } else if (fuse->split_perms) {
3482 .loc 1 453 0
3483 00ee 3B7E ldrb r3, [r7, #24] @ zero_extendqisi2
3484 00f0 002B cmp r3, #0
3485 00f2 7ED0 beq .L251
454:system/core/sdcard/sdcard.c **** if (!strcasecmp(node->name, "DCIM")
3486 .loc 1 454 0
3487 00f4 4949 ldr r1, .L300+12
3488 00f6 3046 mov r0, r6
3489 .LPIC23:
3490 00f8 7944 add r1, pc
3491 00fa FFF7FEFF bl strcasecmp(PLT)
3492 .LVL386:
ARM GAS /tmp/ccMR8LsA.s page 107
3493 00fe 28B1 cbz r0, .L260
455:system/core/sdcard/sdcard.c **** || !strcasecmp(node->name, "Pictures")) {
3494 .loc 1 455 0
3495 0100 4749 ldr r1, .L300+16
3496 0102 3046 mov r0, r6
3497 .LPIC24:
3498 0104 7944 add r1, pc
3499 0106 FFF7FEFF bl strcasecmp(PLT)
3500 .LVL387:
3501 010a 10B9 cbnz r0, .L261
3502 .L260:
456:system/core/sdcard/sdcard.c **** node->gid = AID_SDCARD_PICS;
3503 .loc 1 456 0
3504 010c 40F20940 movw r0, #1033
3505 0110 26E0 b .L298
3506 .L261:
457:system/core/sdcard/sdcard.c **** } else if (!strcasecmp(node->name, "Alarms")
3507 .loc 1 457 0
3508 0112 4449 ldr r1, .L300+20
3509 0114 3046 mov r0, r6
3510 .LPIC25:
3511 0116 7944 add r1, pc
3512 0118 FFF7FEFF bl strcasecmp(PLT)
3513 .LVL388:
3514 011c F0B1 cbz r0, .L262
458:system/core/sdcard/sdcard.c **** || !strcasecmp(node->name, "Movies")
3515 .loc 1 458 0
3516 011e 4249 ldr r1, .L300+24
3517 0120 3046 mov r0, r6
3518 .LPIC26:
3519 0122 7944 add r1, pc
3520 0124 FFF7FEFF bl strcasecmp(PLT)
3521 .LVL389:
3522 0128 C0B1 cbz r0, .L262
459:system/core/sdcard/sdcard.c **** || !strcasecmp(node->name, "Music")
3523 .loc 1 459 0
3524 012a 4049 ldr r1, .L300+28
3525 012c 3046 mov r0, r6
3526 .LPIC27:
3527 012e 7944 add r1, pc
3528 0130 FFF7FEFF bl strcasecmp(PLT)
3529 .LVL390:
3530 0134 90B1 cbz r0, .L262
460:system/core/sdcard/sdcard.c **** || !strcasecmp(node->name, "Notifications")
3531 .loc 1 460 0
3532 0136 3E49 ldr r1, .L300+32
3533 0138 3046 mov r0, r6
3534 .LPIC28:
3535 013a 7944 add r1, pc
3536 013c FFF7FEFF bl strcasecmp(PLT)
3537 .LVL391:
3538 0140 60B1 cbz r0, .L262
461:system/core/sdcard/sdcard.c **** || !strcasecmp(node->name, "Podcasts")
3539 .loc 1 461 0
3540 0142 3C49 ldr r1, .L300+36
3541 0144 3046 mov r0, r6
3542 .LPIC29:
ARM GAS /tmp/ccMR8LsA.s page 108
3543 0146 7944 add r1, pc
3544 0148 FFF7FEFF bl strcasecmp(PLT)
3545 .LVL392:
3546 014c 30B1 cbz r0, .L262
462:system/core/sdcard/sdcard.c **** || !strcasecmp(node->name, "Ringtones")) {
3547 .loc 1 462 0
3548 014e 3A49 ldr r1, .L300+40
3549 0150 3046 mov r0, r6
3550 .LPIC30:
3551 0152 7944 add r1, pc
3552 0154 FFF7FEFF bl strcasecmp(PLT)
3553 .LVL393:
3554 0158 0028 cmp r0, #0
3555 015a 4AD1 bne .L251
3556 .L262:
463:system/core/sdcard/sdcard.c **** node->gid = AID_SDCARD_AV;
3557 .loc 1 463 0
3558 015c 40F20A40 movw r0, #1034
3559 .L298:
3560 0160 6062 str r0, [r4, #36]
3561 0162 46E0 b .L251
3562 .LVL394:
3563 .L254:
468:system/core/sdcard/sdcard.c **** if (!strcasecmp(node->name, "data")) {
3564 .loc 1 468 0
3565 0164 E66B ldr r6, [r4, #60]
3566 .LVL395:
3567 0166 3549 ldr r1, .L300+44
3568 0168 3046 mov r0, r6
3569 .LPIC31:
3570 016a 7944 add r1, pc
3571 016c FFF7FEFF bl strcasecmp(PLT)
3572 .LVL396:
3573 0170 10B9 cbnz r0, .L263
470:system/core/sdcard/sdcard.c **** node->perm = PERM_ANDROID_DATA;
3574 .loc 1 470 0
3575 0172 0421 movs r1, #4
3576 .L299:
3577 0174 A161 str r1, [r4, #24]
3578 0176 39E0 b .L297
3579 .L263:
472:system/core/sdcard/sdcard.c **** } else if (!strcasecmp(node->name, "obb")) {
3580 .loc 1 472 0
3581 0178 3149 ldr r1, .L300+48
3582 017a 3046 mov r0, r6
3583 .LPIC32:
3584 017c 7944 add r1, pc
3585 017e FFF7FEFF bl strcasecmp(PLT)
3586 .LVL397:
3587 0182 68B9 cbnz r0, .L264
474:system/core/sdcard/sdcard.c **** node->perm = PERM_ANDROID_OBB;
3588 .loc 1 474 0
3589 0184 0520 movs r0, #5
3590 .LBB455:
3591 .LBB456:
218:bionic/libc/include/string.h **** }
219:bionic/libc/include/string.h ****
ARM GAS /tmp/ccMR8LsA.s page 109
220:bionic/libc/include/string.h **** size_t slen = __builtin_strlen(s);
221:bionic/libc/include/string.h **** if (__builtin_constant_p(slen)) {
222:bionic/libc/include/string.h **** return slen;
223:bionic/libc/include/string.h **** }
224:bionic/libc/include/string.h **** #endif /* !defined(__clang__) */
225:bionic/libc/include/string.h ****
226:bionic/libc/include/string.h **** return __strlen_chk(s, bos);
3592 .loc 2 226 0
3593 0186 4FF48051 mov r1, #4096
3594 .LBE456:
3595 .LBE455:
475:system/core/sdcard/sdcard.c **** node->mode = 0771;
3596 .loc 1 475 0
3597 018a 00F5FA72 add r2, r0, #500
474:system/core/sdcard/sdcard.c **** node->perm = PERM_ANDROID_OBB;
3598 .loc 1 474 0
3599 018e A061 str r0, [r4, #24]
477:system/core/sdcard/sdcard.c **** node->graft_path = fuse->obbpath;
3600 .loc 1 477 0
3601 0190 07F17000 add r0, r7, #112
475:system/core/sdcard/sdcard.c **** node->mode = 0771;
3602 .loc 1 475 0
3603 0194 2285 strh r2, [r4, #40] @ movhi
477:system/core/sdcard/sdcard.c **** node->graft_path = fuse->obbpath;
3604 .loc 1 477 0
3605 0196 6064 str r0, [r4, #68]
3606 .LVL398:
3607 .LBB458:
3608 .LBB457:
3609 .loc 2 226 0
3610 0198 FFF7FEFF bl __strlen_chk(PLT)
3611 .LVL399:
3612 .LBE457:
3613 .LBE458:
478:system/core/sdcard/sdcard.c **** node->graft_pathlen = strlen(fuse->obbpath);
3614 .loc 1 478 0
3615 019c A064 str r0, [r4, #72]
3616 019e 28E0 b .L251
3617 .LVL400:
3618 .L264:
479:system/core/sdcard/sdcard.c **** } else if (!strcasecmp(node->name, "user")) {
3619 .loc 1 479 0
3620 01a0 2849 ldr r1, .L300+52
3621 01a2 3046 mov r0, r6
3622 .LPIC33:
3623 01a4 7944 add r1, pc
3624 01a6 FFF7FEFF bl strcasecmp(PLT)
3625 .LVL401:
3626 01aa 10BB cbnz r0, .L251
483:system/core/sdcard/sdcard.c **** node->perm = PERM_ANDROID_USER;
3627 .loc 1 483 0
3628 01ac 0621 movs r1, #6
484:system/core/sdcard/sdcard.c **** node->gid = AID_SDCARD_ALL;
3629 .loc 1 484 0
3630 01ae 40F20B43 movw r3, #1035
483:system/core/sdcard/sdcard.c **** node->perm = PERM_ANDROID_USER;
3631 .loc 1 483 0
ARM GAS /tmp/ccMR8LsA.s page 110
3632 01b2 A161 str r1, [r4, #24]
484:system/core/sdcard/sdcard.c **** node->gid = AID_SDCARD_ALL;
3633 .loc 1 484 0
3634 01b4 6362 str r3, [r4, #36]
3635 01b6 0BE0 b .L265
3636 .LVL402:
3637 .L255:
490:system/core/sdcard/sdcard.c **** appid = (appid_t) hashmapGet(fuse->package_to_appid, node->name);
3638 .loc 1 490 0
3639 01b8 07F58357 add r7, r7, #4192
3640 .LVL403:
3641 01bc E16B ldr r1, [r4, #60]
3642 01be 3869 ldr r0, [r7, #16]
3643 01c0 FFF7FEFF bl hashmapGet(PLT)
3644 .LVL404:
491:system/core/sdcard/sdcard.c **** if (appid != 0) {
3645 .loc 1 491 0
3646 01c4 0146 mov r1, r0
3647 01c6 18B1 cbz r0, .L265
492:system/core/sdcard/sdcard.c **** node->uid = multiuser_get_uid(parent->userid, appid);
3648 .loc 1 492 0
3649 01c8 E869 ldr r0, [r5, #28]
3650 .LVL405:
3651 01ca FFF7FEFF bl multiuser_get_uid(PLT)
3652 .LVL406:
3653 01ce 2062 str r0, [r4, #32]
3654 .LVL407:
3655 .L265:
494:system/core/sdcard/sdcard.c **** node->mode = 0770;
3656 .loc 1 494 0
3657 01d0 4FF4FC70 mov r0, #504
3658 01d4 0CE0 b .L296
3659 .LVL408:
3660 .L256:
498:system/core/sdcard/sdcard.c **** node->perm = PERM_ROOT;
3661 .loc 1 498 0
3662 01d6 0221 movs r1, #2
499:system/core/sdcard/sdcard.c **** node->userid = strtoul(node->name, NULL, 10);
3663 .loc 1 499 0
3664 01d8 E06B ldr r0, [r4, #60]
498:system/core/sdcard/sdcard.c **** node->perm = PERM_ROOT;
3665 .loc 1 498 0
3666 01da A161 str r1, [r4, #24]
499:system/core/sdcard/sdcard.c **** node->userid = strtoul(node->name, NULL, 10);
3667 .loc 1 499 0
3668 01dc 0A22 movs r2, #10
3669 01de 0021 movs r1, #0
3670 01e0 FFF7FEFF bl strtoul(PLT)
3671 .LVL409:
500:system/core/sdcard/sdcard.c **** node->gid = AID_SDCARD_R;
3672 .loc 1 500 0
3673 01e4 40F20443 movw r3, #1028
499:system/core/sdcard/sdcard.c **** node->userid = strtoul(node->name, NULL, 10);
3674 .loc 1 499 0
3675 01e8 E061 str r0, [r4, #28]
500:system/core/sdcard/sdcard.c **** node->gid = AID_SDCARD_R;
3676 .loc 1 500 0
ARM GAS /tmp/ccMR8LsA.s page 111
3677 01ea 6362 str r3, [r4, #36]
3678 .LVL410:
3679 .L297:
501:system/core/sdcard/sdcard.c **** node->mode = 0771;
3680 .loc 1 501 0
3681 01ec 40F2F910 movw r0, #505
3682 .LVL411:
3683 .L296:
3684 01f0 2085 strh r0, [r4, #40] @ movhi
3685 .L251:
3686 .LVL412:
3687 .LBE454:
3688 .LBE453:
3689 .LBB459:
3690 .LBB460:
251:system/core/sdcard/sdcard.c **** node->refcount++;
3691 .loc 1 251 0
3692 01f2 2268 ldr r2, [r4, #0]
3693 .LBE460:
3694 .LBE459:
3695 .LBB462:
3696 .LBB463:
279:system/core/sdcard/sdcard.c **** node->parent = parent;
3697 .loc 1 279 0
3698 01f4 6563 str r5, [r4, #52]
3699 .LBE463:
3700 .LBE462:
3701 .LBB469:
3702 .LBB461:
251:system/core/sdcard/sdcard.c **** node->refcount++;
3703 .loc 1 251 0
3704 01f6 511C adds r1, r2, #1
3705 01f8 2160 str r1, [r4, #0]
3706 .LVL413:
3707 .LBE461:
3708 .LBE469:
3709 .LBB470:
3710 .LBB468:
280:system/core/sdcard/sdcard.c **** node->next = parent->child;
3711 .loc 1 280 0
3712 01fa 2B6B ldr r3, [r5, #48]
3713 01fc E362 str r3, [r4, #44]
3714 .LBB464:
3715 .LBB465:
251:system/core/sdcard/sdcard.c **** node->refcount++;
3716 .loc 1 251 0
3717 01fe 2868 ldr r0, [r5, #0]
3718 .LBE465:
3719 .LBE464:
281:system/core/sdcard/sdcard.c **** parent->child = node;
3720 .loc 1 281 0
3721 0200 2C63 str r4, [r5, #48]
3722 .LVL414:
3723 .LBB467:
3724 .LBB466:
251:system/core/sdcard/sdcard.c **** node->refcount++;
3725 .loc 1 251 0
ARM GAS /tmp/ccMR8LsA.s page 112
3726 0202 421C adds r2, r0, #1
3727 0204 2A60 str r2, [r5, #0]
3728 .LVL415:
3729 .L246:
3730 .LBE466:
3731 .LBE467:
3732 .LBE468:
3733 .LBE470:
595:system/core/sdcard/sdcard.c **** }
3734 .loc 1 595 0
3735 0206 2046 mov r0, r4
3736 0208 BDE8F88F pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
3737 .L301:
3738 020c AFF30080 .align 3
3739 .L300:
3740 0210 01000000 .word 1
3741 0214 00000000 .word 0
3742 0218 34010000 .word .LC8-(.LPIC22+4)
3743 021c 20010000 .word .LC9-(.LPIC23+4)
3744 0220 18010000 .word .LC10-(.LPIC24+4)
3745 0224 0A010000 .word .LC11-(.LPIC25+4)
3746 0228 02010000 .word .LC12-(.LPIC26+4)
3747 022c FA000000 .word .LC13-(.LPIC27+4)
3748 0230 F2000000 .word .LC14-(.LPIC28+4)
3749 0234 EA000000 .word .LC15-(.LPIC29+4)
3750 0238 E2000000 .word .LC16-(.LPIC30+4)
3751 023c CE000000 .word .LC17-(.LPIC31+4)
3752 0240 C0000000 .word .LC18-(.LPIC32+4)
3753 0244 9C000000 .word .LC19-(.LPIC33+4)
3754 .cfi_endproc
3755 .LFE78:
3756 .fnend
3758 .section .text.fuse_reply_entry,"ax",%progbits
3759 .align 1
3760 .thumb
3761 .thumb_func
3763 fuse_reply_entry:
3764 .fnstart
3765 .LFB87:
769:system/core/sdcard/sdcard.c **** {
3766 .loc 1 769 0
3767 .cfi_startproc
3768 @ args = 16, pretend = 0, frame = 232
3769 @ frame_needed = 0, uses_anonymous_args = 0
3770 .LVL416:
3771 0000 2DE9F045 push {r4, r5, r6, r7, r8, sl, lr}
3772 .save {r4, r5, r6, r7, r8, sl, lr}
3773 .LCFI43:
3774 .cfi_def_cfa_offset 28
3775 .cfi_offset 4, -28
3776 .cfi_offset 5, -24
3777 .cfi_offset 6, -20
3778 .cfi_offset 7, -16
3779 .cfi_offset 8, -12
3780 .cfi_offset 10, -8
3781 .cfi_offset 14, -4
3782 0004 8046 mov r8, r0
ARM GAS /tmp/ccMR8LsA.s page 113
3783 0006 2DED028B fstmfdd sp!, {d8}
3784 .vsave {d8}
3785 .LCFI44:
3786 .cfi_def_cfa_offset 36
3787 .cfi_offset 80, -36
3788 .pad #244
3789 000a BDB0 sub sp, sp, #244
3790 .LCFI45:
3791 .cfi_def_cfa_offset 280
774:system/core/sdcard/sdcard.c **** if (lstat(path, &s) < 0) {
3792 .loc 1 774 0
3793 000c 02A9 add r1, sp, #8
3794 000e 4998 ldr r0, [sp, #292]
3795 .LVL417:
769:system/core/sdcard/sdcard.c **** {
3796 .loc 1 769 0
3797 0010 43EC182B fmdrr d8, r2, r3 @ int
3798 0014 469D ldr r5, [sp, #280]
3799 0016 479C ldr r4, [sp, #284]
774:system/core/sdcard/sdcard.c **** if (lstat(path, &s) < 0) {
3800 .loc 1 774 0
3801 0018 FFF7FEFF bl lstat(PLT)
3802 .LVL418:
3803 001c 0028 cmp r0, #0
3804 001e 04DA bge .L303
775:system/core/sdcard/sdcard.c **** return -errno;
3805 .loc 1 775 0
3806 0020 FFF7FEFF bl __errno(PLT)
3807 .LVL419:
3808 0024 0168 ldr r1, [r0, #0]
3809 0026 4842 negs r0, r1
3810 0028 78E0 b .L311
3811 .L303:
778:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
3812 .loc 1 778 0
3813 002a 4046 mov r0, r8
3814 002c FFF7FEFF bl pthread_mutex_lock(PLT)
3815 .LVL420:
3816 .LBB481:
3817 .LBB482:
3818 .LBB483:
3819 .LBB484:
659:system/core/sdcard/sdcard.c **** for (node = node->child; node; node = node->next) {
3820 .loc 1 659 0
3821 0030 2E6B ldr r6, [r5, #48]
3822 .LVL421:
3823 0032 06E0 b .L305
3824 .L307:
664:system/core/sdcard/sdcard.c **** if (!strcmp(name, node->name)) {
3825 .loc 1 664 0
3826 0034 2046 mov r0, r4
3827 0036 F16B ldr r1, [r6, #60]
3828 0038 FFF7FEFF bl strcmp(PLT)
3829 .LVL422:
3830 003c 0028 cmp r0, #0
3831 003e 5FD0 beq .L306
659:system/core/sdcard/sdcard.c **** for (node = node->child; node; node = node->next) {
ARM GAS /tmp/ccMR8LsA.s page 114
3832 .loc 1 659 0
3833 0040 F66A ldr r6, [r6, #44]
3834 .LVL423:
3835 .L305:
3836 0042 002E cmp r6, #0
3837 0044 F6D1 bne .L307
3838 0046 5FE0 b .L312
3839 .LVL424:
3840 .L310:
3841 .LBE484:
3842 .LBE483:
3843 .LBE482:
3844 .LBE481:
781:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
3845 .loc 1 781 0
3846 0048 4046 mov r0, r8
3847 .LVL425:
3848 004a FFF7FEFF bl pthread_mutex_unlock(PLT)
3849 .LVL426:
782:system/core/sdcard/sdcard.c **** return -ENOMEM;
3850 .loc 1 782 0
3851 004e 6FF00B00 mvn r0, #11
3852 0052 63E0 b .L311
3853 .LVL427:
3854 .L309:
3855 .LBB488:
3856 .LBB489:
784:system/core/sdcard/sdcard.c **** memset(&out, 0, sizeof(out));
3857 .loc 1 784 0
3858 0054 0DF1700A add sl, sp, #112
3859 .LVL428:
144:bionic/libc/include/string.h **** return __builtin___memset_chk(s, c, n, __builtin_object_size (s, 0));
3860 .loc 2 144 0
3861 0058 8027 movs r7, #128
3862 005a 0021 movs r1, #0
3863 005c 3A46 mov r2, r7
3864 005e 5046 mov r0, sl
3865 0060 FFF7FEFF bl memset(PLT)
3866 .LVL429:
3867 .LBE489:
3868 .LBE488:
3869 .LBB490:
3870 .LBB491:
385:system/core/sdcard/sdcard.c **** attr->ino = node->nid;
3871 .loc 1 385 0
3872 0064 D6E90223 ldrd r2, [r6, #8]
386:system/core/sdcard/sdcard.c **** attr->size = s->st_size;
3873 .loc 1 386 0
3874 0068 DDE90E45 ldrd r4, [sp, #56]
3875 .LVL430:
387:system/core/sdcard/sdcard.c **** attr->blocks = s->st_blocks;
3876 .loc 1 387 0
3877 006c DDE91201 ldrd r0, [sp, #72]
385:system/core/sdcard/sdcard.c **** attr->ino = node->nid;
3878 .loc 1 385 0
3879 0070 CDE92623 strd r2, [sp, #152]
386:system/core/sdcard/sdcard.c **** attr->size = s->st_size;
ARM GAS /tmp/ccMR8LsA.s page 115
3880 .loc 1 386 0
3881 0074 CDE92845 strd r4, [sp, #160]
389:system/core/sdcard/sdcard.c **** attr->mtime = s->st_mtime;
3882 .loc 1 389 0
3883 0078 169B ldr r3, [sp, #88]
388:system/core/sdcard/sdcard.c **** attr->atime = s->st_atime;
3884 .loc 1 388 0
3885 007a 149D ldr r5, [sp, #80]
3886 .LVL431:
387:system/core/sdcard/sdcard.c **** attr->blocks = s->st_blocks;
3887 .loc 1 387 0
3888 007c CDE92A01 strd r0, [sp, #168]
388:system/core/sdcard/sdcard.c **** attr->atime = s->st_atime;
3889 .loc 1 388 0
3890 0080 0021 movs r1, #0
3891 0082 2D91 str r1, [sp, #180]
3892 0084 2C95 str r5, [sp, #176]
389:system/core/sdcard/sdcard.c **** attr->mtime = s->st_mtime;
3893 .loc 1 389 0
3894 0086 2E93 str r3, [sp, #184]
3895 0088 2F91 str r1, [sp, #188]
390:system/core/sdcard/sdcard.c **** attr->ctime = s->st_ctime;
3896 .loc 1 390 0
3897 008a 3191 str r1, [sp, #196]
394:system/core/sdcard/sdcard.c **** attr->mode = s->st_mode;
3898 .loc 1 394 0
3899 008c 069D ldr r5, [sp, #24]
390:system/core/sdcard/sdcard.c **** attr->ctime = s->st_ctime;
3900 .loc 1 390 0
3901 008e 189A ldr r2, [sp, #96]
391:system/core/sdcard/sdcard.c **** attr->atimensec = s->st_atime_nsec;
3902 .loc 1 391 0
3903 0090 159C ldr r4, [sp, #84]
392:system/core/sdcard/sdcard.c **** attr->mtimensec = s->st_mtime_nsec;
3904 .loc 1 392 0
3905 0092 1798 ldr r0, [sp, #92]
393:system/core/sdcard/sdcard.c **** attr->ctimensec = s->st_ctime_nsec;
3906 .loc 1 393 0
3907 0094 1999 ldr r1, [sp, #100]
395:system/core/sdcard/sdcard.c **** attr->nlink = s->st_nlink;
3908 .loc 1 395 0
3909 0096 079B ldr r3, [sp, #28]
394:system/core/sdcard/sdcard.c **** attr->mode = s->st_mode;
3910 .loc 1 394 0
3911 0098 3595 str r5, [sp, #212]
392:system/core/sdcard/sdcard.c **** attr->mtimensec = s->st_mtime_nsec;
3912 .loc 1 392 0
3913 009a 3390 str r0, [sp, #204]
3914 .LBE491:
402:system/core/sdcard/sdcard.c **** int owner_mode = s->st_mode & 0700;
3915 .loc 1 402 0
3916 009c 05F4E070 and r0, r5, #448
3917 .LVL432:
3918 .LBB492:
393:system/core/sdcard/sdcard.c **** attr->ctimensec = s->st_ctime_nsec;
3919 .loc 1 393 0
3920 00a0 3491 str r1, [sp, #208]
ARM GAS /tmp/ccMR8LsA.s page 116
403:system/core/sdcard/sdcard.c **** int filtered_mode = node->mode & (owner_mode | (owner_mode >> 3) | (owner_mode >> 6));
3921 .loc 1 403 0
3922 00a2 8111 asrs r1, r0, #6
395:system/core/sdcard/sdcard.c **** attr->nlink = s->st_nlink;
3923 .loc 1 395 0
3924 00a4 3693 str r3, [sp, #216]
404:system/core/sdcard/sdcard.c **** attr->mode = (attr->mode & S_IFMT) | filtered_mode;
3925 .loc 1 404 0
3926 00a6 05F47045 and r5, r5, #61440
390:system/core/sdcard/sdcard.c **** attr->ctime = s->st_ctime;
3927 .loc 1 390 0
3928 00aa 3092 str r2, [sp, #192]
403:system/core/sdcard/sdcard.c **** int filtered_mode = node->mode & (owner_mode | (owner_mode >> 3) | (owner_mode >> 6));
3929 .loc 1 403 0
3930 00ac 41EAD003 orr r3, r1, r0, lsr #3
391:system/core/sdcard/sdcard.c **** attr->atimensec = s->st_atime_nsec;
3931 .loc 1 391 0
3932 00b0 3294 str r4, [sp, #200]
397:system/core/sdcard/sdcard.c **** attr->uid = node->uid;
3933 .loc 1 397 0
3934 00b2 326A ldr r2, [r6, #32]
403:system/core/sdcard/sdcard.c **** int filtered_mode = node->mode & (owner_mode | (owner_mode >> 3) | (owner_mode >> 6));
3935 .loc 1 403 0
3936 00b4 43EA000C orr ip, r3, r0
397:system/core/sdcard/sdcard.c **** attr->uid = node->uid;
3937 .loc 1 397 0
3938 00b8 3792 str r2, [sp, #220]
398:system/core/sdcard/sdcard.c **** attr->gid = node->gid;
3939 .loc 1 398 0
3940 00ba 746A ldr r4, [r6, #36]
3941 00bc 3894 str r4, [sp, #224]
403:system/core/sdcard/sdcard.c **** int filtered_mode = node->mode & (owner_mode | (owner_mode >> 3) | (owner_mode >> 6));
3942 .loc 1 403 0
3943 00be 328D ldrh r2, [r6, #40]
3944 00c0 0CEA0204 and r4, ip, r2
404:system/core/sdcard/sdcard.c **** attr->mode = (attr->mode & S_IFMT) | filtered_mode;
3945 .loc 1 404 0
3946 00c4 44EA0500 orr r0, r4, r5
3947 .LVL433:
3948 .LBE492:
3949 .LBE490:
786:system/core/sdcard/sdcard.c **** out.attr_valid = 10;
3950 .loc 1 786 0
3951 00c8 0A24 movs r4, #10
3952 00ca 0025 movs r5, #0
3953 .LBB494:
3954 .LBB493:
404:system/core/sdcard/sdcard.c **** attr->mode = (attr->mode & S_IFMT) | filtered_mode;
3955 .loc 1 404 0
3956 00cc 3590 str r0, [sp, #212]
3957 .LBE493:
3958 .LBE494:
786:system/core/sdcard/sdcard.c **** out.attr_valid = 10;
3959 .loc 1 786 0
3960 00ce CDE92245 strd r4, [sp, #136]
790:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
3961 .loc 1 790 0
ARM GAS /tmp/ccMR8LsA.s page 117
3962 00d2 4046 mov r0, r8
787:system/core/sdcard/sdcard.c **** out.entry_valid = 10;
3963 .loc 1 787 0
3964 00d4 CDE92045 strd r4, [sp, #128]
788:system/core/sdcard/sdcard.c **** out.nodeid = node->nid;
3965 .loc 1 788 0
3966 00d8 D6E90223 ldrd r2, [r6, #8]
3967 00dc CDE91C23 strd r2, [sp, #112]
789:system/core/sdcard/sdcard.c **** out.generation = node->gen;
3968 .loc 1 789 0
3969 00e0 D6E90445 ldrd r4, [r6, #16]
3970 00e4 CDE91E45 strd r4, [sp, #120]
790:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
3971 .loc 1 790 0
3972 00e8 FFF7FEFF bl pthread_mutex_unlock(PLT)
3973 .LVL434:
791:system/core/sdcard/sdcard.c **** fuse_reply(fuse, unique, &out, sizeof(out));
3974 .loc 1 791 0
3975 00ec 4046 mov r0, r8
3976 00ee CDF800A0 str sl, [sp, #0]
3977 00f2 0197 str r7, [sp, #4]
3978 00f4 53EC182B fmrrd r2, r3, d8 @ int
3979 00f8 FFF7FEFF bl fuse_reply(PLT)
3980 .LVL435:
792:system/core/sdcard/sdcard.c **** return NO_STATUS;
3981 .loc 1 792 0
3982 00fc 0120 movs r0, #1
3983 00fe 0DE0 b .L311
3984 .LVL436:
3985 .L306:
3986 .LBB495:
3987 .LBB487:
3988 .LBB485:
3989 .LBB486:
251:system/core/sdcard/sdcard.c **** node->refcount++;
3990 .loc 1 251 0
3991 0100 3368 ldr r3, [r6, #0]
3992 0102 581C adds r0, r3, #1
3993 0104 3060 str r0, [r6, #0]
3994 0106 A5E7 b .L309
3995 .L312:
3996 .LBE486:
3997 .LBE485:
679:system/core/sdcard/sdcard.c **** child = create_node_locked(fuse, parent, name, actual_name);
3998 .loc 1 679 0
3999 0108 4046 mov r0, r8
4000 010a 2946 mov r1, r5
4001 010c 2246 mov r2, r4
4002 010e 489B ldr r3, [sp, #288]
4003 0110 FFF7FEFF bl create_node_locked(PLT)
4004 .LVL437:
4005 .LBE487:
4006 .LBE495:
780:system/core/sdcard/sdcard.c **** if (!node) {
4007 .loc 1 780 0
4008 0114 0646 mov r6, r0
4009 .LVL438:
ARM GAS /tmp/ccMR8LsA.s page 118
4010 0116 0028 cmp r0, #0
4011 0118 9CD1 bne .L309
4012 011a 95E7 b .L310
4013 .LVL439:
4014 .L311:
793:system/core/sdcard/sdcard.c **** }
4015 .loc 1 793 0
4016 011c 3DB0 add sp, sp, #244
4017 011e BDEC028B fldmfdd sp!, {d8}
4018 0122 BDE8F085 pop {r4, r5, r6, r7, r8, sl, pc}
4019 .cfi_endproc
4020 .LFE87:
4021 .fnend
4023 .section .text.handle_lookup.isra.22,"ax",%progbits
4024 .align 1
4025 .thumb
4026 .thumb_func
4028 handle_lookup.isra.22:
4029 .fnstart
4030 .LFB143:
811:system/core/sdcard/sdcard.c **** static int handle_lookup(struct fuse* fuse, struct fuse_handler* handler,
4031 .loc 1 811 0
4032 .cfi_startproc
4033 @ args = 0, pretend = 0, frame = 8200
4034 @ frame_needed = 0, uses_anonymous_args = 0
4035 .LVL440:
4036 0000 2D4B ldr r3, .L322
4037 0002 2DE9F047 push {r4, r5, r6, r7, r8, r9, sl, lr}
4038 .save {r4, r5, r6, r7, r8, r9, sl, lr}
4039 .LCFI46:
4040 .cfi_def_cfa_offset 32
4041 .cfi_offset 4, -32
4042 .cfi_offset 5, -28
4043 .cfi_offset 6, -24
4044 .cfi_offset 7, -20
4045 .cfi_offset 8, -16
4046 .cfi_offset 9, -12
4047 .cfi_offset 10, -8
4048 .cfi_offset 14, -4
4049 0006 1546 mov r5, r2
4050 0008 2C4A ldr r2, .L322+4
4051 .LVL441:
4052 .pad #8192
4053 000a ADF5005D sub sp, sp, #8192
4054 .LCFI47:
4055 .cfi_def_cfa_offset 8224
4056 .LPIC34:
4057 000e 7B44 add r3, pc
4058 .pad #24
4059 0010 86B0 sub sp, sp, #24
4060 .LCFI48:
4061 .cfi_def_cfa_offset 8248
811:system/core/sdcard/sdcard.c **** static int handle_lookup(struct fuse* fuse, struct fuse_handler* handler,
4062 .loc 1 811 0
4063 0012 0F46 mov r7, r1
4064 0014 0DF50051 add r1, sp, #8192
4065 .LVL442:
ARM GAS /tmp/ccMR8LsA.s page 119
4066 0018 53F80280 ldr r8, [r3, r2]
4067 001c 0446 mov r4, r0
4068 001e 1431 adds r1, r1, #20
821:system/core/sdcard/sdcard.c **** parent_path, sizeof(parent_path));
4069 .loc 1 821 0
4070 0020 0DF1140A add sl, sp, #20
811:system/core/sdcard/sdcard.c **** static int handle_lookup(struct fuse* fuse, struct fuse_handler* handler,
4071 .loc 1 811 0
4072 0024 D8F80030 ldr r3, [r8, #0]
4073 0028 0B60 str r3, [r1, #0]
4074 .LVL443:
819:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
4075 .loc 1 819 0
4076 002a FFF7FEFF bl pthread_mutex_lock(PLT)
4077 .LVL444:
820:system/core/sdcard/sdcard.c **** parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
4078 .loc 1 820 0
4079 002e D7E90423 ldrd r2, [r7, #16]
4080 0032 2046 mov r0, r4
4081 0034 CDF800A0 str sl, [sp, #0]
4082 0038 FFF7FEFF bl lookup_node_and_path_by_id_locked.constprop.28(PLT)
4083 .LVL445:
4084 003c 0646 mov r6, r0
4085 .LVL446:
824:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
4086 .loc 1 824 0
4087 003e 2046 mov r0, r4
4088 .LVL447:
4089 0040 FFF7FEFF bl pthread_mutex_unlock(PLT)
4090 .LVL448:
826:system/core/sdcard/sdcard.c **** if (!parent_node || !(actual_name = find_file_within(parent_path, name,
4091 .loc 1 826 0
4092 0044 16B9 cbnz r6, .L314
4093 .L316:
828:system/core/sdcard/sdcard.c **** return -ENOENT;
4094 .loc 1 828 0
4095 0046 6FF00100 mvn r0, #1
4096 004a 25E0 b .L315
4097 .L314:
827:system/core/sdcard/sdcard.c **** child_path, sizeof(child_path), 1))) {
4098 .loc 1 827 0
4099 004c 0DF58059 add r9, sp, #4096
826:system/core/sdcard/sdcard.c **** if (!parent_node || !(actual_name = find_file_within(parent_path, name,
4100 .loc 1 826 0
4101 0050 5046 mov r0, sl
827:system/core/sdcard/sdcard.c **** child_path, sizeof(child_path), 1))) {
4102 .loc 1 827 0
4103 0052 09F11409 add r9, r9, #20
826:system/core/sdcard/sdcard.c **** if (!parent_node || !(actual_name = find_file_within(parent_path, name,
4104 .loc 1 826 0
4105 0056 2946 mov r1, r5
4106 0058 4A46 mov r2, r9
4107 005a 0123 movs r3, #1
4108 005c FFF7FEFF bl find_file_within.constprop.27(PLT)
4109 .LVL449:
4110 0060 8246 mov sl, r0
4111 0062 0028 cmp r0, #0
ARM GAS /tmp/ccMR8LsA.s page 120
4112 0064 EFD0 beq .L316
830:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, parent_node, name, R_OK, false)) {
4113 .loc 1 830 0
4114 0066 0422 movs r2, #4
4115 0068 0023 movs r3, #0
4116 006a 8DE80C00 stmia sp, {r2, r3}
4117 006e 2046 mov r0, r4
4118 .LVL450:
4119 0070 3946 mov r1, r7
4120 0072 3246 mov r2, r6
4121 0074 2B46 mov r3, r5
4122 0076 FFF7FEFF bl check_caller_access_to_name(PLT)
4123 .LVL451:
4124 007a 58B1 cbz r0, .L318
834:system/core/sdcard/sdcard.c **** return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path);
4125 .loc 1 834 0
4126 007c D7E90223 ldrd r2, [r7, #8]
4127 0080 2046 mov r0, r4
4128 0082 0096 str r6, [sp, #0]
4129 0084 0195 str r5, [sp, #4]
4130 0086 CDF808A0 str sl, [sp, #8]
4131 008a CDF80C90 str r9, [sp, #12]
4132 008e FFF7FEFF bl fuse_reply_entry(PLT)
4133 .LVL452:
4134 0092 01E0 b .L315
4135 .L318:
831:system/core/sdcard/sdcard.c **** return -EACCES;
4136 .loc 1 831 0
4137 0094 6FF00C00 mvn r0, #12
4138 .LVL453:
4139 .L315:
835:system/core/sdcard/sdcard.c **** }
4140 .loc 1 835 0
4141 0098 0DF50052 add r2, sp, #8192
4142 009c 1432 adds r2, r2, #20
4143 009e 1168 ldr r1, [r2, #0]
4144 00a0 D8F80030 ldr r3, [r8, #0]
4145 00a4 9942 cmp r1, r3
4146 00a6 01D0 beq .L317
4147 00a8 FFF7FEFF bl __stack_chk_fail(PLT)
4148 .LVL454:
4149 .L317:
4150 00ac 06B0 add sp, sp, #24
4151 00ae 0DF5005D add sp, sp, #8192
4152 00b2 BDE8F087 pop {r4, r5, r6, r7, r8, r9, sl, pc}
4153 .L323:
4154 00b6 00BF .align 2
4155 .L322:
4156 00b8 A6000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC34+4)
4157 00bc 00000000 .word __stack_chk_guard(GOT)
4158 .cfi_endproc
4159 .LFE143:
4160 .fnend
4162 .section .text.handle_mknod.isra.23,"ax",%progbits
4163 .align 1
4164 .thumb
4165 .thumb_func
ARM GAS /tmp/ccMR8LsA.s page 121
4167 handle_mknod.isra.23:
4168 .fnstart
4169 .LFB144:
941:system/core/sdcard/sdcard.c **** static int handle_mknod(struct fuse* fuse, struct fuse_handler* handler,
4170 .loc 1 941 0
4171 .cfi_startproc
4172 @ args = 0, pretend = 0, frame = 8208
4173 @ frame_needed = 0, uses_anonymous_args = 0
4174 .LVL455:
4175 0000 2DE9F04F push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
4176 .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
4177 .LCFI49:
4178 .cfi_def_cfa_offset 36
4179 .cfi_offset 4, -36
4180 .cfi_offset 5, -32
4181 .cfi_offset 6, -28
4182 .cfi_offset 7, -24
4183 .cfi_offset 8, -20
4184 .cfi_offset 9, -16
4185 .cfi_offset 10, -12
4186 .cfi_offset 11, -8
4187 .cfi_offset 14, -4
4188 0004 1F46 mov r7, r3
4189 0006 374B ldr r3, .L334
4190 .LVL456:
4191 0008 9246 mov sl, r2
4192 .pad #8192
4193 000a ADF5005D sub sp, sp, #8192
4194 .LCFI50:
4195 .cfi_def_cfa_offset 8228
4196 000e 0D46 mov r5, r1
4197 0010 354A ldr r2, .L334+4
4198 .LVL457:
4199 .pad #36
4200 0012 89B0 sub sp, sp, #36
4201 .LCFI51:
4202 .cfi_def_cfa_offset 8264
941:system/core/sdcard/sdcard.c **** static int handle_mknod(struct fuse* fuse, struct fuse_handler* handler,
4203 .loc 1 941 0
4204 .LPIC35:
4205 0014 7B44 add r3, pc
4206 0016 0DF50051 add r1, sp, #8192
4207 .LVL458:
4208 001a 0446 mov r4, r0
4209 001c 1C31 adds r1, r1, #28
4210 001e 9E58 ldr r6, [r3, r2]
953:system/core/sdcard/sdcard.c **** parent_path, sizeof(parent_path));
4211 .loc 1 953 0
4212 0020 0DF11C09 add r9, sp, #28
941:system/core/sdcard/sdcard.c **** static int handle_mknod(struct fuse* fuse, struct fuse_handler* handler,
4213 .loc 1 941 0
4214 0024 3368 ldr r3, [r6, #0]
4215 0026 0B60 str r3, [r1, #0]
4216 .LVL459:
950:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
4217 .loc 1 950 0
4218 0028 FFF7FEFF bl pthread_mutex_lock(PLT)
ARM GAS /tmp/ccMR8LsA.s page 122
4219 .LVL460:
951:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
4220 .loc 1 951 0
4221 002c 2946 mov r1, r5
4222 002e 2046 mov r0, r4
4223 0030 FFF7FEFF bl get_caller_has_rw_locked(PLT)
4224 .LVL461:
952:system/core/sdcard/sdcard.c **** parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
4225 .loc 1 952 0
4226 0034 D5E90423 ldrd r2, [r5, #16]
951:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
4227 .loc 1 951 0
4228 0038 8346 mov fp, r0
4229 .LVL462:
952:system/core/sdcard/sdcard.c **** parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
4230 .loc 1 952 0
4231 003a CDF80090 str r9, [sp, #0]
4232 003e 2046 mov r0, r4
4233 .LVL463:
4234 0040 FFF7FEFF bl lookup_node_and_path_by_id_locked.constprop.28(PLT)
4235 .LVL464:
4236 0044 8046 mov r8, r0
4237 .LVL465:
956:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
4238 .loc 1 956 0
4239 0046 2046 mov r0, r4
4240 .LVL466:
4241 0048 FFF7FEFF bl pthread_mutex_unlock(PLT)
4242 .LVL467:
4243 004c 0596 str r6, [sp, #20]
958:system/core/sdcard/sdcard.c **** if (!parent_node || !(actual_name = find_file_within(parent_path, name,
4244 .loc 1 958 0
4245 004e B8F1000F cmp r8, #0
4246 0052 02D1 bne .L325
4247 .L327:
960:system/core/sdcard/sdcard.c **** return -ENOENT;
4248 .loc 1 960 0
4249 0054 6FF00100 mvn r0, #1
4250 0058 35E0 b .L326
4251 .L325:
959:system/core/sdcard/sdcard.c **** child_path, sizeof(child_path), 1))) {
4252 .loc 1 959 0
4253 005a 0DF58056 add r6, sp, #4096
958:system/core/sdcard/sdcard.c **** if (!parent_node || !(actual_name = find_file_within(parent_path, name,
4254 .loc 1 958 0
4255 005e 4846 mov r0, r9
959:system/core/sdcard/sdcard.c **** child_path, sizeof(child_path), 1))) {
4256 .loc 1 959 0
4257 0060 1C36 adds r6, r6, #28
958:system/core/sdcard/sdcard.c **** if (!parent_node || !(actual_name = find_file_within(parent_path, name,
4258 .loc 1 958 0
4259 0062 3946 mov r1, r7
4260 0064 3246 mov r2, r6
4261 0066 0123 movs r3, #1
4262 0068 FFF7FEFF bl find_file_within.constprop.27(PLT)
4263 .LVL468:
4264 006c 8146 mov r9, r0
ARM GAS /tmp/ccMR8LsA.s page 123
4265 006e 0028 cmp r0, #0
4266 0070 F0D0 beq .L327
962:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK, has_rw)) {
4267 .loc 1 962 0
4268 0072 0223 movs r3, #2
4269 0074 2046 mov r0, r4
4270 .LVL469:
4271 0076 8DE80808 stmia sp, {r3, fp}
4272 007a 2946 mov r1, r5
4273 007c 4246 mov r2, r8
4274 007e 3B46 mov r3, r7
4275 0080 FFF7FEFF bl check_caller_access_to_name(PLT)
4276 .LVL470:
4277 0084 E8B1 cbz r0, .L330
4278 .LVL471:
965:system/core/sdcard/sdcard.c **** __u32 mode = (req->mode & (~0777)) | 0664;
4279 .loc 1 965 0
4280 0086 DAF80000 ldr r0, [sl, #0]
4281 008a 00F47E42 and r2, r0, #65024
966:system/core/sdcard/sdcard.c **** if (mknod(child_path, mode, req->rdev) < 0) {
4282 .loc 1 966 0
4283 008e 3046 mov r0, r6
4284 0090 42F4DA71 orr r1, r2, #436
4285 0094 DAF80420 ldr r2, [sl, #4]
4286 0098 FFF7FEFF bl mknod(PLT)
4287 .LVL472:
4288 009c 0028 cmp r0, #0
4289 009e 04DA bge .L328
967:system/core/sdcard/sdcard.c **** return -errno;
4290 .loc 1 967 0
4291 00a0 FFF7FEFF bl __errno(PLT)
4292 .LVL473:
4293 00a4 0368 ldr r3, [r0, #0]
4294 00a6 5842 negs r0, r3
4295 00a8 0DE0 b .L326
4296 .L328:
969:system/core/sdcard/sdcard.c **** return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path);
4297 .loc 1 969 0
4298 00aa D5E90223 ldrd r2, [r5, #8]
4299 00ae 2046 mov r0, r4
4300 00b0 CDF80080 str r8, [sp, #0]
4301 00b4 0197 str r7, [sp, #4]
4302 00b6 CDF80890 str r9, [sp, #8]
4303 00ba 0396 str r6, [sp, #12]
4304 00bc FFF7FEFF bl fuse_reply_entry(PLT)
4305 .LVL474:
4306 00c0 01E0 b .L326
4307 .L330:
963:system/core/sdcard/sdcard.c **** return -EACCES;
4308 .loc 1 963 0
4309 00c2 6FF00C00 mvn r0, #12
4310 .LVL475:
4311 .L326:
970:system/core/sdcard/sdcard.c **** }
4312 .loc 1 970 0
4313 00c6 059B ldr r3, [sp, #20]
4314 00c8 0DF50051 add r1, sp, #8192
ARM GAS /tmp/ccMR8LsA.s page 124
4315 00cc 1C31 adds r1, r1, #28
4316 00ce 0A68 ldr r2, [r1, #0]
4317 00d0 1968 ldr r1, [r3, #0]
4318 00d2 8A42 cmp r2, r1
4319 00d4 01D0 beq .L329
4320 00d6 FFF7FEFF bl __stack_chk_fail(PLT)
4321 .LVL476:
4322 .L329:
4323 00da 09B0 add sp, sp, #36
4324 00dc 0DF5005D add sp, sp, #8192
4325 00e0 BDE8F08F pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
4326 .L335:
4327 .align 2
4328 .L334:
4329 00e4 CC000000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC35+4)
4330 00e8 00000000 .word __stack_chk_guard(GOT)
4331 .cfi_endproc
4332 .LFE144:
4333 .fnend
4335 .section .text.handle_mkdir.isra.24,"ax",%progbits
4336 .align 1
4337 .thumb
4338 .thumb_func
4340 handle_mkdir.isra.24:
4341 .fnstart
4342 .LFB145:
972:system/core/sdcard/sdcard.c **** static int handle_mkdir(struct fuse* fuse, struct fuse_handler* handler,
4343 .loc 1 972 0
4344 .cfi_startproc
4345 @ args = 0, pretend = 0, frame = 12304
4346 @ frame_needed = 0, uses_anonymous_args = 0
4347 .LVL477:
4348 0000 2DE9F04F push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
4349 .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
4350 .LCFI52:
4351 .cfi_def_cfa_offset 36
4352 .cfi_offset 4, -36
4353 .cfi_offset 5, -32
4354 .cfi_offset 6, -28
4355 .cfi_offset 7, -24
4356 .cfi_offset 8, -20
4357 .cfi_offset 9, -16
4358 .cfi_offset 10, -12
4359 .cfi_offset 11, -8
4360 .cfi_offset 14, -4
4361 0004 1D46 mov r5, r3
4362 0006 DFF88091 ldr r9, .L358
4363 .pad #12288
4364 000a ADF5405D sub sp, sp, #12288
4365 .LCFI53:
4366 .cfi_def_cfa_offset 12324
4367 .pad #36
4368 000e 89B0 sub sp, sp, #36
4369 .LCFI54:
4370 .cfi_def_cfa_offset 12360
972:system/core/sdcard/sdcard.c **** static int handle_mkdir(struct fuse* fuse, struct fuse_handler* handler,
4371 .loc 1 972 0
ARM GAS /tmp/ccMR8LsA.s page 125
4372 0010 8846 mov r8, r1
4373 0012 5E4B ldr r3, .L358+4
4374 .LVL478:
4375 0014 0DF54051 add r1, sp, #12288
4376 .LVL479:
4377 .LPIC36:
4378 0018 F944 add r9, pc
4379 001a 0492 str r2, [sp, #16]
4380 001c 0446 mov r4, r0
4381 001e 1C31 adds r1, r1, #28
4382 0020 59F80370 ldr r7, [r9, r3]
984:system/core/sdcard/sdcard.c **** parent_path, sizeof(parent_path));
4383 .loc 1 984 0
4384 0024 0DF11C0A add sl, sp, #28
972:system/core/sdcard/sdcard.c **** static int handle_mkdir(struct fuse* fuse, struct fuse_handler* handler,
4385 .loc 1 972 0
4386 0028 3A68 ldr r2, [r7, #0]
4387 .LVL480:
4388 002a 0A60 str r2, [r1, #0]
4389 .LVL481:
981:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
4390 .loc 1 981 0
4391 002c FFF7FEFF bl pthread_mutex_lock(PLT)
4392 .LVL482:
982:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
4393 .loc 1 982 0
4394 0030 4146 mov r1, r8
4395 0032 2046 mov r0, r4
4396 0034 FFF7FEFF bl get_caller_has_rw_locked(PLT)
4397 .LVL483:
983:system/core/sdcard/sdcard.c **** parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
4398 .loc 1 983 0
4399 0038 D8E90423 ldrd r2, [r8, #16]
982:system/core/sdcard/sdcard.c **** has_rw = get_caller_has_rw_locked(fuse, hdr);
4400 .loc 1 982 0
4401 003c 8346 mov fp, r0
4402 .LVL484:
983:system/core/sdcard/sdcard.c **** parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid,
4403 .loc 1 983 0
4404 003e CDF800A0 str sl, [sp, #0]
4405 0042 2046 mov r0, r4
4406 .LVL485:
4407 0044 FFF7FEFF bl lookup_node_and_path_by_id_locked.constprop.28(PLT)
4408 .LVL486:
4409 0048 0646 mov r6, r0
4410 .LVL487:
987:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
4411 .loc 1 987 0
4412 004a 2046 mov r0, r4
4413 .LVL488:
4414 004c FFF7FEFF bl pthread_mutex_unlock(PLT)
4415 .LVL489:
4416 0050 0597 str r7, [sp, #20]
989:system/core/sdcard/sdcard.c **** if (!parent_node || !(actual_name = find_file_within(parent_path, name,
4417 .loc 1 989 0
4418 0052 06B9 cbnz r6, .L337
4419 0054 79E0 b .L357
ARM GAS /tmp/ccMR8LsA.s page 126
4420 .L337:
990:system/core/sdcard/sdcard.c **** child_path, sizeof(child_path), 1))) {
4421 .loc 1 990 0
4422 0056 0DF58057 add r7, sp, #4096
989:system/core/sdcard/sdcard.c **** if (!parent_node || !(actual_name = find_file_within(parent_path, name,
4423 .loc 1 989 0
4424 005a 5046 mov r0, sl
990:system/core/sdcard/sdcard.c **** child_path, sizeof(child_path), 1))) {
4425 .loc 1 990 0
4426 005c 1C37 adds r7, r7, #28
989:system/core/sdcard/sdcard.c **** if (!parent_node || !(actual_name = find_file_within(parent_path, name,
4427 .loc 1 989 0
4428 005e 2946 mov r1, r5
4429 0060 3A46 mov r2, r7
4430 0062 0123 movs r3, #1
4431 0064 FFF7FEFF bl find_file_within.constprop.27(PLT)
4432 .LVL490:
4433 0068 8246 mov sl, r0
4434 006a 0028 cmp r0, #0
4435 006c 6DD0 beq .L357
993:system/core/sdcard/sdcard.c **** if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK, has_rw)) {
4436 .loc 1 993 0
4437 006e 0223 movs r3, #2
4438 0070 2046 mov r0, r4
4439 .LVL491:
4440 0072 8DE80808 stmia sp, {r3, fp}
4441 0076 4146 mov r1, r8
4442 0078 3246 mov r2, r6
4443 007a 2B46 mov r3, r5
4444 007c FFF7FEFF bl check_caller_access_to_name(PLT)
4445 .LVL492:
4446 0080 0028 cmp r0, #0
4447 0082 70D0 beq .L346
4448 .LVL493:
996:system/core/sdcard/sdcard.c **** __u32 mode = (req->mode & (~0777)) | 0775;
4449 .loc 1 996 0
4450 0084 0498 ldr r0, [sp, #16]
4451 0086 0368 ldr r3, [r0, #0]
997:system/core/sdcard/sdcard.c **** if (mkdir(child_path, mode) < 0) {
4452 .loc 1 997 0
4453 0088 3846 mov r0, r7
996:system/core/sdcard/sdcard.c **** __u32 mode = (req->mode & (~0777)) | 0775;
4454 .loc 1 996 0
4455 008a 03F47E42 and r2, r3, #65024
997:system/core/sdcard/sdcard.c **** if (mkdir(child_path, mode) < 0) {
4456 .loc 1 997 0
4457 008e 42F4FE7C orr ip, r2, #508
4458 0092 4CF00101 orr r1, ip, #1
4459 0096 FFF7FEFF bl mkdir(PLT)
4460 .LVL494:
4461 009a 0028 cmp r0, #0
4462 009c 04DA bge .L340
998:system/core/sdcard/sdcard.c **** return -errno;
4463 .loc 1 998 0
4464 009e FFF7FEFF bl __errno(PLT)
4465 .LVL495:
4466 00a2 0368 ldr r3, [r0, #0]
ARM GAS /tmp/ccMR8LsA.s page 127
4467 00a4 5842 negs r0, r3
4468 00a6 60E0 b .L338
4469 .L340:
1002:system/core/sdcard/sdcard.c **** if (parent_node->perm == PERM_ANDROID && !strcasecmp(name, "data")) {
4470 .loc 1 1002 0
4471 00a8 B169 ldr r1, [r6, #24]
4472 00aa 0329 cmp r1, #3
4473 00ac 22D1 bne .L341
4474 00ae 3849 ldr r1, .L358+8
4475 00b0 2846 mov r0, r5
4476 .LPIC37:
4477 00b2 7944 add r1, pc
4478 00b4 FFF7FEFF bl strcasecmp(PLT)
4479 .LVL496:
4480 00b8 E0B9 cbnz r0, .L341
4481 .LVL497:
4482 .LBB496:
4483 .LBB497:
4484 .LBB498:
4485 .file 4 "bionic/libc/include/stdio.h"
1:bionic/libc/include/stdio.h **** /* $OpenBSD: stdio.h,v 1.35 2006/01/13 18:10:09 miod Exp $ */
2:bionic/libc/include/stdio.h **** /* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */
3:bionic/libc/include/stdio.h ****
4:bionic/libc/include/stdio.h **** /*-
5:bionic/libc/include/stdio.h **** * Copyright (c) 1990 The Regents of the University of California.
6:bionic/libc/include/stdio.h **** * All rights reserved.
7:bionic/libc/include/stdio.h **** *
8:bionic/libc/include/stdio.h **** * This code is derived from software contributed to Berkeley by
9:bionic/libc/include/stdio.h **** * Chris Torek.
10:bionic/libc/include/stdio.h **** *
11:bionic/libc/include/stdio.h **** * Redistribution and use in source and binary forms, with or without
12:bionic/libc/include/stdio.h **** * modification, are permitted provided that the following conditions
13:bionic/libc/include/stdio.h **** * are met:
14:bionic/libc/include/stdio.h **** * 1. Redistributions of source code must retain the above copyright
15:bionic/libc/include/stdio.h **** * notice, this list of conditions and the following disclaimer.
16:bionic/libc/include/stdio.h **** * 2. Redistributions in binary form must reproduce the above copyright
17:bionic/libc/include/stdio.h **** * notice, this list of conditions and the following disclaimer in the
18:bionic/libc/include/stdio.h **** * documentation and/or other materials provided with the distribution.
19:bionic/libc/include/stdio.h **** * 3. Neither the name of the University nor the names of its contributors
20:bionic/libc/include/stdio.h **** * may be used to endorse or promote products derived from this software
21:bionic/libc/include/stdio.h **** * without specific prior written permission.
22:bionic/libc/include/stdio.h **** *
23:bionic/libc/include/stdio.h **** * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24:bionic/libc/include/stdio.h **** * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25:bionic/libc/include/stdio.h **** * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26:bionic/libc/include/stdio.h **** * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27:bionic/libc/include/stdio.h **** * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28:bionic/libc/include/stdio.h **** * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29:bionic/libc/include/stdio.h **** * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30:bionic/libc/include/stdio.h **** * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31:bionic/libc/include/stdio.h **** * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32:bionic/libc/include/stdio.h **** * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33:bionic/libc/include/stdio.h **** * SUCH DAMAGE.
34:bionic/libc/include/stdio.h **** *
35:bionic/libc/include/stdio.h **** * @(#)stdio.h 5.17 (Berkeley) 6/3/91
36:bionic/libc/include/stdio.h **** */
37:bionic/libc/include/stdio.h ****
ARM GAS /tmp/ccMR8LsA.s page 128
38:bionic/libc/include/stdio.h **** #ifndef _STDIO_H_
39:bionic/libc/include/stdio.h **** #define _STDIO_H_
40:bionic/libc/include/stdio.h ****
41:bionic/libc/include/stdio.h **** #include <sys/cdefs.h>
42:bionic/libc/include/stdio.h **** #include <sys/types.h>
43:bionic/libc/include/stdio.h ****
44:bionic/libc/include/stdio.h **** #include <stdarg.h>
45:bionic/libc/include/stdio.h **** #include <stddef.h>
46:bionic/libc/include/stdio.h ****
47:bionic/libc/include/stdio.h **** #define __need_NULL
48:bionic/libc/include/stdio.h **** #include <stddef.h>
49:bionic/libc/include/stdio.h ****
50:bionic/libc/include/stdio.h **** #define _FSTDIO /* Define for new stdio with functions. */
51:bionic/libc/include/stdio.h ****
52:bionic/libc/include/stdio.h **** typedef off_t fpos_t; /* stdio file position type */
53:bionic/libc/include/stdio.h ****
54:bionic/libc/include/stdio.h **** /*
55:bionic/libc/include/stdio.h **** * NB: to fit things in six character monocase externals, the stdio
56:bionic/libc/include/stdio.h **** * code uses the prefix `__s' for stdio objects, typically followed
57:bionic/libc/include/stdio.h **** * by a three-character attempt at a mnemonic.
58:bionic/libc/include/stdio.h **** */
59:bionic/libc/include/stdio.h ****
60:bionic/libc/include/stdio.h **** /* stdio buffers */
61:bionic/libc/include/stdio.h **** struct __sbuf {
62:bionic/libc/include/stdio.h **** unsigned char *_base;
63:bionic/libc/include/stdio.h **** int _size;
64:bionic/libc/include/stdio.h **** };
65:bionic/libc/include/stdio.h ****
66:bionic/libc/include/stdio.h **** /*
67:bionic/libc/include/stdio.h **** * stdio state variables.
68:bionic/libc/include/stdio.h **** *
69:bionic/libc/include/stdio.h **** * The following always hold:
70:bionic/libc/include/stdio.h **** *
71:bionic/libc/include/stdio.h **** * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
72:bionic/libc/include/stdio.h **** * _lbfsize is -_bf._size, else _lbfsize is 0
73:bionic/libc/include/stdio.h **** * if _flags&__SRD, _w is 0
74:bionic/libc/include/stdio.h **** * if _flags&__SWR, _r is 0
75:bionic/libc/include/stdio.h **** *
76:bionic/libc/include/stdio.h **** * This ensures that the getc and putc macros (or inline functions) never
77:bionic/libc/include/stdio.h **** * try to write or read from a file that is in `read' or `write' mode.
78:bionic/libc/include/stdio.h **** * (Moreover, they can, and do, automatically switch from read mode to
79:bionic/libc/include/stdio.h **** * write mode, and back, on "r+" and "w+" files.)
80:bionic/libc/include/stdio.h **** *
81:bionic/libc/include/stdio.h **** * _lbfsize is used only to make the inline line-buffered output stream
82:bionic/libc/include/stdio.h **** * code as compact as possible.
83:bionic/libc/include/stdio.h **** *
84:bionic/libc/include/stdio.h **** * _ub, _up, and _ur are used when ungetc() pushes back more characters
85:bionic/libc/include/stdio.h **** * than fit in the current _bf, or when ungetc() pushes back a character
86:bionic/libc/include/stdio.h **** * that does not match the previous one in _bf. When this happens,
87:bionic/libc/include/stdio.h **** * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
88:bionic/libc/include/stdio.h **** * _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
89:bionic/libc/include/stdio.h **** *
90:bionic/libc/include/stdio.h **** * NOTE: if you change this structure, you also need to update the
91:bionic/libc/include/stdio.h **** * std() initializer in findfp.c.
92:bionic/libc/include/stdio.h **** */
93:bionic/libc/include/stdio.h **** typedef struct __sFILE {
94:bionic/libc/include/stdio.h **** unsigned char *_p; /* current position in (some) buffer */
ARM GAS /tmp/ccMR8LsA.s page 129
95:bionic/libc/include/stdio.h **** int _r; /* read space left for getc() */
96:bionic/libc/include/stdio.h **** int _w; /* write space left for putc() */
97:bionic/libc/include/stdio.h **** short _flags; /* flags, below; this FILE is free if 0 */
98:bionic/libc/include/stdio.h **** short _file; /* fileno, if Unix descriptor, else -1 */
99:bionic/libc/include/stdio.h **** struct __sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
100:bionic/libc/include/stdio.h **** int _lbfsize; /* 0 or -_bf._size, for inline putc */
101:bionic/libc/include/stdio.h ****
102:bionic/libc/include/stdio.h **** /* operations */
103:bionic/libc/include/stdio.h **** void *_cookie; /* cookie passed to io functions */
104:bionic/libc/include/stdio.h **** int (*_close)(void *);
105:bionic/libc/include/stdio.h **** int (*_read)(void *, char *, int);
106:bionic/libc/include/stdio.h **** fpos_t (*_seek)(void *, fpos_t, int);
107:bionic/libc/include/stdio.h **** int (*_write)(void *, const char *, int);
108:bionic/libc/include/stdio.h ****
109:bionic/libc/include/stdio.h **** /* extension data, to avoid further ABI breakage */
110:bionic/libc/include/stdio.h **** struct __sbuf _ext;
111:bionic/libc/include/stdio.h **** /* data for long sequences of ungetc() */
112:bionic/libc/include/stdio.h **** unsigned char *_up; /* saved _p when _p is doing ungetc data */
113:bionic/libc/include/stdio.h **** int _ur; /* saved _r when _r is counting ungetc data */
114:bionic/libc/include/stdio.h ****
115:bionic/libc/include/stdio.h **** /* tricks to meet minimum requirements even when malloc() fails */
116:bionic/libc/include/stdio.h **** unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */
117:bionic/libc/include/stdio.h **** unsigned char _nbuf[1]; /* guarantee a getc() buffer */
118:bionic/libc/include/stdio.h ****
119:bionic/libc/include/stdio.h **** /* separate buffer for fgetln() when line crosses buffer boundary */
120:bionic/libc/include/stdio.h **** struct __sbuf _lb; /* buffer for fgetln() */
121:bionic/libc/include/stdio.h ****
122:bionic/libc/include/stdio.h **** /* Unix stdio files get aligned to block boundaries on fseek() */
123:bionic/libc/include/stdio.h **** int _blksize; /* stat.st_blksize (may be != _bf._size) */
124:bionic/libc/include/stdio.h **** fpos_t _offset; /* current lseek offset */
125:bionic/libc/include/stdio.h **** } FILE;
126:bionic/libc/include/stdio.h ****
127:bionic/libc/include/stdio.h **** __BEGIN_DECLS
128:bionic/libc/include/stdio.h **** extern FILE __sF[];
129:bionic/libc/include/stdio.h **** __END_DECLS
130:bionic/libc/include/stdio.h ****
131:bionic/libc/include/stdio.h **** #define __SLBF 0x0001 /* line buffered */
132:bionic/libc/include/stdio.h **** #define __SNBF 0x0002 /* unbuffered */
133:bionic/libc/include/stdio.h **** #define __SRD 0x0004 /* OK to read */
134:bionic/libc/include/stdio.h **** #define __SWR 0x0008 /* OK to write */
135:bionic/libc/include/stdio.h **** /* RD and WR are never simultaneously asserted */
136:bionic/libc/include/stdio.h **** #define __SRW 0x0010 /* open for reading & writing */
137:bionic/libc/include/stdio.h **** #define __SEOF 0x0020 /* found EOF */
138:bionic/libc/include/stdio.h **** #define __SERR 0x0040 /* found error */
139:bionic/libc/include/stdio.h **** #define __SMBF 0x0080 /* _buf is from malloc */
140:bionic/libc/include/stdio.h **** #define __SAPP 0x0100 /* fdopen()ed in append mode */
141:bionic/libc/include/stdio.h **** #define __SSTR 0x0200 /* this is an sprintf/snprintf string */
142:bionic/libc/include/stdio.h **** #define __SOPT 0x0400 /* do fseek() optimization */
143:bionic/libc/include/stdio.h **** #define __SNPT 0x0800 /* do not do fseek() optimization */
144:bionic/libc/include/stdio.h **** #define __SOFF 0x1000 /* set iff _offset is in fact correct */
145:bionic/libc/include/stdio.h **** #define __SMOD 0x2000 /* true => fgetln modified _p text */
146:bionic/libc/include/stdio.h **** #define __SALC 0x4000 /* allocate string space dynamically */
147:bionic/libc/include/stdio.h **** #define __SIGN 0x8000 /* ignore this file in _fwalk */
148:bionic/libc/include/stdio.h ****
149:bionic/libc/include/stdio.h **** /*
150:bionic/libc/include/stdio.h **** * The following three definitions are for ANSI C, which took them
151:bionic/libc/include/stdio.h **** * from System V, which brilliantly took internal interface macros and
ARM GAS /tmp/ccMR8LsA.s page 130
152:bionic/libc/include/stdio.h **** * made them official arguments to setvbuf(), without renaming them.
153:bionic/libc/include/stdio.h **** * Hence, these ugly _IOxxx names are *supposed* to appear in user code.
154:bionic/libc/include/stdio.h **** *
155:bionic/libc/include/stdio.h **** * Although numbered as their counterparts above, the implementation
156:bionic/libc/include/stdio.h **** * does not rely on this.
157:bionic/libc/include/stdio.h **** */
158:bionic/libc/include/stdio.h **** #define _IOFBF 0 /* setvbuf should set fully buffered */
159:bionic/libc/include/stdio.h **** #define _IOLBF 1 /* setvbuf should set line buffered */
160:bionic/libc/include/stdio.h **** #define _IONBF 2 /* setvbuf should set unbuffered */
161:bionic/libc/include/stdio.h ****
162:bionic/libc/include/stdio.h **** #define BUFSIZ 1024 /* size of buffer used by setbuf */
163:bionic/libc/include/stdio.h **** #define EOF (-1)
164:bionic/libc/include/stdio.h ****
165:bionic/libc/include/stdio.h **** /*
166:bionic/libc/include/stdio.h **** * FOPEN_MAX is a minimum maximum, and is the number of streams that
167:bionic/libc/include/stdio.h **** * stdio can provide without attempting to allocate further resources
168:bionic/libc/include/stdio.h **** * (which could fail). Do not use this for anything.
169:bionic/libc/include/stdio.h **** */
170:bionic/libc/include/stdio.h ****
171:bionic/libc/include/stdio.h **** #define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */
172:bionic/libc/include/stdio.h **** #define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */
173:bionic/libc/include/stdio.h ****
174:bionic/libc/include/stdio.h **** /* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
175:bionic/libc/include/stdio.h **** #if __BSD_VISIBLE || __XPG_VISIBLE
176:bionic/libc/include/stdio.h **** #define P_tmpdir "/tmp/"
177:bionic/libc/include/stdio.h **** #endif
178:bionic/libc/include/stdio.h **** #define L_tmpnam 1024 /* XXX must be == PATH_MAX */
179:bionic/libc/include/stdio.h **** #define TMP_MAX 308915776
180:bionic/libc/include/stdio.h ****
181:bionic/libc/include/stdio.h **** /* Always ensure that these are consistent with <fcntl.h> and <unistd.h>! */
182:bionic/libc/include/stdio.h **** #ifndef SEEK_SET
183:bionic/libc/include/stdio.h **** #define SEEK_SET 0 /* set file offset to offset */
184:bionic/libc/include/stdio.h **** #endif
185:bionic/libc/include/stdio.h **** #ifndef SEEK_CUR
186:bionic/libc/include/stdio.h **** #define SEEK_CUR 1 /* set file offset to current plus offset */
187:bionic/libc/include/stdio.h **** #endif
188:bionic/libc/include/stdio.h **** #ifndef SEEK_END
189:bionic/libc/include/stdio.h **** #define SEEK_END 2 /* set file offset to EOF plus offset */
190:bionic/libc/include/stdio.h **** #endif
191:bionic/libc/include/stdio.h ****
192:bionic/libc/include/stdio.h **** #define stdin (&__sF[0])
193:bionic/libc/include/stdio.h **** #define stdout (&__sF[1])
194:bionic/libc/include/stdio.h **** #define stderr (&__sF[2])
195:bionic/libc/include/stdio.h ****
196:bionic/libc/include/stdio.h **** /*
197:bionic/libc/include/stdio.h **** * Functions defined in ANSI C standard.
198:bionic/libc/include/stdio.h **** */
199:bionic/libc/include/stdio.h **** __BEGIN_DECLS
200:bionic/libc/include/stdio.h **** void clearerr(FILE *);
201:bionic/libc/include/stdio.h **** int fclose(FILE *);
202:bionic/libc/include/stdio.h **** int feof(FILE *);
203:bionic/libc/include/stdio.h **** int ferror(FILE *);
204:bionic/libc/include/stdio.h **** int fflush(FILE *);
205:bionic/libc/include/stdio.h **** int fgetc(FILE *);
206:bionic/libc/include/stdio.h **** char *fgets(char * __restrict, int, FILE * __restrict);
207:bionic/libc/include/stdio.h **** FILE *fopen(const char * __restrict , const char * __restrict);
208:bionic/libc/include/stdio.h **** int fprintf(FILE * __restrict , const char * __restrict, ...)
ARM GAS /tmp/ccMR8LsA.s page 131
209:bionic/libc/include/stdio.h **** __printflike(2, 3);
210:bionic/libc/include/stdio.h **** int fputc(int, FILE *);
211:bionic/libc/include/stdio.h **** int fputs(const char * __restrict, FILE * __restrict);
212:bionic/libc/include/stdio.h **** size_t fread(void * __restrict, size_t, size_t, FILE * __restrict);
213:bionic/libc/include/stdio.h **** FILE *freopen(const char * __restrict, const char * __restrict,
214:bionic/libc/include/stdio.h **** FILE * __restrict);
215:bionic/libc/include/stdio.h **** int fscanf(FILE * __restrict, const char * __restrict, ...)
216:bionic/libc/include/stdio.h **** __scanflike(2, 3);
217:bionic/libc/include/stdio.h **** int fseek(FILE *, long, int);
218:bionic/libc/include/stdio.h **** long ftell(FILE *);
219:bionic/libc/include/stdio.h **** size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict);
220:bionic/libc/include/stdio.h **** int getc(FILE *);
221:bionic/libc/include/stdio.h **** int getchar(void);
222:bionic/libc/include/stdio.h **** ssize_t getdelim(char ** __restrict, size_t * __restrict, int,
223:bionic/libc/include/stdio.h **** FILE * __restrict);
224:bionic/libc/include/stdio.h **** ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict);
225:bionic/libc/include/stdio.h **** char *gets(char *);
226:bionic/libc/include/stdio.h **** #if __BSD_VISIBLE && !defined(__SYS_ERRLIST)
227:bionic/libc/include/stdio.h **** #define __SYS_ERRLIST
228:bionic/libc/include/stdio.h ****
229:bionic/libc/include/stdio.h **** extern int sys_nerr; /* perror(3) external variables */
230:bionic/libc/include/stdio.h **** extern char *sys_errlist[];
231:bionic/libc/include/stdio.h **** #endif
232:bionic/libc/include/stdio.h **** void perror(const char *);
233:bionic/libc/include/stdio.h **** int printf(const char * __restrict, ...)
234:bionic/libc/include/stdio.h **** __printflike(1, 2);
235:bionic/libc/include/stdio.h **** int putc(int, FILE *);
236:bionic/libc/include/stdio.h **** int putchar(int);
237:bionic/libc/include/stdio.h **** int puts(const char *);
238:bionic/libc/include/stdio.h **** int remove(const char *);
239:bionic/libc/include/stdio.h **** void rewind(FILE *);
240:bionic/libc/include/stdio.h **** int scanf(const char * __restrict, ...)
241:bionic/libc/include/stdio.h **** __scanflike(1, 2);
242:bionic/libc/include/stdio.h **** void setbuf(FILE * __restrict, char * __restrict);
243:bionic/libc/include/stdio.h **** int setvbuf(FILE * __restrict, char * __restrict, int, size_t);
244:bionic/libc/include/stdio.h **** int sscanf(const char * __restrict, const char * __restrict, ...)
245:bionic/libc/include/stdio.h **** __scanflike(2, 3);
246:bionic/libc/include/stdio.h **** FILE *tmpfile(void);
247:bionic/libc/include/stdio.h **** int ungetc(int, FILE *);
248:bionic/libc/include/stdio.h **** int vfprintf(FILE * __restrict, const char * __restrict, __va_list)
249:bionic/libc/include/stdio.h **** __printflike(2, 0);
250:bionic/libc/include/stdio.h **** int vprintf(const char * __restrict, __va_list)
251:bionic/libc/include/stdio.h **** __printflike(1, 0);
252:bionic/libc/include/stdio.h ****
253:bionic/libc/include/stdio.h **** #ifndef __AUDIT__
254:bionic/libc/include/stdio.h **** char *gets(char *);
255:bionic/libc/include/stdio.h **** int sprintf(char * __restrict, const char * __restrict, ...)
256:bionic/libc/include/stdio.h **** __printflike(2, 3);
257:bionic/libc/include/stdio.h **** char *tmpnam(char *);
258:bionic/libc/include/stdio.h **** int vsprintf(char * __restrict, const char * __restrict,
259:bionic/libc/include/stdio.h **** __va_list)
260:bionic/libc/include/stdio.h **** __printflike(2, 0);
261:bionic/libc/include/stdio.h **** #endif
262:bionic/libc/include/stdio.h ****
263:bionic/libc/include/stdio.h **** int rename (const char *, const char *);
264:bionic/libc/include/stdio.h ****
265:bionic/libc/include/stdio.h **** int fgetpos(FILE * __restrict, fpos_t * __restrict);
ARM GAS /tmp/ccMR8LsA.s page 132
266:bionic/libc/include/stdio.h **** int fsetpos(FILE *, const fpos_t *);
267:bionic/libc/include/stdio.h ****
268:bionic/libc/include/stdio.h **** int fseeko(FILE *, off_t, int);
269:bionic/libc/include/stdio.h **** off_t ftello(FILE *);
270:bionic/libc/include/stdio.h ****
271:bionic/libc/include/stdio.h **** #if __ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE
272:bionic/libc/include/stdio.h **** int snprintf(char * __restrict, size_t, const char * __restrict, ...)
273:bionic/libc/include/stdio.h **** __printflike(3, 4);
274:bionic/libc/include/stdio.h **** int vfscanf(FILE * __restrict, const char * __restrict, __va_list)
275:bionic/libc/include/stdio.h **** __scanflike(2, 0);
276:bionic/libc/include/stdio.h **** int vscanf(const char *, __va_list)
277:bionic/libc/include/stdio.h **** __scanflike(1, 0);
278:bionic/libc/include/stdio.h **** int vsnprintf(char * __restrict, size_t, const char * __restrict, __va_list)
279:bionic/libc/include/stdio.h **** __printflike(3, 0);
280:bionic/libc/include/stdio.h **** int vsscanf(const char * __restrict, const char * __restrict, __va_list)
281:bionic/libc/include/stdio.h **** __scanflike(2, 0);
282:bionic/libc/include/stdio.h **** #endif /* __ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE */
283:bionic/libc/include/stdio.h ****
284:bionic/libc/include/stdio.h **** __END_DECLS
285:bionic/libc/include/stdio.h ****
286:bionic/libc/include/stdio.h ****
287:bionic/libc/include/stdio.h **** /*
288:bionic/libc/include/stdio.h **** * Functions defined in POSIX 1003.1.
289:bionic/libc/include/stdio.h **** */
290:bionic/libc/include/stdio.h **** #if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE
291:bionic/libc/include/stdio.h **** #define L_ctermid 1024 /* size for ctermid(); PATH_MAX */
292:bionic/libc/include/stdio.h **** #define L_cuserid 9 /* size for cuserid(); UT_NAMESIZE + 1 */
293:bionic/libc/include/stdio.h ****
294:bionic/libc/include/stdio.h **** __BEGIN_DECLS
295:bionic/libc/include/stdio.h **** #if 0 /* MISSING FROM BIONIC */
296:bionic/libc/include/stdio.h **** char *ctermid(char *);
297:bionic/libc/include/stdio.h **** char *cuserid(char *);
298:bionic/libc/include/stdio.h **** #endif /* MISSING */
299:bionic/libc/include/stdio.h **** FILE *fdopen(int, const char *);
300:bionic/libc/include/stdio.h **** int fileno(FILE *);
301:bionic/libc/include/stdio.h ****
302:bionic/libc/include/stdio.h **** #if (__POSIX_VISIBLE >= 199209)
303:bionic/libc/include/stdio.h **** int pclose(FILE *);
304:bionic/libc/include/stdio.h **** FILE *popen(const char *, const char *);
305:bionic/libc/include/stdio.h **** #endif
306:bionic/libc/include/stdio.h ****
307:bionic/libc/include/stdio.h **** #if __POSIX_VISIBLE >= 199506
308:bionic/libc/include/stdio.h **** void flockfile(FILE *);
309:bionic/libc/include/stdio.h **** int ftrylockfile(FILE *);
310:bionic/libc/include/stdio.h **** void funlockfile(FILE *);
311:bionic/libc/include/stdio.h ****
312:bionic/libc/include/stdio.h **** /*
313:bionic/libc/include/stdio.h **** * These are normally used through macros as defined below, but POSIX
314:bionic/libc/include/stdio.h **** * requires functions as well.
315:bionic/libc/include/stdio.h **** */
316:bionic/libc/include/stdio.h **** int getc_unlocked(FILE *);
317:bionic/libc/include/stdio.h **** int getchar_unlocked(void);
318:bionic/libc/include/stdio.h **** int putc_unlocked(int, FILE *);
319:bionic/libc/include/stdio.h **** int putchar_unlocked(int);
320:bionic/libc/include/stdio.h **** #endif /* __POSIX_VISIBLE >= 199506 */
321:bionic/libc/include/stdio.h ****
322:bionic/libc/include/stdio.h **** #if __XPG_VISIBLE
ARM GAS /tmp/ccMR8LsA.s page 133
323:bionic/libc/include/stdio.h **** char *tempnam(const char *, const char *);
324:bionic/libc/include/stdio.h **** #endif
325:bionic/libc/include/stdio.h **** __END_DECLS
326:bionic/libc/include/stdio.h ****
327:bionic/libc/include/stdio.h **** #endif /* __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE */
328:bionic/libc/include/stdio.h ****
329:bionic/libc/include/stdio.h **** /*
330:bionic/libc/include/stdio.h **** * Routines that are purely local.
331:bionic/libc/include/stdio.h **** */
332:bionic/libc/include/stdio.h **** #if __BSD_VISIBLE
333:bionic/libc/include/stdio.h **** __BEGIN_DECLS
334:bionic/libc/include/stdio.h **** int asprintf(char ** __restrict, const char * __restrict, ...)
335:bionic/libc/include/stdio.h **** __printflike(2, 3);
336:bionic/libc/include/stdio.h **** char *fgetln(FILE * __restrict, size_t * __restrict);
337:bionic/libc/include/stdio.h **** int fpurge(FILE *);
338:bionic/libc/include/stdio.h **** int getw(FILE *);
339:bionic/libc/include/stdio.h **** int putw(int, FILE *);
340:bionic/libc/include/stdio.h **** void setbuffer(FILE *, char *, int);
341:bionic/libc/include/stdio.h **** int setlinebuf(FILE *);
342:bionic/libc/include/stdio.h **** int vasprintf(char ** __restrict, const char * __restrict,
343:bionic/libc/include/stdio.h **** __va_list)
344:bionic/libc/include/stdio.h **** __printflike(2, 0);
345:bionic/libc/include/stdio.h **** __END_DECLS
346:bionic/libc/include/stdio.h ****
347:bionic/libc/include/stdio.h **** /*
348:bionic/libc/include/stdio.h **** * Stdio function-access interface.
349:bionic/libc/include/stdio.h **** */
350:bionic/libc/include/stdio.h **** __BEGIN_DECLS
351:bionic/libc/include/stdio.h **** FILE *funopen(const void *,
352:bionic/libc/include/stdio.h **** int (*)(void *, char *, int),
353:bionic/libc/include/stdio.h **** int (*)(void *, const char *, int),
354:bionic/libc/include/stdio.h **** fpos_t (*)(void *, fpos_t, int),
355:bionic/libc/include/stdio.h **** int (*)(void *));
356:bionic/libc/include/stdio.h **** __END_DECLS
357:bionic/libc/include/stdio.h **** #define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
358:bionic/libc/include/stdio.h **** #define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
359:bionic/libc/include/stdio.h **** #endif /* __BSD_VISIBLE */
360:bionic/libc/include/stdio.h ****
361:bionic/libc/include/stdio.h **** /*
362:bionic/libc/include/stdio.h **** * Functions internal to the implementation.
363:bionic/libc/include/stdio.h **** */
364:bionic/libc/include/stdio.h **** __BEGIN_DECLS
365:bionic/libc/include/stdio.h **** int __srget(FILE *);
366:bionic/libc/include/stdio.h **** int __swbuf(int, FILE *);
367:bionic/libc/include/stdio.h **** __END_DECLS
368:bionic/libc/include/stdio.h ****
369:bionic/libc/include/stdio.h **** /*
370:bionic/libc/include/stdio.h **** * The __sfoo macros are here so that we can
371:bionic/libc/include/stdio.h **** * define function versions in the C library.
372:bionic/libc/include/stdio.h **** */
373:bionic/libc/include/stdio.h **** #define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
374:bionic/libc/include/stdio.h **** #if defined(__GNUC__)
375:bionic/libc/include/stdio.h **** static __inline int __sputc(int _c, FILE *_p) {
376:bionic/libc/include/stdio.h **** if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
377:bionic/libc/include/stdio.h **** return (*_p->_p++ = _c);
378:bionic/libc/include/stdio.h **** else
379:bionic/libc/include/stdio.h **** return (__swbuf(_c, _p));
ARM GAS /tmp/ccMR8LsA.s page 134
380:bionic/libc/include/stdio.h **** }
381:bionic/libc/include/stdio.h **** #else
382:bionic/libc/include/stdio.h **** /*
383:bionic/libc/include/stdio.h **** * This has been tuned to generate reasonable code on the vax using pcc.
384:bionic/libc/include/stdio.h **** */
385:bionic/libc/include/stdio.h **** #define __sputc(c, p) \
386:bionic/libc/include/stdio.h **** (--(p)->_w < 0 ? \
387:bionic/libc/include/stdio.h **** (p)->_w >= (p)->_lbfsize ? \
388:bionic/libc/include/stdio.h **** (*(p)->_p = (c)), *(p)->_p != '\n' ? \
389:bionic/libc/include/stdio.h **** (int)*(p)->_p++ : \
390:bionic/libc/include/stdio.h **** __swbuf('\n', p) : \
391:bionic/libc/include/stdio.h **** __swbuf((int)(c), p) : \
392:bionic/libc/include/stdio.h **** (*(p)->_p = (c), (int)*(p)->_p++))
393:bionic/libc/include/stdio.h **** #endif
394:bionic/libc/include/stdio.h ****
395:bionic/libc/include/stdio.h **** #define __sfeof(p) (((p)->_flags & __SEOF) != 0)
396:bionic/libc/include/stdio.h **** #define __sferror(p) (((p)->_flags & __SERR) != 0)
397:bionic/libc/include/stdio.h **** #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
398:bionic/libc/include/stdio.h **** #define __sfileno(p) ((p)->_file)
399:bionic/libc/include/stdio.h ****
400:bionic/libc/include/stdio.h **** extern int __isthreaded;
401:bionic/libc/include/stdio.h ****
402:bionic/libc/include/stdio.h **** #define feof(p) (!__isthreaded ? __sfeof(p) : (feof)(p))
403:bionic/libc/include/stdio.h **** #define ferror(p) (!__isthreaded ? __sferror(p) : (ferror)(p))
404:bionic/libc/include/stdio.h **** #define clearerr(p) (!__isthreaded ? __sclearerr(p) : (clearerr)(p))
405:bionic/libc/include/stdio.h ****
406:bionic/libc/include/stdio.h **** #if __POSIX_VISIBLE
407:bionic/libc/include/stdio.h **** #define fileno(p) (!__isthreaded ? __sfileno(p) : (fileno)(p))
408:bionic/libc/include/stdio.h **** #endif
409:bionic/libc/include/stdio.h ****
410:bionic/libc/include/stdio.h **** #define getc(fp) (!__isthreaded ? __sgetc(fp) : (getc)(fp))
411:bionic/libc/include/stdio.h ****
412:bionic/libc/include/stdio.h **** #if __BSD_VISIBLE
413:bionic/libc/include/stdio.h **** /*
414:bionic/libc/include/stdio.h **** * The macro implementations of putc and putc_unlocked are not
415:bionic/libc/include/stdio.h **** * fully POSIX compliant; they do not set errno on failure
416:bionic/libc/include/stdio.h **** */
417:bionic/libc/include/stdio.h **** #define putc(x, fp) (!__isthreaded ? __sputc(x, fp) : (putc)(x, fp))
418:bionic/libc/include/stdio.h **** #endif /* __BSD_VISIBLE */
419:bionic/libc/include/stdio.h ****
420:bionic/libc/include/stdio.h **** #ifndef lint
421:bionic/libc/include/stdio.h **** #if __POSIX_VISIBLE >= 199506
422:bionic/libc/include/stdio.h **** #define getc_unlocked(fp) __sgetc(fp)
423:bionic/libc/include/stdio.h **** /*
424:bionic/libc/include/stdio.h **** * The macro implementations of putc and putc_unlocked are not
425:bionic/libc/include/stdio.h **** * fully POSIX compliant; they do not set errno on failure
426:bionic/libc/include/stdio.h **** */
427:bionic/libc/include/stdio.h **** #if __BSD_VISIBLE
428:bionic/libc/include/stdio.h **** #define putc_unlocked(x, fp) __sputc(x, fp)
429:bionic/libc/include/stdio.h **** #endif /* __BSD_VISIBLE */
430:bionic/libc/include/stdio.h **** #endif /* __POSIX_VISIBLE >= 199506 */
431:bionic/libc/include/stdio.h **** #endif /* lint */
432:bionic/libc/include/stdio.h ****
433:bionic/libc/include/stdio.h **** #define getchar() getc(stdin)
434:bionic/libc/include/stdio.h **** #define putchar(x) putc(x, stdout)
435:bionic/libc/include/stdio.h **** #define getchar_unlocked() getc_unlocked(stdin)
436:bionic/libc/include/stdio.h **** #define putchar_unlocked(c) putc_unlocked(c, stdout)
ARM GAS /tmp/ccMR8LsA.s page 135
437:bionic/libc/include/stdio.h ****
438:bionic/libc/include/stdio.h **** #ifdef _GNU_SOURCE
439:bionic/libc/include/stdio.h **** /*
440:bionic/libc/include/stdio.h **** * glibc defines dprintf(int, const char*, ...), which is poorly named
441:bionic/libc/include/stdio.h **** * and likely to conflict with locally defined debugging printfs
442:bionic/libc/include/stdio.h **** * fdprintf is a better name, and some programs that use fdprintf use a
443:bionic/libc/include/stdio.h **** * #define fdprintf dprintf for compatibility
444:bionic/libc/include/stdio.h **** */
445:bionic/libc/include/stdio.h **** __BEGIN_DECLS
446:bionic/libc/include/stdio.h **** int fdprintf(int, const char*, ...)
447:bionic/libc/include/stdio.h **** __printflike(2, 3);
448:bionic/libc/include/stdio.h **** int vfdprintf(int, const char*, __va_list)
449:bionic/libc/include/stdio.h **** __printflike(2, 0);
450:bionic/libc/include/stdio.h **** __END_DECLS
451:bionic/libc/include/stdio.h **** #endif /* _GNU_SOURCE */
452:bionic/libc/include/stdio.h ****
453:bionic/libc/include/stdio.h **** #if defined(__BIONIC_FORTIFY)
454:bionic/libc/include/stdio.h ****
455:bionic/libc/include/stdio.h **** __BEGIN_DECLS
456:bionic/libc/include/stdio.h ****
457:bionic/libc/include/stdio.h **** __BIONIC_FORTIFY_INLINE
458:bionic/libc/include/stdio.h **** __printflike(3, 0)
459:bionic/libc/include/stdio.h **** int vsnprintf(char *dest, size_t size, const char *format, __va_list ap)
460:bionic/libc/include/stdio.h **** {
461:bionic/libc/include/stdio.h **** return __builtin___vsnprintf_chk(dest, size, 0, __bos(dest), format, ap);
462:bionic/libc/include/stdio.h **** }
463:bionic/libc/include/stdio.h ****
464:bionic/libc/include/stdio.h **** __BIONIC_FORTIFY_INLINE
465:bionic/libc/include/stdio.h **** __printflike(2, 0)
466:bionic/libc/include/stdio.h **** int vsprintf(char *dest, const char *format, __va_list ap)
467:bionic/libc/include/stdio.h **** {
468:bionic/libc/include/stdio.h **** return __builtin___vsprintf_chk(dest, 0, __bos(dest), format, ap);
469:bionic/libc/include/stdio.h **** }
470:bionic/libc/include/stdio.h ****
471:bionic/libc/include/stdio.h **** #if defined(__clang__)
472:bionic/libc/include/stdio.h **** #define snprintf(dest, size, ...) __builtin___snprintf_chk(dest, size, 0, __bos(dest), __VA_ARGS__)
473:bionic/libc/include/stdio.h **** #else
474:bionic/libc/include/stdio.h **** __BIONIC_FORTIFY_INLINE
475:bionic/libc/include/stdio.h **** __printflike(3, 4)
476:bionic/libc/include/stdio.h **** int snprintf(char *dest, size_t size, const char *format, ...)
477:bionic/libc/include/stdio.h **** {
478:bionic/libc/include/stdio.h **** return __builtin___snprintf_chk(dest, size, 0,
4486 .loc 4 478 0
4487 00ba 364A ldr r2, .L358+12
4488 00bc 0DF50050 add r0, sp, #8192
4489 00c0 1C30 adds r0, r0, #28
4490 00c2 4FF48051 mov r1, #4096
4491 00c6 3B46 mov r3, r7
4492 .LPIC38:
4493 00c8 7A44 add r2, pc
4494 00ca FFF7FEFF bl snprintf(PLT)
4495 .LVL498:
4496 .LBE498:
4497 .LBE497:
1005:system/core/sdcard/sdcard.c **** if (touch(nomedia, 0664) != 0) {
4498 .loc 1 1005 0
4499 00ce 0DF50050 add r0, sp, #8192
ARM GAS /tmp/ccMR8LsA.s page 136
4500 00d2 1C30 adds r0, r0, #28
4501 00d4 FFF7FEFF bl touch.constprop.26(PLT)
4502 .LVL499:
4503 00d8 60B1 cbz r0, .L341
1006:system/core/sdcard/sdcard.c **** ERROR("Failed to touch(%s): %s\n", nomedia, strerror(errno));
4504 .loc 1 1006 0
4505 00da FFF7FEFF bl __errno(PLT)
4506 .LVL500:
4507 00de 0068 ldr r0, [r0, #0]
4508 00e0 FFF7FEFF bl strerror(PLT)
4509 .LVL501:
4510 00e4 2C49 ldr r1, .L358+16
4511 00e6 0346 mov r3, r0
4512 00e8 59F80100 ldr r0, [r9, r1]
4513 00ec 2B49 ldr r1, .L358+20
4514 00ee A830 adds r0, r0, #168
4515 .LPIC39:
4516 00f0 7944 add r1, pc
4517 00f2 25E0 b .L356
4518 .LVL502:
4519 .L341:
4520 .LBE496:
1010:system/core/sdcard/sdcard.c **** if (parent_node->perm == PERM_ANDROID && !strcasecmp(name, "obb")) {
4521 .loc 1 1010 0
4522 00f4 B069 ldr r0, [r6, #24]
4523 00f6 0328 cmp r0, #3
4524 00f8 2AD1 bne .L343
4525 00fa 2949 ldr r1, .L358+24
4526 00fc 2846 mov r0, r5
4527 .LPIC40:
4528 00fe 7944 add r1, pc
4529 0100 FFF7FEFF bl strcasecmp(PLT)
4530 .LVL503:
4531 0104 20BB cbnz r0, .L343
4532 .LVL504:
4533 .LBB499:
4534 .LBB500:
4535 .LBB501:
4536 .loc 4 478 0
4537 0106 274A ldr r2, .L358+28
4538 0108 0DF50050 add r0, sp, #8192
4539 010c 1C30 adds r0, r0, #28
4540 010e 4FF48051 mov r1, #4096
4541 0112 04F17003 add r3, r4, #112
4542 .LPIC41:
4543 0116 7A44 add r2, pc
4544 0118 FFF7FEFF bl snprintf(PLT)
4545 .LVL505:
4546 .LBE501:
4547 .LBE500:
1013:system/core/sdcard/sdcard.c **** if (touch(nomedia, 0664) != 0) {
4548 .loc 1 1013 0
4549 011c 0DF50050 add r0, sp, #8192
4550 0120 1C30 adds r0, r0, #28
4551 0122 FFF7FEFF bl touch.constprop.26(PLT)
4552 .LVL506:
4553 0126 98B1 cbz r0, .L343
ARM GAS /tmp/ccMR8LsA.s page 137
1014:system/core/sdcard/sdcard.c **** ERROR("Failed to touch(%s): %s\n", nomedia, strerror(errno));
4554 .loc 1 1014 0
4555 0128 FFF7FEFF bl __errno(PLT)
4556 .LVL507:
4557 012c 0068 ldr r0, [r0, #0]
4558 012e FFF7FEFF bl strerror(PLT)
4559 .LVL508:
4560 0132 194A ldr r2, .L358+16
4561 0134 0346 mov r3, r0
4562 0136 1C49 ldr r1, .L358+32
4563 0138 59F80200 ldr r0, [r9, r2]
4564 .LPIC42:
4565 013c 7944 add r1, pc
4566 013e A830 adds r0, r0, #168
4567 .LVL509:
4568 .L356:
4569 0140 0DF50052 add r2, sp, #8192
4570 0144 1C32 adds r2, r2, #28
4571 0146 FFF7FEFF bl fprintf(PLT)
4572 .LVL510:
4573 .L357:
1015:system/core/sdcard/sdcard.c **** return -ENOENT;
4574 .loc 1 1015 0
4575 014a 6FF00100 mvn r0, #1
4576 014e 0CE0 b .L338
4577 .LVL511:
4578 .L343:
4579 .LBE499:
1019:system/core/sdcard/sdcard.c **** return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path);
4580 .loc 1 1019 0
4581 0150 D8E90223 ldrd r2, [r8, #8]
4582 0154 2046 mov r0, r4
4583 0156 0096 str r6, [sp, #0]
4584 0158 0195 str r5, [sp, #4]
4585 015a CDF808A0 str sl, [sp, #8]
4586 015e 0397 str r7, [sp, #12]
4587 0160 FFF7FEFF bl fuse_reply_entry(PLT)
4588 .LVL512:
4589 0164 01E0 b .L338
4590 .L346:
994:system/core/sdcard/sdcard.c **** return -EACCES;
4591 .loc 1 994 0
4592 0166 6FF00C00 mvn r0, #12
4593 .LVL513:
4594 .L338:
1020:system/core/sdcard/sdcard.c **** }
4595 .loc 1 1020 0
4596 016a 0599 ldr r1, [sp, #20]
4597 016c 0DF54052 add r2, sp, #12288
4598 0170 1C32 adds r2, r2, #28
4599 0172 1268 ldr r2, [r2, #0]
4600 0174 0B68 ldr r3, [r1, #0]
4601 0176 9A42 cmp r2, r3
4602 0178 01D0 beq .L345
4603 017a FFF7FEFF bl __stack_chk_fail(PLT)
4604 .LVL514:
4605 .L345:
ARM GAS /tmp/ccMR8LsA.s page 138
4606 017e 09B0 add sp, sp, #36
4607 0180 0DF5405D add sp, sp, #12288
4608 0184 BDE8F08F pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
4609 .L359:
4610 .align 2
4611 .L358:
4612 0188 6C010000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC36+4)
4613 018c 00000000 .word __stack_chk_guard(GOT)
4614 0190 DA000000 .word .LC17-(.LPIC37+4)
4615 0194 C8000000 .word .LC20-(.LPIC38+4)
4616 0198 00000000 .word __sF(GOT)
4617 019c A8000000 .word .LC21-(.LPIC39+4)
4618 01a0 9E000000 .word .LC18-(.LPIC40+4)
4619 01a4 8A000000 .word .LC20-(.LPIC41+4)
4620 01a8 68000000 .word .LC21-(.LPIC42+4)
4621 .cfi_endproc
4622 .LFE145:
4623 .fnend
4625 .section .text.handle_fuse_requests,"ax",%progbits
4626 .align 1
4627 .thumb
4628 .thumb_func
4630 handle_fuse_requests:
4631 .fnstart
4632 .LFB111:
1551:system/core/sdcard/sdcard.c **** {
4633 .loc 1 1551 0
4634 .cfi_startproc
4635 @ args = 0, pretend = 0, frame = 32
4636 @ frame_needed = 0, uses_anonymous_args = 0
4637 .LVL515:
4638 0000 2DE9F04F push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
4639 .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
4640 .LCFI55:
4641 .cfi_def_cfa_offset 36
4642 .cfi_offset 4, -36
4643 .cfi_offset 5, -32
4644 .cfi_offset 6, -28
4645 .cfi_offset 7, -24
4646 .cfi_offset 8, -20
4647 .cfi_offset 9, -16
4648 .cfi_offset 10, -12
4649 .cfi_offset 11, -8
4650 .cfi_offset 14, -4
4651 0004 0646 mov r6, r0
4652 .LBB556:
1558:system/core/sdcard/sdcard.c **** ERROR("[%d] handle_fuse_requests: errno=%d\n", handler->token, errno);
4653 .loc 1 1558 0
4654 0006 DFF8AC92 ldr r9, .L421+12
1570:system/core/sdcard/sdcard.c **** ERROR("[%d] malformed header: len=%zu, hdr->len=%u\n",
4655 .loc 1 1570 0
4656 000a DFF8ACA2 ldr sl, .L421+16
1564:system/core/sdcard/sdcard.c **** ERROR("[%d] request too short: len=%zu\n", handler->token, (size_t)len);
4657 .loc 1 1564 0
4658 000e DFF8ACB2 ldr fp, .L421+20
1558:system/core/sdcard/sdcard.c **** ERROR("[%d] handle_fuse_requests: errno=%d\n", handler->token, errno);
4659 .loc 1 1558 0
ARM GAS /tmp/ccMR8LsA.s page 139
4660 .LPIC44:
4661 0012 F944 add r9, pc
4662 .LBE556:
1551:system/core/sdcard/sdcard.c **** {
4663 .loc 1 1551 0
4664 0014 2DED028B fstmfdd sp!, {d8}
4665 .vsave {d8}
4666 .LCFI56:
4667 .cfi_def_cfa_offset 44
4668 .cfi_offset 80, -44
4669 .pad #44
4670 0018 8BB0 sub sp, sp, #44
4671 .LCFI57:
4672 .cfi_def_cfa_offset 88
1552:system/core/sdcard/sdcard.c **** struct fuse* fuse = handler->fuse;
4673 .loc 1 1552 0
4674 001a 0768 ldr r7, [r0, #0]
4675 .LVL516:
4676 .LBB612:
1570:system/core/sdcard/sdcard.c **** ERROR("[%d] malformed header: len=%zu, hdr->len=%u\n",
4677 .loc 1 1570 0
4678 .LPIC46:
4679 001c FA44 add sl, pc
4680 .LBE612:
1551:system/core/sdcard/sdcard.c **** {
4681 .loc 1 1551 0
4682 001e DFF8A082 ldr r8, .L421+24
4683 .LBB613:
1564:system/core/sdcard/sdcard.c **** ERROR("[%d] request too short: len=%zu\n", handler->token, (size_t)len);
4684 .loc 1 1564 0
4685 .LPIC45:
4686 0022 FB44 add fp, pc
4687 .LBE613:
1551:system/core/sdcard/sdcard.c **** {
4688 .loc 1 1551 0
4689 .LPIC43:
4690 0024 F844 add r8, pc
4691 .LVL517:
4692 .L415:
4693 .LBB614:
1555:system/core/sdcard/sdcard.c **** handler->request_buffer, sizeof(handler->request_buffer));
4694 .loc 1 1555 0
4695 0026 06F10804 add r4, r6, #8
1554:system/core/sdcard/sdcard.c **** ssize_t len = read(fuse->fd,
4696 .loc 1 1554 0
4697 002a 3869 ldr r0, [r7, #16]
4698 002c 2146 mov r1, r4
4699 002e A04A ldr r2, .L421+8
4700 0030 FFF7FEFF bl read(PLT)
4701 .LVL518:
1556:system/core/sdcard/sdcard.c **** if (len < 0) {
4702 .loc 1 1556 0
4703 0034 031E subs r3, r0, #0
4704 0036 0BDA bge .L362
1557:system/core/sdcard/sdcard.c **** if (errno != EINTR) {
4705 .loc 1 1557 0
4706 0038 FFF7FEFF bl __errno(PLT)
ARM GAS /tmp/ccMR8LsA.s page 140
4707 .LVL519:
4708 003c 0268 ldr r2, [r0, #0]
4709 003e 042A cmp r2, #4
4710 0040 F1D0 beq .L415
1558:system/core/sdcard/sdcard.c **** ERROR("[%d] handle_fuse_requests: errno=%d\n", handler->token, errno);
4711 .loc 1 1558 0
4712 0042 A04D ldr r5, .L421+28
4713 0044 4946 mov r1, r9
4714 0046 0368 ldr r3, [r0, #0]
4715 0048 58F80500 ldr r0, [r8, r5]
4716 004c A830 adds r0, r0, #168
4717 004e 06E0 b .L416
4718 .LVL520:
4719 .L362:
1563:system/core/sdcard/sdcard.c **** if ((size_t)len < sizeof(struct fuse_in_header)) {
4720 .loc 1 1563 0
4721 0050 272B cmp r3, #39
4722 0052 08D8 bhi .L365
1564:system/core/sdcard/sdcard.c **** ERROR("[%d] request too short: len=%zu\n", handler->token, (size_t)len);
4723 .loc 1 1564 0
4724 0054 9B48 ldr r0, .L421+28
4725 .LVL521:
4726 0056 5946 mov r1, fp
4727 0058 58F80000 ldr r0, [r8, r0]
4728 005c A830 adds r0, r0, #168
4729 .LVL522:
4730 .L416:
4731 005e 7268 ldr r2, [r6, #4]
4732 0060 FFF7FEFF bl fprintf(PLT)
4733 .LVL523:
1565:system/core/sdcard/sdcard.c **** continue;
4734 .loc 1 1565 0
4735 0064 DFE7 b .L415
4736 .LVL524:
4737 .L365:
1569:system/core/sdcard/sdcard.c **** if (hdr->len != (size_t)len) {
4738 .loc 1 1569 0
4739 0066 B268 ldr r2, [r6, #8]
4740 0068 9A42 cmp r2, r3
4741 006a 09D0 beq .L366
1570:system/core/sdcard/sdcard.c **** ERROR("[%d] malformed header: len=%zu, hdr->len=%u\n",
4742 .loc 1 1570 0
4743 006c 954C ldr r4, .L421+28
4744 .LVL525:
4745 006e 5146 mov r1, sl
4746 0070 58F80400 ldr r0, [r8, r4]
4747 .LVL526:
4748 0074 0092 str r2, [sp, #0]
4749 0076 7268 ldr r2, [r6, #4]
4750 0078 A830 adds r0, r0, #168
4751 007a FFF7FEFF bl fprintf(PLT)
4752 .LVL527:
1572:system/core/sdcard/sdcard.c **** continue;
4753 .loc 1 1572 0
4754 007e D2E7 b .L415
4755 .LVL528:
4756 .L366:
ARM GAS /tmp/ccMR8LsA.s page 141
4757 .LBB557:
4758 .LBB558:
1430:system/core/sdcard/sdcard.c **** switch (hdr->opcode) {
4759 .loc 1 1430 0
4760 0080 F368 ldr r3, [r6, #12]
4761 .LBE558:
4762 .LBE557:
1575:system/core/sdcard/sdcard.c **** const void *data = handler->request_buffer + sizeof(struct fuse_in_header);
4763 .loc 1 1575 0
4764 0082 06F13002 add r2, r6, #48
4765 .LVL529:
1577:system/core/sdcard/sdcard.c **** __u64 unique = hdr->unique;
4766 .loc 1 1577 0
4767 0086 96ED048B fldd d8, [r6, #16] @ int
4768 .LVL530:
4769 .LBB607:
4770 .LBB604:
1430:system/core/sdcard/sdcard.c **** switch (hdr->opcode) {
4771 .loc 1 1430 0
4772 008a 591E subs r1, r3, #1
4773 008c 1C29 cmp r1, #28
4774 008e 00F20681 bhi .L403
4775 0092 DFE811F0 tbh [pc, r1, lsl #1]
4776 .LVL531:
4777 .L388:
4778 0096 1D00 .2byte (.L368-.L388)/2
4779 0098 2200 .2byte (.L369-.L388)/2
4780 009a 4700 .2byte (.L370-.L388)/2
4781 009c 4C00 .2byte (.L371-.L388)/2
4782 009e 0401 .2byte (.L403-.L388)/2
4783 00a0 0401 .2byte (.L403-.L388)/2
4784 00a2 0401 .2byte (.L403-.L388)/2
4785 00a4 5100 .2byte (.L372-.L388)/2
4786 00a6 5800 .2byte (.L373-.L388)/2
4787 00a8 5F00 .2byte (.L374-.L388)/2
4788 00aa 6400 .2byte (.L375-.L388)/2
4789 00ac 6900 .2byte (.L376-.L388)/2
4790 00ae 0401 .2byte (.L403-.L388)/2
4791 00b0 7900 .2byte (.L377-.L388)/2
4792 00b2 7E00 .2byte (.L378-.L388)/2
4793 00b4 9600 .2byte (.L379-.L388)/2
4794 00b6 AE00 .2byte (.L380-.L388)/2
4795 00b8 B300 .2byte (.L381-.L388)/2
4796 00ba 0401 .2byte (.L403-.L388)/2
4797 00bc B800 .2byte (.L382-.L388)/2
4798 00be 0401 .2byte (.L403-.L388)/2
4799 00c0 0401 .2byte (.L403-.L388)/2
4800 00c2 0401 .2byte (.L403-.L388)/2
4801 00c4 0401 .2byte (.L403-.L388)/2
4802 00c6 F800 .2byte (.L404-.L388)/2
4803 00c8 DB00 .2byte (.L384-.L388)/2
4804 00ca C900 .2byte (.L385-.L388)/2
4805 00cc CE00 .2byte (.L386-.L388)/2
4806 00ce D300 .2byte (.L387-.L388)/2
4807 .L368:
4808 .LVL532:
4809 .LBB559:
ARM GAS /tmp/ccMR8LsA.s page 142
1433:system/core/sdcard/sdcard.c **** return handle_lookup(fuse, handler, hdr, name);
4810 .loc 1 1433 0
4811 00d0 3846 mov r0, r7
4812 00d2 2146 mov r1, r4
4813 00d4 FFF7FEFF bl handle_lookup.isra.22(PLT)
4814 .LVL533:
4815 00d8 D2E0 b .L389
4816 .LVL534:
4817 .L369:
4818 .LBE559:
4819 .LBB560:
4820 .LBB561:
4821 .LBB562:
842:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
4822 .loc 1 842 0
4823 00da 3846 mov r0, r7
4824 00dc FFF7FEFF bl pthread_mutex_lock(PLT)
4825 .LVL535:
843:system/core/sdcard/sdcard.c **** node = lookup_node_by_id_locked(fuse, hdr->nodeid);
4826 .loc 1 843 0
4827 00e0 D6E90623 ldrd r2, [r6, #24]
4828 .LVL536:
4829 .LBB563:
4830 .LBB564:
640:system/core/sdcard/sdcard.c **** if (nid == FUSE_ROOT_ID) {
4831 .loc 1 640 0
4832 00e4 002B cmp r3, #0
4833 00e6 08BF it eq
4834 00e8 012A cmpeq r2, #1
4835 00ea 02D1 bne .L390
641:system/core/sdcard/sdcard.c **** return &fuse->root;
4836 .loc 1 641 0
4837 00ec 07F12003 add r3, r7, #32
4838 00f0 05E0 b .L391
4839 .L390:
4840 .LBE564:
4841 .LBE563:
846:system/core/sdcard/sdcard.c **** if (node) {
4842 .loc 1 846 0
4843 00f2 1346 mov r3, r2
4844 00f4 1AB9 cbnz r2, .L391
4845 .LVL537:
4846 .L395:
852:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
4847 .loc 1 852 0
4848 00f6 3846 mov r0, r7
4849 00f8 FFF7FEFF bl pthread_mutex_unlock(PLT)
4850 .LVL538:
4851 00fc 93E7 b .L415
4852 .LVL539:
4853 .L391:
4854 .LBB565:
847:system/core/sdcard/sdcard.c **** __u64 n = req->nlookup;
4855 .loc 1 847 0
4856 00fe D6E90C45 ldrd r4, [r6, #48]
4857 .LVL540:
4858 0102 9FED698B fldd d8, .L421 @ int
ARM GAS /tmp/ccMR8LsA.s page 143
4859 .LVL541:
4860 0106 09E0 b .L393
4861 .LVL542:
4862 .L394:
849:system/core/sdcard/sdcard.c **** release_node_locked(node);
4863 .loc 1 849 0
4864 0108 1846 mov r0, r3
4865 010a 0393 str r3, [sp, #12]
4866 010c FFF7FEFF bl release_node_locked(PLT)
4867 .LVL543:
4868 0110 51EC180B fmrrd r0, r1, d8 @ int
4869 0114 039B ldr r3, [sp, #12]
4870 0116 2418 adds r4, r4, r0
4871 0118 45EB0105 adc r5, r5, r1
4872 .L393:
848:system/core/sdcard/sdcard.c **** while (n--) {
4873 .loc 1 848 0
4874 011c 54EA0501 orrs r1, r4, r5
4875 0120 F2D1 bne .L394
4876 0122 E8E7 b .L395
4877 .LVL544:
4878 .L370:
4879 .LBE565:
4880 .LBE562:
4881 .LBE561:
4882 .LBE560:
4883 .LBB566:
1443:system/core/sdcard/sdcard.c **** return handle_getattr(fuse, handler, hdr, req);
4884 .loc 1 1443 0
4885 0124 3846 mov r0, r7
4886 0126 2146 mov r1, r4
4887 0128 FFF7FEFF bl handle_getattr.isra.5(PLT)
4888 .LVL545:
4889 012c A8E0 b .L389
4890 .LVL546:
4891 .L371:
4892 .LBE566:
4893 .LBB567:
1448:system/core/sdcard/sdcard.c **** return handle_setattr(fuse, handler, hdr, req);
4894 .loc 1 1448 0
4895 012e 3846 mov r0, r7
4896 0130 2146 mov r1, r4
4897 0132 FFF7FEFF bl handle_setattr.isra.13(PLT)
4898 .LVL547:
4899 0136 A3E0 b .L389
4900 .LVL548:
4901 .L372:
4902 .LBE567:
4903 .LBB568:
1456:system/core/sdcard/sdcard.c **** return handle_mknod(fuse, handler, hdr, req, name);
4904 .loc 1 1456 0
4905 0138 3846 mov r0, r7
4906 013a 2146 mov r1, r4
4907 013c 06F14003 add r3, r6, #64
4908 .LVL549:
4909 0140 FFF7FEFF bl handle_mknod.isra.23(PLT)
4910 .LVL550:
ARM GAS /tmp/ccMR8LsA.s page 144
4911 0144 9CE0 b .L389
4912 .LVL551:
4913 .L373:
4914 .LBE568:
4915 .LBB569:
1462:system/core/sdcard/sdcard.c **** return handle_mkdir(fuse, handler, hdr, req, name);
4916 .loc 1 1462 0
4917 0146 3846 mov r0, r7
4918 0148 2146 mov r1, r4
4919 014a 06F13803 add r3, r6, #56
4920 .LVL552:
4921 014e FFF7FEFF bl handle_mkdir.isra.24(PLT)
4922 .LVL553:
4923 0152 95E0 b .L389
4924 .LVL554:
4925 .L374:
4926 .LBE569:
4927 .LBB570:
1467:system/core/sdcard/sdcard.c **** return handle_unlink(fuse, handler, hdr, name);
4928 .loc 1 1467 0
4929 0154 3846 mov r0, r7
4930 0156 2146 mov r1, r4
4931 0158 FFF7FEFF bl handle_unlink.isra.15(PLT)
4932 .LVL555:
4933 015c 90E0 b .L389
4934 .LVL556:
4935 .L375:
4936 .LBE570:
4937 .LBB571:
1472:system/core/sdcard/sdcard.c **** return handle_rmdir(fuse, handler, hdr, name);
4938 .loc 1 1472 0
4939 015e 3846 mov r0, r7
4940 0160 2146 mov r1, r4
4941 0162 FFF7FEFF bl handle_rmdir.isra.16(PLT)
4942 .LVL557:
4943 0166 8BE0 b .L389
4944 .LVL558:
4945 .L376:
4946 .LBE571:
4947 .LBB572:
1477:system/core/sdcard/sdcard.c **** const char *old_name = ((const char*) data) + sizeof(*req);
4948 .loc 1 1477 0
4949 0168 06F13805 add r5, r6, #56
4950 .LVL559:
4951 .LBB573:
4952 .LBB574:
217:bionic/libc/include/string.h **** return __builtin_strlen(s);
4953 .loc 2 217 0
4954 016c 0392 str r2, [sp, #12]
4955 016e 2846 mov r0, r5
4956 0170 FFF7FEFF bl strlen(PLT)
4957 .LVL560:
4958 .LBE574:
4959 .LBE573:
1478:system/core/sdcard/sdcard.c **** const char *new_name = old_name + strlen(old_name) + 1;
4960 .loc 1 1478 0
4961 0174 411C adds r1, r0, #1
ARM GAS /tmp/ccMR8LsA.s page 145
1479:system/core/sdcard/sdcard.c **** return handle_rename(fuse, handler, hdr, req, old_name, new_name);
4962 .loc 1 1479 0
4963 0176 039A ldr r2, [sp, #12]
1478:system/core/sdcard/sdcard.c **** const char *new_name = old_name + strlen(old_name) + 1;
4964 .loc 1 1478 0
4965 0178 6B18 adds r3, r5, r1
1479:system/core/sdcard/sdcard.c **** return handle_rename(fuse, handler, hdr, req, old_name, new_name);
4966 .loc 1 1479 0
4967 017a 3846 mov r0, r7
4968 .LVL561:
4969 017c 0093 str r3, [sp, #0]
4970 017e 2146 mov r1, r4
4971 .LVL562:
4972 0180 2B46 mov r3, r5
4973 0182 FFF7FEFF bl handle_rename.isra.17(PLT)
4974 .LVL563:
4975 0186 7BE0 b .L389
4976 .LVL564:
4977 .L377:
4978 .LBE572:
4979 .LBB575:
1485:system/core/sdcard/sdcard.c **** return handle_open(fuse, handler, hdr, req);
4980 .loc 1 1485 0
4981 0188 3846 mov r0, r7
4982 018a 2146 mov r1, r4
4983 018c FFF7FEFF bl handle_open.isra.14(PLT)
4984 .LVL565:
4985 0190 76E0 b .L389
4986 .LVL566:
4987 .L378:
4988 .LBE575:
4989 .LBB576:
4990 .LBB577:
4991 .LBB578:
1218:system/core/sdcard/sdcard.c **** __u32 size = req->size;
4992 .loc 1 1218 0
4993 0192 326C ldr r2, [r6, #64]
4994 .LVL567:
4995 .LBB579:
4996 .LBB580:
241:system/core/sdcard/sdcard.c **** return (void *) (uintptr_t) nid;
4997 .loc 1 241 0
4998 0194 336B ldr r3, [r6, #48]
4999 .LVL568:
5000 .LBE580:
5001 .LBE579:
1219:system/core/sdcard/sdcard.c **** __u64 offset = req->offset;
5002 .loc 1 1219 0
5003 0196 D6E90E01 ldrd r0, [r6, #56]
5004 .LVL569:
1228:system/core/sdcard/sdcard.c **** if (size > sizeof(handler->read_buffer)) {
5005 .loc 1 1228 0
5006 019a B2F5003F cmp r2, #131072
5007 019e 0DD8 bhi .L405
1231:system/core/sdcard/sdcard.c **** res = pread64(h->fd, handler->read_buffer, size, offset);
5008 .loc 1 1231 0
5009 01a0 06F10805 add r5, r6, #8
ARM GAS /tmp/ccMR8LsA.s page 146
5010 01a4 CDE90001 strd r0, [sp]
5011 01a8 2946 mov r1, r5
5012 01aa 1868 ldr r0, [r3, #0]
5013 .LVL570:
5014 01ac FFF7FEFF bl pread64(PLT)
5015 .LVL571:
1232:system/core/sdcard/sdcard.c **** if (res < 0) {
5016 .loc 1 1232 0
5017 01b0 0028 cmp r0, #0
5018 01b2 00DA bge .L397
5019 01b4 33E0 b .L419
5020 .L397:
1235:system/core/sdcard/sdcard.c **** fuse_reply(fuse, unique, handler->read_buffer, res);
5021 .loc 1 1235 0
5022 01b6 0095 str r5, [sp, #0]
5023 01b8 0190 str r0, [sp, #4]
5024 01ba 5BE0 b .L417
5025 .LVL572:
5026 .L405:
1229:system/core/sdcard/sdcard.c **** return -EINVAL;
5027 .loc 1 1229 0
5028 01bc 6FF01500 mvn r0, #21
5029 .LVL573:
5030 01c0 62E0 b .L383
5031 .LVL574:
5032 .L379:
5033 .LBE578:
5034 .LBE577:
5035 .LBE576:
5036 .LBB581:
5037 .LBB582:
5038 .LBB583:
1249:system/core/sdcard/sdcard.c **** res = pwrite64(h->fd, buffer, req->size, req->offset);
5039 .loc 1 1249 0
5040 01c2 D6E90E01 ldrd r0, [r6, #56]
5041 01c6 356B ldr r5, [r6, #48]
5042 01c8 326C ldr r2, [r6, #64]
5043 .LVL575:
5044 01ca CDE90001 strd r0, [sp]
5045 01ce 06F15801 add r1, r6, #88
5046 .LVL576:
5047 01d2 2868 ldr r0, [r5, #0]
5048 01d4 FFF7FEFF bl pwrite64(PLT)
5049 .LVL577:
1250:system/core/sdcard/sdcard.c **** if (res < 0) {
5050 .loc 1 1250 0
5051 01d8 0028 cmp r0, #0
5052 01da 00DA bge .L398
5053 01dc 1FE0 b .L419
5054 .L398:
1253:system/core/sdcard/sdcard.c **** out.size = res;
5055 .loc 1 1253 0
5056 01de 0AA9 add r1, sp, #40
1254:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
5057 .loc 1 1254 0
5058 01e0 0824 movs r4, #8
5059 .LVL578:
ARM GAS /tmp/ccMR8LsA.s page 147
1253:system/core/sdcard/sdcard.c **** out.size = res;
5060 .loc 1 1253 0
5061 01e2 41F8180D str r0, [r1, #-24]!
1254:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
5062 .loc 1 1254 0
5063 01e6 3846 mov r0, r7
5064 .LVL579:
5065 01e8 D6E90423 ldrd r2, [r6, #16]
5066 01ec 0091 str r1, [sp, #0]
5067 01ee 0194 str r4, [sp, #4]
5068 01f0 43E0 b .L418
5069 .LVL580:
5070 .L380:
5071 .LBE583:
5072 .LBE582:
5073 .LBE581:
1500:system/core/sdcard/sdcard.c **** return handle_statfs(fuse, handler, hdr);
5074 .loc 1 1500 0
5075 01f2 3846 mov r0, r7
5076 01f4 2146 mov r1, r4
5077 01f6 FFF7FEFF bl handle_statfs.isra.19(PLT)
5078 .LVL581:
5079 01fa 41E0 b .L389
5080 .LVL582:
5081 .L381:
5082 .LBB584:
5083 .LBB585:
5084 .LBB586:
5085 .LBB587:
5086 .LBB588:
241:system/core/sdcard/sdcard.c **** return (void *) (uintptr_t) nid;
5087 .loc 1 241 0
5088 01fc 356B ldr r5, [r6, #48]
5089 .LBE588:
5090 .LBE587:
1295:system/core/sdcard/sdcard.c **** close(h->fd);
5091 .loc 1 1295 0
5092 01fe 2868 ldr r0, [r5, #0]
5093 0200 FFF7FEFF bl close(PLT)
5094 .LVL583:
5095 0204 1EE0 b .L420
5096 .LVL584:
5097 .L382:
5098 .LBE586:
5099 .LBE585:
5100 .LBE584:
5101 .LBB589:
5102 .LBB590:
1303:system/core/sdcard/sdcard.c **** int is_data_sync = req->fsync_flags & 1;
5103 .loc 1 1303 0
5104 0206 B26B ldr r2, [r6, #56]
5105 .LVL585:
5106 .LBB591:
5107 .LBB592:
5108 .LBB593:
241:system/core/sdcard/sdcard.c **** return (void *) (uintptr_t) nid;
5109 .loc 1 241 0
ARM GAS /tmp/ccMR8LsA.s page 148
5110 0208 336B ldr r3, [r6, #48]
5111 .LBE593:
5112 .LBE592:
1309:system/core/sdcard/sdcard.c **** res = is_data_sync ? fdatasync(h->fd) : fsync(h->fd);
5113 .loc 1 1309 0
5114 020a D107 lsls r1, r2, #31
5115 020c 1868 ldr r0, [r3, #0]
5116 020e 02D5 bpl .L400
5117 0210 FFF7FEFF bl fdatasync(PLT)
5118 .LVL586:
5119 0214 01E0 b .L401
5120 .LVL587:
5121 .L400:
5122 0216 FFF7FEFF bl fsync(PLT)
5123 .LVL588:
5124 .L401:
1310:system/core/sdcard/sdcard.c **** if (res < 0) {
5125 .loc 1 1310 0
5126 021a 0028 cmp r0, #0
5127 021c 33DA bge .L404
5128 .LVL589:
5129 .L419:
1311:system/core/sdcard/sdcard.c **** return -errno;
5130 .loc 1 1311 0
5131 021e FFF7FEFF bl __errno(PLT)
5132 .LVL590:
5133 0222 0268 ldr r2, [r0, #0]
5134 0224 5042 negs r0, r2
5135 0226 2BE0 b .L389
5136 .LVL591:
5137 .L385:
5138 .LBE591:
5139 .LBE590:
5140 .LBE589:
5141 .LBB594:
1523:system/core/sdcard/sdcard.c **** return handle_opendir(fuse, handler, hdr, req);
5142 .loc 1 1523 0
5143 0228 3846 mov r0, r7
5144 022a 2146 mov r1, r4
5145 022c FFF7FEFF bl handle_opendir.isra.10(PLT)
5146 .LVL592:
5147 0230 26E0 b .L389
5148 .LVL593:
5149 .L386:
5150 .LBE594:
5151 .LBB595:
1528:system/core/sdcard/sdcard.c **** return handle_readdir(fuse, handler, hdr, req);
5152 .loc 1 1528 0
5153 0232 3846 mov r0, r7
5154 0234 2146 mov r1, r4
5155 0236 FFF7FEFF bl handle_readdir.isra.21(PLT)
5156 .LVL594:
5157 023a 21E0 b .L389
5158 .LVL595:
5159 .L387:
5160 .LBE595:
5161 .LBB596:
ARM GAS /tmp/ccMR8LsA.s page 149
5162 .LBB597:
5163 .LBB598:
5164 .LBB599:
5165 .LBB600:
241:system/core/sdcard/sdcard.c **** return (void *) (uintptr_t) nid;
5166 .loc 1 241 0
5167 023c 356B ldr r5, [r6, #48]
5168 .LBE600:
5169 .LBE599:
1404:system/core/sdcard/sdcard.c **** closedir(h->d);
5170 .loc 1 1404 0
5171 023e 2868 ldr r0, [r5, #0]
5172 0240 FFF7FEFF bl closedir(PLT)
5173 .LVL596:
5174 .L420:
1405:system/core/sdcard/sdcard.c **** free(h);
5175 .loc 1 1405 0
5176 0244 2846 mov r0, r5
5177 0246 FFF7FEFF bl free(PLT)
5178 .LVL597:
5179 024a 1CE0 b .L404
5180 .LVL598:
5181 .L384:
5182 .LBE598:
5183 .LBE597:
5184 .LBE596:
5185 .LBB601:
5186 .LBB602:
5187 .LBB603:
1418:system/core/sdcard/sdcard.c **** out.max_readahead = req->max_readahead;
5188 .loc 1 1418 0
5189 024c B26B ldr r2, [r6, #56]
5190 .LVL599:
1416:system/core/sdcard/sdcard.c **** out.major = FUSE_KERNEL_VERSION;
5191 .loc 1 1416 0
5192 024e 0720 movs r0, #7
1417:system/core/sdcard/sdcard.c **** out.minor = FUSE_KERNEL_MINOR_VERSION;
5193 .loc 1 1417 0
5194 0250 0D24 movs r4, #13
5195 .LVL600:
1420:system/core/sdcard/sdcard.c **** out.max_background = 32;
5196 .loc 1 1420 0
5197 0252 2021 movs r1, #32
1416:system/core/sdcard/sdcard.c **** out.major = FUSE_KERNEL_VERSION;
5198 .loc 1 1416 0
5199 0254 0490 str r0, [sp, #16]
1419:system/core/sdcard/sdcard.c **** out.flags = FUSE_ATOMIC_O_TRUNC | FUSE_BIG_WRITES;
5200 .loc 1 1419 0
5201 0256 2823 movs r3, #40
1417:system/core/sdcard/sdcard.c **** out.minor = FUSE_KERNEL_MINOR_VERSION;
5202 .loc 1 1417 0
5203 0258 0594 str r4, [sp, #20]
1422:system/core/sdcard/sdcard.c **** out.max_write = MAX_WRITE;
5204 .loc 1 1422 0
5205 025a 4FF48025 mov r5, #262144
1423:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
5206 .loc 1 1423 0
ARM GAS /tmp/ccMR8LsA.s page 150
5207 025e 04A8 add r0, sp, #16
5208 0260 1824 movs r4, #24
1418:system/core/sdcard/sdcard.c **** out.max_readahead = req->max_readahead;
5209 .loc 1 1418 0
5210 0262 0692 str r2, [sp, #24]
1419:system/core/sdcard/sdcard.c **** out.flags = FUSE_ATOMIC_O_TRUNC | FUSE_BIG_WRITES;
5211 .loc 1 1419 0
5212 0264 0793 str r3, [sp, #28]
1420:system/core/sdcard/sdcard.c **** out.max_background = 32;
5213 .loc 1 1420 0
5214 0266 ADF82010 strh r1, [sp, #32] @ movhi
1421:system/core/sdcard/sdcard.c **** out.congestion_threshold = 32;
5215 .loc 1 1421 0
5216 026a ADF82210 strh r1, [sp, #34] @ movhi
1422:system/core/sdcard/sdcard.c **** out.max_write = MAX_WRITE;
5217 .loc 1 1422 0
5218 026e 0995 str r5, [sp, #36]
1423:system/core/sdcard/sdcard.c **** fuse_reply(fuse, hdr->unique, &out, sizeof(out));
5219 .loc 1 1423 0
5220 0270 0090 str r0, [sp, #0]
5221 0272 0194 str r4, [sp, #4]
5222 .LVL601:
5223 .L417:
5224 0274 3846 mov r0, r7
5225 0276 53EC182B fmrrd r2, r3, d8 @ int
5226 .LVL602:
5227 .L418:
5228 027a FFF7FEFF bl fuse_reply(PLT)
5229 .LVL603:
5230 027e D2E6 b .L415
5231 .LVL604:
5232 .L389:
5233 .LBE603:
5234 .LBE602:
5235 .LBE601:
5236 .LBE604:
5237 .LBE607:
1583:system/core/sdcard/sdcard.c **** if (res != NO_STATUS) {
5238 .loc 1 1583 0
5239 0280 0128 cmp r0, #1
5240 0282 01D1 bne .L383
5241 0284 CFE6 b .L415
5242 .L404:
5243 .LBB608:
5244 .LBB605:
1518:system/core/sdcard/sdcard.c **** return handle_flush(fuse, handler, hdr);
5245 .loc 1 1518 0
5246 0286 0020 movs r0, #0
5247 .L383:
5248 .LVL605:
5249 .LBE605:
5250 .LBE608:
5251 .LBB609:
5252 .LBB610:
739:system/core/sdcard/sdcard.c **** hdr.len = sizeof(hdr);
5253 .loc 1 739 0
5254 0288 1022 movs r2, #16
ARM GAS /tmp/ccMR8LsA.s page 151
740:system/core/sdcard/sdcard.c **** hdr.error = err;
5255 .loc 1 740 0
5256 028a 0590 str r0, [sp, #20]
739:system/core/sdcard/sdcard.c **** hdr.len = sizeof(hdr);
5257 .loc 1 739 0
5258 028c 0492 str r2, [sp, #16]
742:system/core/sdcard/sdcard.c **** write(fuse->fd, &hdr, sizeof(hdr));
5259 .loc 1 742 0
5260 028e 0DEB0201 add r1, sp, r2
741:system/core/sdcard/sdcard.c **** hdr.unique = unique;
5261 .loc 1 741 0
5262 0292 8DED068B fstd d8, [sp, #24] @ int
742:system/core/sdcard/sdcard.c **** write(fuse->fd, &hdr, sizeof(hdr));
5263 .loc 1 742 0
5264 0296 3869 ldr r0, [r7, #16]
5265 .LVL606:
5266 0298 FFF7FEFF bl write(PLT)
5267 .LVL607:
5268 029c C3E6 b .L415
5269 .LVL608:
5270 .L403:
5271 .LBE610:
5272 .LBE609:
5273 .LBB611:
5274 .LBB606:
1545:system/core/sdcard/sdcard.c **** return -ENOSYS;
5275 .loc 1 1545 0
5276 029e 6FF02500 mvn r0, #37
5277 02a2 F1E7 b .L383
5278 .L422:
5279 02a4 AFF30080 .align 3
5280 .L421:
5281 02a8 FFFFFFFF .word -1
5282 02ac FFFFFFFF .word -1
5283 02b0 50000400 .word 262224
5284 02b4 9E020000 .word .LC22-(.LPIC44+4)
5285 02b8 98020000 .word .LC24-(.LPIC46+4)
5286 02bc 96020000 .word .LC23-(.LPIC45+4)
5287 02c0 98020000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC43+4)
5288 02c4 00000000 .word __sF(GOT)
5289 .LBE606:
5290 .LBE611:
5291 .LBE614:
5292 .cfi_endproc
5293 .LFE111:
5294 .fnend
5296 .section .text.run,"ax",%progbits
5297 .align 1
5298 .thumb
5299 .thumb_func
5301 run:
5302 .fnstart
5303 .LFB119:
1771:system/core/sdcard/sdcard.c ****
1772:system/core/sdcard/sdcard.c **** static int run(const char* source_path, const char* dest_path, uid_t uid,
1773:system/core/sdcard/sdcard.c **** gid_t gid, gid_t write_gid, int num_threads, derive_t derive,
1774:system/core/sdcard/sdcard.c **** bool split_perms) {
ARM GAS /tmp/ccMR8LsA.s page 152
5304 .loc 1 1774 0
5305 .cfi_startproc
5306 @ args = 16, pretend = 0, frame = 6544
5307 @ frame_needed = 0, uses_anonymous_args = 0
5308 .LVL609:
5309 0000 2DE9F04F push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
5310 .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
5311 .LCFI58:
5312 .cfi_def_cfa_offset 36
5313 .cfi_offset 4, -36
5314 .cfi_offset 5, -32
5315 .cfi_offset 6, -28
5316 .cfi_offset 7, -24
5317 .cfi_offset 8, -20
5318 .cfi_offset 9, -16
5319 .cfi_offset 10, -12
5320 .cfi_offset 11, -8
5321 .cfi_offset 14, -4
5322 0004 9946 mov r9, r3
5323 0006 DFF83045 ldr r4, .L481+4
5324 .pad #6528
5325 000a ADF5CC5D sub sp, sp, #6528
5326 .LCFI59:
5327 .cfi_def_cfa_offset 6564
5328 .pad #28
5329 000e 87B0 sub sp, sp, #28
5330 .LCFI60:
5331 .cfi_def_cfa_offset 6592
5332 .loc 1 1774 0
5333 0010 1746 mov r7, r2
5334 0012 DFF82835 ldr r3, .L481+8
5335 .LVL610:
5336 0016 8A46 mov sl, r1
5337 .LPIC55:
5338 0018 7C44 add r4, pc
5339 .LBB645:
5340 .LBB646:
5341 .loc 3 75 0
5342 001a DFF824B5 ldr fp, .L481+12
5343 .LBE646:
5344 .LBE645:
5345 .loc 1 1774 0
5346 001e 0646 mov r6, r0
5347 0020 0DF5CC51 add r1, sp, #6528
5348 .LVL611:
5349 0024 54F80380 ldr r8, [r4, r3]
5350 0028 0DF5CE50 add r0, sp, #6592
5351 .LVL612:
5352 002c 0830 adds r0, r0, #8
5353 002e 1431 adds r1, r1, #20
5354 0030 0568 ldr r5, [r0, #0]
5355 .LBB649:
5356 .LBB647:
5357 .loc 3 75 0
5358 .LPIC56:
5359 0032 FB44 add fp, pc
5360 .LBE647:
ARM GAS /tmp/ccMR8LsA.s page 153
5361 .LBE649:
5362 .loc 1 1774 0
5363 0034 D8F80020 ldr r2, [r8, #0]
5364 .LVL613:
1775:system/core/sdcard/sdcard.c **** int fd;
1776:system/core/sdcard/sdcard.c **** char opts[256];
1777:system/core/sdcard/sdcard.c **** int res;
1778:system/core/sdcard/sdcard.c **** struct fuse fuse;
1779:system/core/sdcard/sdcard.c ****
1780:system/core/sdcard/sdcard.c **** /* cleanup from previous instance, if necessary */
1781:system/core/sdcard/sdcard.c **** umount2(dest_path, 2);
5365 .loc 1 1781 0
5366 0038 5046 mov r0, sl
1774:system/core/sdcard/sdcard.c **** bool split_perms) {
5367 .loc 1 1774 0
5368 003a 0A60 str r2, [r1, #0]
5369 .loc 1 1781 0
5370 003c 0221 movs r1, #2
5371 003e FFF7FEFF bl umount2(PLT)
5372 .LVL614:
5373 .LBB650:
5374 .LBB648:
5375 .loc 3 75 0
5376 0042 0221 movs r1, #2
5377 0044 5846 mov r0, fp
5378 0046 FFF7FEFF bl open(PLT)
5379 .LVL615:
5380 .LBE648:
5381 .LBE650:
1782:system/core/sdcard/sdcard.c ****
1783:system/core/sdcard/sdcard.c **** fd = open("/dev/fuse", O_RDWR);
1784:system/core/sdcard/sdcard.c **** if (fd < 0){
5382 .loc 1 1784 0
5383 004a 0028 cmp r0, #0
5384 004c CDF80C80 str r8, [sp, #12]
5385 0050 0290 str r0, [sp, #8]
5386 0052 12DA bge .L424
1785:system/core/sdcard/sdcard.c **** ERROR("cannot open fuse device: %s\n", strerror(errno));
5387 .loc 1 1785 0
5388 0054 DFF8ECA4 ldr sl, .L481+16
5389 .LVL616:
5390 0058 FFF7FEFF bl __errno(PLT)
5391 .LVL617:
5392 005c 0068 ldr r0, [r0, #0]
5393 005e FFF7FEFF bl strerror(PLT)
5394 .LVL618:
5395 0062 DFF8E414 ldr r1, .L481+20
5396 0066 0246 mov r2, r0
5397 0068 54F80A00 ldr r0, [r4, sl]
1786:system/core/sdcard/sdcard.c **** return -1;
5398 .loc 1 1786 0
5399 006c 4FF0FF3A mov sl, #-1
1785:system/core/sdcard/sdcard.c **** ERROR("cannot open fuse device: %s\n", strerror(errno));
5400 .loc 1 1785 0
5401 .LPIC57:
5402 0070 7944 add r1, pc
5403 0072 A830 adds r0, r0, #168
ARM GAS /tmp/ccMR8LsA.s page 154
5404 0074 FFF7FEFF bl fprintf(PLT)
5405 .LVL619:
5406 0078 4CE2 b .L425
5407 .LVL620:
5408 .L424:
5409 .LBB651:
5410 .LBB652:
5411 .loc 4 478 0
5412 007a DFF8D024 ldr r2, .L481+24
1787:system/core/sdcard/sdcard.c **** }
1788:system/core/sdcard/sdcard.c ****
1789:system/core/sdcard/sdcard.c **** snprintf(opts, sizeof(opts),
5413 .loc 1 1789 0
5414 007e 0DF11808 add r8, sp, #24
5415 .LVL621:
5416 .loc 4 478 0
5417 0082 4FF48071 mov r1, #256
5418 0086 029B ldr r3, [sp, #8]
5419 0088 8DE88002 stmia sp, {r7, r9}
5420 008c 4046 mov r0, r8
5421 .LPIC58:
5422 008e 7A44 add r2, pc
5423 0090 FFF7FEFF bl snprintf(PLT)
5424 .LVL622:
5425 .LBE652:
5426 .LBE651:
1790:system/core/sdcard/sdcard.c **** "fd=%i,rootmode=40000,default_permissions,allow_other,user_id=%d,group_id=%d",
1791:system/core/sdcard/sdcard.c **** fd, uid, gid);
1792:system/core/sdcard/sdcard.c ****
1793:system/core/sdcard/sdcard.c **** res = mount("/dev/fuse", dest_path, "fuse", MS_NOSUID | MS_NODEV, opts);
5427 .loc 1 1793 0
5428 0094 DFF8B824 ldr r2, .L481+28
5429 0098 5146 mov r1, sl
5430 009a 0623 movs r3, #6
5431 009c CDF80080 str r8, [sp, #0]
5432 00a0 5846 mov r0, fp
5433 .LPIC60:
5434 00a2 7A44 add r2, pc
5435 00a4 FFF7FEFF bl mount(PLT)
5436 .LVL623:
1794:system/core/sdcard/sdcard.c **** if (res < 0) {
5437 .loc 1 1794 0
5438 00a8 B0F1000A subs sl, r0, #0
5439 .LVL624:
5440 00ac 0DDA bge .L426
1795:system/core/sdcard/sdcard.c **** ERROR("cannot mount fuse filesystem: %s\n", strerror(errno));
5441 .loc 1 1795 0
5442 00ae FFF7FEFF bl __errno(PLT)
5443 .LVL625:
5444 00b2 0068 ldr r0, [r0, #0]
5445 00b4 FFF7FEFF bl strerror(PLT)
5446 .LVL626:
5447 00b8 DFF88814 ldr r1, .L481+16
5448 00bc 0246 mov r2, r0
5449 00be 6058 ldr r0, [r4, r1]
5450 00c0 DFF89014 ldr r1, .L481+32
5451 00c4 A830 adds r0, r0, #168
ARM GAS /tmp/ccMR8LsA.s page 155
5452 .LPIC61:
5453 00c6 7944 add r1, pc
5454 00c8 3EE0 b .L480
5455 .LVL627:
5456 .L426:
1796:system/core/sdcard/sdcard.c **** goto error;
1797:system/core/sdcard/sdcard.c **** }
1798:system/core/sdcard/sdcard.c ****
1799:system/core/sdcard/sdcard.c **** res = setgroups(sizeof(kGroups) / sizeof(kGroups[0]), kGroups);
5457 .loc 1 1799 0
5458 00ca DFF88C14 ldr r1, .L481+36
5459 00ce 0120 movs r0, #1
5460 .LVL628:
5461 .LPIC62:
5462 00d0 7944 add r1, pc
5463 00d2 FFF7FEFF bl setgroups(PLT)
5464 .LVL629:
1800:system/core/sdcard/sdcard.c **** if (res < 0) {
5465 .loc 1 1800 0
5466 00d6 B0F1000A subs sl, r0, #0
5467 00da 0DDA bge .L428
1801:system/core/sdcard/sdcard.c **** ERROR("cannot setgroups: %s\n", strerror(errno));
5468 .loc 1 1801 0
5469 00dc FFF7FEFF bl __errno(PLT)
5470 .LVL630:
5471 00e0 0068 ldr r0, [r0, #0]
5472 00e2 FFF7FEFF bl strerror(PLT)
5473 .LVL631:
5474 00e6 0246 mov r2, r0
5475 00e8 DFF85804 ldr r0, .L481+16
5476 00ec DFF86C14 ldr r1, .L481+40
5477 00f0 2058 ldr r0, [r4, r0]
5478 .LPIC63:
5479 00f2 7944 add r1, pc
5480 00f4 A830 adds r0, r0, #168
5481 00f6 27E0 b .L480
5482 .LVL632:
5483 .L428:
1802:system/core/sdcard/sdcard.c **** goto error;
1803:system/core/sdcard/sdcard.c **** }
1804:system/core/sdcard/sdcard.c ****
1805:system/core/sdcard/sdcard.c **** res = setgid(gid);
5484 .loc 1 1805 0
5485 00f8 4846 mov r0, r9
5486 .LVL633:
5487 00fa FFF7FEFF bl setgid(PLT)
5488 .LVL634:
1806:system/core/sdcard/sdcard.c **** if (res < 0) {
5489 .loc 1 1806 0
5490 00fe B0F1000A subs sl, r0, #0
5491 0102 0DDA bge .L429
1807:system/core/sdcard/sdcard.c **** ERROR("cannot setgid: %s\n", strerror(errno));
5492 .loc 1 1807 0
5493 0104 FFF7FEFF bl __errno(PLT)
5494 .LVL635:
5495 0108 0068 ldr r0, [r0, #0]
5496 010a FFF7FEFF bl strerror(PLT)
ARM GAS /tmp/ccMR8LsA.s page 156
5497 .LVL636:
5498 010e DFF83434 ldr r3, .L481+16
5499 0112 0246 mov r2, r0
5500 0114 DFF84814 ldr r1, .L481+44
5501 0118 E058 ldr r0, [r4, r3]
5502 .LPIC64:
5503 011a 7944 add r1, pc
5504 011c A830 adds r0, r0, #168
5505 011e 13E0 b .L480
5506 .LVL637:
5507 .L429:
1808:system/core/sdcard/sdcard.c **** goto error;
1809:system/core/sdcard/sdcard.c **** }
1810:system/core/sdcard/sdcard.c ****
1811:system/core/sdcard/sdcard.c **** res = setuid(uid);
5508 .loc 1 1811 0
5509 0120 3846 mov r0, r7
5510 .LVL638:
5511 0122 FFF7FEFF bl setuid(PLT)
5512 .LVL639:
1812:system/core/sdcard/sdcard.c **** if (res < 0) {
5513 .loc 1 1812 0
5514 0126 B0F1000A subs sl, r0, #0
5515 012a 10DA bge .L430
1813:system/core/sdcard/sdcard.c **** ERROR("cannot setuid: %s\n", strerror(errno));
5516 .loc 1 1813 0
5517 012c FFF7FEFF bl __errno(PLT)
5518 .LVL640:
5519 0130 0068 ldr r0, [r0, #0]
5520 0132 FFF7FEFF bl strerror(PLT)
5521 .LVL641:
5522 0136 DFF80CC4 ldr ip, .L481+16
5523 013a 0246 mov r2, r0
5524 013c DFF82414 ldr r1, .L481+48
5525 0140 54F80C00 ldr r0, [r4, ip]
5526 .LPIC65:
5527 0144 7944 add r1, pc
5528 0146 A830 adds r0, r0, #168
5529 .L480:
5530 0148 FFF7FEFF bl fprintf(PLT)
5531 .LVL642:
1814:system/core/sdcard/sdcard.c **** goto error;
5532 .loc 1 1814 0
5533 014c DFE1 b .L427
5534 .LVL643:
5535 .L430:
5536 .LBB653:
5537 .LBB654:
686:system/core/sdcard/sdcard.c **** pthread_mutex_init(&fuse->lock, NULL);
5538 .loc 1 686 0
5539 014e 0DF61817 addw r7, sp, #2328
5540 .LVL644:
5541 0152 0021 movs r1, #0
5542 0154 3846 mov r0, r7
5543 .LVL645:
696:system/core/sdcard/sdcard.c **** fuse->root.refcount = 2;
5544 .loc 1 696 0
ARM GAS /tmp/ccMR8LsA.s page 157
5545 0156 4FF00208 mov r8, #2
5546 .LVL646:
686:system/core/sdcard/sdcard.c **** pthread_mutex_init(&fuse->lock, NULL);
5547 .loc 1 686 0
5548 015a FFF7FEFF bl pthread_mutex_init(PLT)
5549 .LVL647:
688:system/core/sdcard/sdcard.c **** fuse->fd = fd;
5550 .loc 1 688 0
5551 015e 0298 ldr r0, [sp, #8]
689:system/core/sdcard/sdcard.c **** fuse->next_generation = 0;
5552 .loc 1 689 0
5553 0160 0021 movs r1, #0
691:system/core/sdcard/sdcard.c **** fuse->split_perms = split_perms;
5554 .loc 1 691 0
5555 0162 0DF5CE53 add r3, sp, #6592
690:system/core/sdcard/sdcard.c **** fuse->derive = derive;
5556 .loc 1 690 0
5557 0166 7D61 str r5, [r7, #20]
691:system/core/sdcard/sdcard.c **** fuse->split_perms = split_perms;
5558 .loc 1 691 0
5559 0168 0C33 adds r3, r3, #12
5560 .LVL648:
688:system/core/sdcard/sdcard.c **** fuse->fd = fd;
5561 .loc 1 688 0
5562 016a 3861 str r0, [r7, #16]
689:system/core/sdcard/sdcard.c **** fuse->next_generation = 0;
5563 .loc 1 689 0
5564 016c 0020 movs r0, #0
5565 016e C7E90201 strd r0, [r7, #8]
692:system/core/sdcard/sdcard.c **** fuse->write_gid = write_gid;
5566 .loc 1 692 0
5567 0172 0DF5CE51 add r1, sp, #6592
691:system/core/sdcard/sdcard.c **** fuse->split_perms = split_perms;
5568 .loc 1 691 0
5569 0176 1A78 ldrb r2, [r3, #0] @ zero_extendqisi2
692:system/core/sdcard/sdcard.c **** fuse->write_gid = write_gid;
5570 .loc 1 692 0
5571 0178 0868 ldr r0, [r1, #0]
5572 .LBB655:
5573 .LBB656:
144:bionic/libc/include/string.h **** return __builtin___memset_chk(s, c, n, __builtin_object_size (s, 0));
5574 .loc 2 144 0
5575 017a 0021 movs r1, #0
5576 .LBE656:
5577 .LBE655:
691:system/core/sdcard/sdcard.c **** fuse->split_perms = split_perms;
5578 .loc 1 691 0
5579 017c 3A76 strb r2, [r7, #24]
5580 .LBB659:
5581 .LBB657:
144:bionic/libc/include/string.h **** return __builtin___memset_chk(s, c, n, __builtin_object_size (s, 0));
5582 .loc 2 144 0
5583 017e 5022 movs r2, #80
5584 .LBE657:
5585 .LBE659:
692:system/core/sdcard/sdcard.c **** fuse->write_gid = write_gid;
5586 .loc 1 692 0
ARM GAS /tmp/ccMR8LsA.s page 158
5587 0180 F861 str r0, [r7, #28]
5588 .LVL649:
5589 .LBB660:
5590 .LBB658:
144:bionic/libc/include/string.h **** return __builtin___memset_chk(s, c, n, __builtin_object_size (s, 0));
5591 .loc 2 144 0
5592 0182 0DF63810 addw r0, sp, #2360
5593 .LVL650:
5594 0186 FFF7FEFF bl memset(PLT)
5595 .LVL651:
5596 .LBE658:
5597 .LBE660:
695:system/core/sdcard/sdcard.c **** fuse->root.nid = FUSE_ROOT_ID; /* 1 */
5598 .loc 1 695 0
5599 018a 0021 movs r1, #0
5600 018c 0120 movs r0, #1
5601 018e C7E90A01 strd r0, [r7, #40]
5602 .LBB661:
5603 .LBB662:
217:bionic/libc/include/string.h **** return __builtin_strlen(s);
5604 .loc 2 217 0
5605 0192 3046 mov r0, r6
5606 .LBE662:
5607 .LBE661:
696:system/core/sdcard/sdcard.c **** fuse->root.refcount = 2;
5608 .loc 1 696 0
5609 0194 C7F82080 str r8, [r7, #32]
5610 .LVL652:
5611 .LBB664:
5612 .LBB663:
217:bionic/libc/include/string.h **** return __builtin_strlen(s);
5613 .loc 2 217 0
5614 0198 FFF7FEFF bl strlen(PLT)
5615 .LVL653:
5616 .LBE663:
5617 .LBE664:
697:system/core/sdcard/sdcard.c **** fuse->root.namelen = strlen(source_path);
5618 .loc 1 697 0
5619 019c B865 str r0, [r7, #88]
698:system/core/sdcard/sdcard.c **** fuse->root.name = strdup(source_path);
5620 .loc 1 698 0
5621 019e 3046 mov r0, r6
5622 01a0 FFF7FEFF bl strdup(PLT)
5623 .LVL654:
703:system/core/sdcard/sdcard.c **** switch (derive) {
5624 .loc 1 703 0
5625 01a4 012D cmp r5, #1
698:system/core/sdcard/sdcard.c **** fuse->root.name = strdup(source_path);
5626 .loc 1 698 0
5627 01a6 F865 str r0, [r7, #92]
703:system/core/sdcard/sdcard.c **** switch (derive) {
5628 .loc 1 703 0
5629 01a8 0DD0 beq .L433
5630 01aa 02D3 bcc .L432
5631 01ac 4545 cmp r5, r8
5632 01ae 60D1 bne .L431
5633 01b0 3BE0 b .L434
ARM GAS /tmp/ccMR8LsA.s page 159
5634 .L432:
708:system/core/sdcard/sdcard.c **** fuse->root.mode = 0775;
5635 .loc 1 708 0
5636 01b2 40F2FD16 movw r6, #509
5637 .LVL655:
707:system/core/sdcard/sdcard.c **** fuse->root.perm = PERM_ROOT;
5638 .loc 1 707 0
5639 01b6 C7F83880 str r8, [r7, #56]
709:system/core/sdcard/sdcard.c **** fuse->root.gid = AID_SDCARD_RW;
5640 .loc 1 709 0
5641 01ba 06F5FD72 add r2, r6, #506
708:system/core/sdcard/sdcard.c **** fuse->root.mode = 0775;
5642 .loc 1 708 0
5643 01be A7F84860 strh r6, [r7, #72] @ movhi
709:system/core/sdcard/sdcard.c **** fuse->root.gid = AID_SDCARD_RW;
5644 .loc 1 709 0
5645 01c2 7A64 str r2, [r7, #68]
5646 01c4 55E0 b .L431
5647 .LVL656:
5648 .L433:
716:system/core/sdcard/sdcard.c **** fuse->root.mode = 0771;
5649 .loc 1 716 0
5650 01c6 40F2F911 movw r1, #505
718:system/core/sdcard/sdcard.c **** fuse->package_to_appid = hashmapCreate(256, str_hash, str_icase_equals);
5651 .loc 1 718 0
5652 01ca E74A ldr r2, .L481+52
716:system/core/sdcard/sdcard.c **** fuse->root.mode = 0771;
5653 .loc 1 716 0
5654 01cc A7F84810 strh r1, [r7, #72] @ movhi
717:system/core/sdcard/sdcard.c **** fuse->root.gid = AID_SDCARD_R;
5655 .loc 1 717 0
5656 01d0 40F20440 movw r0, #1028
718:system/core/sdcard/sdcard.c **** fuse->package_to_appid = hashmapCreate(256, str_hash, str_icase_equals);
5657 .loc 1 718 0
5658 01d4 E549 ldr r1, .L481+56
5659 .LBB665:
5660 .LBB666:
720:system/core/sdcard/sdcard.c **** snprintf(fuse->obbpath, sizeof(fuse->obbpath), "%s/obb", source_path);
5661 .loc 1 720 0
5662 01d6 07F1700A add sl, r7, #112
5663 .LVL657:
5664 .LBE666:
5665 .LBE665:
717:system/core/sdcard/sdcard.c **** fuse->root.gid = AID_SDCARD_R;
5666 .loc 1 717 0
5667 01da 7864 str r0, [r7, #68]
718:system/core/sdcard/sdcard.c **** fuse->package_to_appid = hashmapCreate(256, str_hash, str_icase_equals);
5668 .loc 1 718 0
5669 .LPIC67:
5670 01dc 7A44 add r2, pc
5671 01de 4FF48070 mov r0, #256
715:system/core/sdcard/sdcard.c **** fuse->root.perm = PERM_LEGACY_PRE_ROOT;
5672 .loc 1 715 0
5673 01e2 BD63 str r5, [r7, #56]
718:system/core/sdcard/sdcard.c **** fuse->package_to_appid = hashmapCreate(256, str_hash, str_icase_equals);
5674 .loc 1 718 0
5675 .LPIC66:
ARM GAS /tmp/ccMR8LsA.s page 160
5676 01e4 7944 add r1, pc
5677 01e6 07F58355 add r5, r7, #4192
5678 .LVL658:
5679 01ea FFF7FEFF bl hashmapCreate(PLT)
5680 .LVL659:
719:system/core/sdcard/sdcard.c **** fuse->appid_with_rw = hashmapCreate(128, int_hash, int_equals);
5681 .loc 1 719 0
5682 01ee E049 ldr r1, .L481+60
5683 01f0 E04A ldr r2, .L481+64
718:system/core/sdcard/sdcard.c **** fuse->package_to_appid = hashmapCreate(256, str_hash, str_icase_equals);
5684 .loc 1 718 0
5685 01f2 2861 str r0, [r5, #16]
719:system/core/sdcard/sdcard.c **** fuse->appid_with_rw = hashmapCreate(128, int_hash, int_equals);
5686 .loc 1 719 0
5687 01f4 8020 movs r0, #128
5688 .LPIC68:
5689 01f6 7944 add r1, pc
5690 .LPIC69:
5691 01f8 7A44 add r2, pc
5692 01fa FFF7FEFF bl hashmapCreate(PLT)
5693 .LVL660:
5694 .LBB669:
5695 .LBB667:
5696 .loc 4 478 0
5697 01fe DE4A ldr r2, .L481+68
5698 0200 3346 mov r3, r6
5699 0202 4FF48051 mov r1, #4096
5700 .LBE667:
5701 .LBE669:
719:system/core/sdcard/sdcard.c **** fuse->appid_with_rw = hashmapCreate(128, int_hash, int_equals);
5702 .loc 1 719 0
5703 0206 6861 str r0, [r5, #20]
5704 .LVL661:
5705 .LBB670:
5706 .LBB668:
5707 .loc 4 478 0
5708 0208 5046 mov r0, sl
5709 .LPIC70:
5710 020a 7A44 add r2, pc
5711 020c FFF7FEFF bl snprintf(PLT)
5712 .LVL662:
5713 .LBE668:
5714 .LBE670:
721:system/core/sdcard/sdcard.c **** fs_prepare_dir(fuse->obbpath, 0775, getuid(), getgid());
5715 .loc 1 721 0
5716 0210 FFF7FEFF bl getuid(PLT)
5717 .LVL663:
5718 0214 8046 mov r8, r0
5719 0216 FFF7FEFF bl getgid(PLT)
5720 .LVL664:
5721 021a 40F2FD11 movw r1, #509
5722 021e 0346 mov r3, r0
5723 0220 4246 mov r2, r8
5724 0222 5046 mov r0, sl
5725 0224 FFF7FEFF bl fs_prepare_dir(PLT)
5726 .LVL665:
5727 0228 23E0 b .L431
ARM GAS /tmp/ccMR8LsA.s page 161
5728 .LVL666:
5729 .L434:
729:system/core/sdcard/sdcard.c **** fuse->package_to_appid = hashmapCreate(256, str_hash, str_icase_equals);
5730 .loc 1 729 0
5731 022a D449 ldr r1, .L481+72
728:system/core/sdcard/sdcard.c **** fuse->root.gid = AID_SDCARD_R;
5732 .loc 1 728 0
5733 022c 40F20443 movw r3, #1028
729:system/core/sdcard/sdcard.c **** fuse->package_to_appid = hashmapCreate(256, str_hash, str_icase_equals);
5734 .loc 1 729 0
5735 0230 D34A ldr r2, .L481+76
5736 0232 4FF48070 mov r0, #256
726:system/core/sdcard/sdcard.c **** fuse->root.perm = PERM_ROOT;
5737 .loc 1 726 0
5738 0236 BD63 str r5, [r7, #56]
727:system/core/sdcard/sdcard.c **** fuse->root.mode = 0771;
5739 .loc 1 727 0
5740 0238 40F2F915 movw r5, #505
5741 .LVL667:
729:system/core/sdcard/sdcard.c **** fuse->package_to_appid = hashmapCreate(256, str_hash, str_icase_equals);
5742 .loc 1 729 0
5743 .LPIC71:
5744 023c 7944 add r1, pc
728:system/core/sdcard/sdcard.c **** fuse->root.gid = AID_SDCARD_R;
5745 .loc 1 728 0
5746 023e 7B64 str r3, [r7, #68]
729:system/core/sdcard/sdcard.c **** fuse->package_to_appid = hashmapCreate(256, str_hash, str_icase_equals);
5747 .loc 1 729 0
5748 .LPIC72:
5749 0240 7A44 add r2, pc
727:system/core/sdcard/sdcard.c **** fuse->root.mode = 0771;
5750 .loc 1 727 0
5751 0242 A7F84850 strh r5, [r7, #72] @ movhi
729:system/core/sdcard/sdcard.c **** fuse->package_to_appid = hashmapCreate(256, str_hash, str_icase_equals);
5752 .loc 1 729 0
5753 0246 FFF7FEFF bl hashmapCreate(PLT)
5754 .LVL668:
730:system/core/sdcard/sdcard.c **** fuse->appid_with_rw = hashmapCreate(128, int_hash, int_equals);
5755 .loc 1 730 0
5756 024a CE49 ldr r1, .L481+80
729:system/core/sdcard/sdcard.c **** fuse->package_to_appid = hashmapCreate(256, str_hash, str_icase_equals);
5757 .loc 1 729 0
5758 024c 07F58355 add r5, r7, #4192
730:system/core/sdcard/sdcard.c **** fuse->appid_with_rw = hashmapCreate(128, int_hash, int_equals);
5759 .loc 1 730 0
5760 0250 CD4A ldr r2, .L481+84
729:system/core/sdcard/sdcard.c **** fuse->package_to_appid = hashmapCreate(256, str_hash, str_icase_equals);
5761 .loc 1 729 0
5762 0252 2861 str r0, [r5, #16]
730:system/core/sdcard/sdcard.c **** fuse->appid_with_rw = hashmapCreate(128, int_hash, int_equals);
5763 .loc 1 730 0
5764 0254 8020 movs r0, #128
5765 .LPIC73:
5766 0256 7944 add r1, pc
5767 .LPIC74:
5768 0258 7A44 add r2, pc
5769 025a FFF7FEFF bl hashmapCreate(PLT)
ARM GAS /tmp/ccMR8LsA.s page 162
5770 .LVL669:
5771 .LBB671:
5772 .LBB672:
5773 .loc 4 478 0
5774 025e CB4A ldr r2, .L481+88
5775 0260 4FF48051 mov r1, #4096
5776 .LBE672:
5777 .LBE671:
730:system/core/sdcard/sdcard.c **** fuse->appid_with_rw = hashmapCreate(128, int_hash, int_equals);
5778 .loc 1 730 0
5779 0264 6861 str r0, [r5, #20]
5780 .LVL670:
5781 .LBB674:
5782 .LBB673:
5783 .loc 4 478 0
5784 0266 3346 mov r3, r6
5785 0268 07F17000 add r0, r7, #112
5786 .LPIC75:
5787 026c 7A44 add r2, pc
5788 026e FFF7FEFF bl snprintf(PLT)
5789 .LVL671:
5790 .L431:
5791 .LBE673:
5792 .LBE674:
5793 .LBE654:
5794 .LBE653:
5795 .LBB675:
5796 .LBB676:
5797 .file 5 "bionic/libc/include/sys/stat.h"
1:bionic/libc/include/sys/stat.h **** /*
2:bionic/libc/include/sys/stat.h **** * Copyright (C) 2008 The Android Open Source Project
3:bionic/libc/include/sys/stat.h **** * All rights reserved.
4:bionic/libc/include/sys/stat.h **** *
5:bionic/libc/include/sys/stat.h **** * Redistribution and use in source and binary forms, with or without
6:bionic/libc/include/sys/stat.h **** * modification, are permitted provided that the following conditions
7:bionic/libc/include/sys/stat.h **** * are met:
8:bionic/libc/include/sys/stat.h **** * * Redistributions of source code must retain the above copyright
9:bionic/libc/include/sys/stat.h **** * notice, this list of conditions and the following disclaimer.
10:bionic/libc/include/sys/stat.h **** * * Redistributions in binary form must reproduce the above copyright
11:bionic/libc/include/sys/stat.h **** * notice, this list of conditions and the following disclaimer in
12:bionic/libc/include/sys/stat.h **** * the documentation and/or other materials provided with the
13:bionic/libc/include/sys/stat.h **** * distribution.
14:bionic/libc/include/sys/stat.h **** *
15:bionic/libc/include/sys/stat.h **** * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16:bionic/libc/include/sys/stat.h **** * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17:bionic/libc/include/sys/stat.h **** * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18:bionic/libc/include/sys/stat.h **** * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19:bionic/libc/include/sys/stat.h **** * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20:bionic/libc/include/sys/stat.h **** * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21:bionic/libc/include/sys/stat.h **** * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22:bionic/libc/include/sys/stat.h **** * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23:bionic/libc/include/sys/stat.h **** * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24:bionic/libc/include/sys/stat.h **** * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25:bionic/libc/include/sys/stat.h **** * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26:bionic/libc/include/sys/stat.h **** * SUCH DAMAGE.
27:bionic/libc/include/sys/stat.h **** */
28:bionic/libc/include/sys/stat.h **** #ifndef _SYS_STAT_H_
ARM GAS /tmp/ccMR8LsA.s page 163
29:bionic/libc/include/sys/stat.h **** #define _SYS_STAT_H_
30:bionic/libc/include/sys/stat.h ****
31:bionic/libc/include/sys/stat.h **** #include <sys/cdefs.h>
32:bionic/libc/include/sys/stat.h **** #include <sys/types.h>
33:bionic/libc/include/sys/stat.h **** #include <sys/time.h>
34:bionic/libc/include/sys/stat.h **** #include <linux/stat.h>
35:bionic/libc/include/sys/stat.h ****
36:bionic/libc/include/sys/stat.h **** #include <endian.h>
37:bionic/libc/include/sys/stat.h ****
38:bionic/libc/include/sys/stat.h **** __BEGIN_DECLS
39:bionic/libc/include/sys/stat.h ****
40:bionic/libc/include/sys/stat.h **** /* really matches stat64 in the kernel, hence the padding
41:bionic/libc/include/sys/stat.h **** * Note: The kernel zero's the padded region because glibc might read them
42:bionic/libc/include/sys/stat.h **** * in the hope that the kernel has stretched to using larger sizes.
43:bionic/libc/include/sys/stat.h **** */
44:bionic/libc/include/sys/stat.h **** #ifdef __mips__
45:bionic/libc/include/sys/stat.h **** struct stat {
46:bionic/libc/include/sys/stat.h **** unsigned long st_dev;
47:bionic/libc/include/sys/stat.h **** unsigned long __pad0[3];
48:bionic/libc/include/sys/stat.h ****
49:bionic/libc/include/sys/stat.h **** unsigned long long st_ino;
50:bionic/libc/include/sys/stat.h ****
51:bionic/libc/include/sys/stat.h **** unsigned int st_mode;
52:bionic/libc/include/sys/stat.h **** unsigned int st_nlink;
53:bionic/libc/include/sys/stat.h ****
54:bionic/libc/include/sys/stat.h **** unsigned long st_uid;
55:bionic/libc/include/sys/stat.h **** unsigned long st_gid;
56:bionic/libc/include/sys/stat.h ****
57:bionic/libc/include/sys/stat.h **** unsigned long st_rdev;
58:bionic/libc/include/sys/stat.h **** unsigned long __pad1[3];
59:bionic/libc/include/sys/stat.h ****
60:bionic/libc/include/sys/stat.h **** long long st_size;
61:bionic/libc/include/sys/stat.h ****
62:bionic/libc/include/sys/stat.h **** unsigned long st_atime;
63:bionic/libc/include/sys/stat.h **** unsigned long st_atime_nsec;
64:bionic/libc/include/sys/stat.h ****
65:bionic/libc/include/sys/stat.h **** unsigned long st_mtime;
66:bionic/libc/include/sys/stat.h **** unsigned long st_mtime_nsec;
67:bionic/libc/include/sys/stat.h ****
68:bionic/libc/include/sys/stat.h **** unsigned long st_ctime;
69:bionic/libc/include/sys/stat.h **** unsigned long st_ctime_nsec;
70:bionic/libc/include/sys/stat.h ****
71:bionic/libc/include/sys/stat.h **** unsigned long st_blksize;
72:bionic/libc/include/sys/stat.h **** unsigned long __pad2;
73:bionic/libc/include/sys/stat.h ****
74:bionic/libc/include/sys/stat.h **** unsigned long long st_blocks;
75:bionic/libc/include/sys/stat.h **** };
76:bionic/libc/include/sys/stat.h **** #else
77:bionic/libc/include/sys/stat.h **** struct stat {
78:bionic/libc/include/sys/stat.h **** unsigned long long st_dev;
79:bionic/libc/include/sys/stat.h **** unsigned char __pad0[4];
80:bionic/libc/include/sys/stat.h ****
81:bionic/libc/include/sys/stat.h **** unsigned long __st_ino;
82:bionic/libc/include/sys/stat.h **** unsigned int st_mode;
83:bionic/libc/include/sys/stat.h **** unsigned int st_nlink;
84:bionic/libc/include/sys/stat.h ****
85:bionic/libc/include/sys/stat.h **** unsigned long st_uid;
ARM GAS /tmp/ccMR8LsA.s page 164
86:bionic/libc/include/sys/stat.h **** unsigned long st_gid;
87:bionic/libc/include/sys/stat.h ****
88:bionic/libc/include/sys/stat.h **** unsigned long long st_rdev;
89:bionic/libc/include/sys/stat.h **** unsigned char __pad3[4];
90:bionic/libc/include/sys/stat.h ****
91:bionic/libc/include/sys/stat.h **** long long st_size;
92:bionic/libc/include/sys/stat.h **** unsigned long st_blksize;
93:bionic/libc/include/sys/stat.h **** unsigned long long st_blocks;
94:bionic/libc/include/sys/stat.h ****
95:bionic/libc/include/sys/stat.h **** unsigned long st_atime;
96:bionic/libc/include/sys/stat.h **** unsigned long st_atime_nsec;
97:bionic/libc/include/sys/stat.h ****
98:bionic/libc/include/sys/stat.h **** unsigned long st_mtime;
99:bionic/libc/include/sys/stat.h **** unsigned long st_mtime_nsec;
100:bionic/libc/include/sys/stat.h ****
101:bionic/libc/include/sys/stat.h **** unsigned long st_ctime;
102:bionic/libc/include/sys/stat.h **** unsigned long st_ctime_nsec;
103:bionic/libc/include/sys/stat.h ****
104:bionic/libc/include/sys/stat.h **** unsigned long long st_ino;
105:bionic/libc/include/sys/stat.h **** };
106:bionic/libc/include/sys/stat.h **** #endif
107:bionic/libc/include/sys/stat.h ****
108:bionic/libc/include/sys/stat.h **** /* For compatibility with GLibc, we provide macro aliases
109:bionic/libc/include/sys/stat.h **** * for the non-Posix nano-seconds accessors.
110:bionic/libc/include/sys/stat.h **** */
111:bionic/libc/include/sys/stat.h **** #define st_atimensec st_atime_nsec
112:bionic/libc/include/sys/stat.h **** #define st_mtimensec st_mtime_nsec
113:bionic/libc/include/sys/stat.h **** #define st_ctimensec st_ctime_nsec
114:bionic/libc/include/sys/stat.h ****
115:bionic/libc/include/sys/stat.h **** #ifdef __USE_BSD
116:bionic/libc/include/sys/stat.h **** /* Permission macros provided by glibc for compatibility with BSDs. */
117:bionic/libc/include/sys/stat.h **** #define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO) /* 0777 */
118:bionic/libc/include/sys/stat.h **** #define ALLPERMS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) /* 07777 */
119:bionic/libc/include/sys/stat.h **** #define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) /* 0666 */
120:bionic/libc/include/sys/stat.h **** #endif
121:bionic/libc/include/sys/stat.h ****
122:bionic/libc/include/sys/stat.h **** extern int chmod(const char *, mode_t);
123:bionic/libc/include/sys/stat.h **** extern int fchmod(int, mode_t);
124:bionic/libc/include/sys/stat.h **** extern int mkdir(const char *, mode_t);
125:bionic/libc/include/sys/stat.h ****
126:bionic/libc/include/sys/stat.h **** extern int stat(const char *, struct stat *);
127:bionic/libc/include/sys/stat.h **** extern int fstat(int, struct stat *);
128:bionic/libc/include/sys/stat.h **** extern int lstat(const char *, struct stat *);
129:bionic/libc/include/sys/stat.h **** extern int mknod(const char *, mode_t, dev_t);
130:bionic/libc/include/sys/stat.h **** extern mode_t umask(mode_t);
131:bionic/libc/include/sys/stat.h ****
132:bionic/libc/include/sys/stat.h **** #if defined(__BIONIC_FORTIFY)
133:bionic/libc/include/sys/stat.h ****
134:bionic/libc/include/sys/stat.h **** extern mode_t __umask_chk(mode_t);
135:bionic/libc/include/sys/stat.h **** extern mode_t __umask_real(mode_t)
136:bionic/libc/include/sys/stat.h **** __asm__(__USER_LABEL_PREFIX__ "umask");
137:bionic/libc/include/sys/stat.h **** __errordecl(__umask_invalid_mode, "umask called with invalid mode");
138:bionic/libc/include/sys/stat.h ****
139:bionic/libc/include/sys/stat.h **** __BIONIC_FORTIFY_INLINE
140:bionic/libc/include/sys/stat.h **** mode_t umask(mode_t mode) {
141:bionic/libc/include/sys/stat.h **** #if !defined(__clang__)
142:bionic/libc/include/sys/stat.h **** if (__builtin_constant_p(mode)) {
ARM GAS /tmp/ccMR8LsA.s page 165
143:bionic/libc/include/sys/stat.h **** if ((mode & 0777) != mode) {
144:bionic/libc/include/sys/stat.h **** __umask_invalid_mode();
145:bionic/libc/include/sys/stat.h **** }
146:bionic/libc/include/sys/stat.h **** return __umask_real(mode);
5798 .loc 5 146 0
5799 0272 0020 movs r0, #0
5800 .LBE676:
5801 .LBE675:
5802 .LBB678:
5803 .LBB679:
1721:system/core/sdcard/sdcard.c **** handlers = malloc(num_threads * sizeof(struct fuse_handler));
5804 .loc 1 1721 0
5805 0274 AF4D ldr r5, .L481
5806 .LBE679:
5807 .LBE678:
5808 .LBB706:
5809 .LBB677:
5810 .loc 5 146 0
5811 0276 FFF7FEFF bl umask(PLT)
5812 .LVL672:
5813 .LBE677:
5814 .LBE706:
5815 .LBB707:
5816 .LBB705:
1721:system/core/sdcard/sdcard.c **** handlers = malloc(num_threads * sizeof(struct fuse_handler));
5817 .loc 1 1721 0
5818 027a 0DF5CE53 add r3, sp, #6592
5819 027e 1E1D adds r6, r3, #4
5820 .LVL673:
5821 0280 A846 mov r8, r5
5822 0282 3268 ldr r2, [r6, #0]
5823 0284 05FB02F0 mul r0, r5, r2
5824 0288 FFF7FEFF bl malloc(PLT)
5825 .LVL674:
1722:system/core/sdcard/sdcard.c **** if (!handlers) {
5826 .loc 1 1722 0
5827 028c 0646 mov r6, r0
5828 .LVL675:
5829 028e 88B9 cbnz r0, .L459
1723:system/core/sdcard/sdcard.c **** ERROR("cannot allocate storage for threads\n");
5830 .loc 1 1723 0
5831 0290 AC49 ldr r1, .L481+16
1815:system/core/sdcard/sdcard.c **** }
1816:system/core/sdcard/sdcard.c ****
1817:system/core/sdcard/sdcard.c **** fuse_init(&fuse, fd, source_path, write_gid, derive, split_perms);
1818:system/core/sdcard/sdcard.c ****
1819:system/core/sdcard/sdcard.c **** umask(0);
1820:system/core/sdcard/sdcard.c **** res = ignite_fuse(&fuse, num_threads);
5832 .loc 1 1820 0
5833 0292 6FF00B0A mvn sl, #11
1723:system/core/sdcard/sdcard.c **** ERROR("cannot allocate storage for threads\n");
5834 .loc 1 1723 0
5835 0296 BE48 ldr r0, .L481+92
5836 .LVL676:
5837 0298 6158 ldr r1, [r4, r1]
5838 .LPIC76:
5839 029a 7844 add r0, pc
ARM GAS /tmp/ccMR8LsA.s page 166
5840 029c A831 adds r1, r1, #168
5841 029e FFF7FEFF bl fputs(PLT)
5842 .LVL677:
5843 02a2 34E1 b .L427
5844 .LVL678:
5845 .L436:
1728:system/core/sdcard/sdcard.c **** handlers[i].fuse = fuse;
5846 .loc 1 1728 0
5847 02a4 F151 str r1, [r6, r7]
1772:system/core/sdcard/sdcard.c **** static int run(const char* source_path, const char* dest_path, uid_t uid,
5848 .loc 1 1772 0
5849 02a6 F219 adds r2, r6, r7
5850 02a8 07F58027 add r7, r7, #262144
1729:system/core/sdcard/sdcard.c **** handlers[i].token = i;
5851 .loc 1 1729 0
5852 02ac 5560 str r5, [r2, #4]
5853 02ae 5837 adds r7, r7, #88
1727:system/core/sdcard/sdcard.c **** for (i = 0; i < num_threads; i++) {
5854 .loc 1 1727 0
5855 02b0 0135 adds r5, r5, #1
5856 .LVL679:
5857 02b2 03E0 b .L435
5858 .LVL680:
5859 .L459:
1722:system/core/sdcard/sdcard.c **** if (!handlers) {
5860 .loc 1 1722 0
5861 02b4 0027 movs r7, #0
5862 .LVL681:
5863 02b6 0DF61811 addw r1, sp, #2328
5864 .LVL682:
5865 02ba 3D46 mov r5, r7
5866 .LVL683:
5867 .L435:
1727:system/core/sdcard/sdcard.c **** for (i = 0; i < num_threads; i++) {
5868 .loc 1 1727 0
5869 02bc 0DF5CE50 add r0, sp, #6592
5870 02c0 031D adds r3, r0, #4
5871 .LVL684:
5872 02c2 1A68 ldr r2, [r3, #0]
5873 02c4 9542 cmp r5, r2
5874 02c6 EDDB blt .L436
1734:system/core/sdcard/sdcard.c **** i = (fuse->derive == DERIVE_NONE) ? 1 : 0;
5875 .loc 1 1734 0
5876 02c8 4F69 ldr r7, [r1, #20]
5877 .LBB680:
1737:system/core/sdcard/sdcard.c **** int res = pthread_create(&thread, NULL, start_handler, &handlers[i]);
5878 .loc 1 1737 0
5879 02ca DFF8C892 ldr r9, .L481+96
5880 .LVL685:
5881 .LBE680:
1734:system/core/sdcard/sdcard.c **** i = (fuse->derive == DERIVE_NONE) ? 1 : 0;
5882 .loc 1 1734 0
5883 02ce D7F10105 rsbs r5, r7, #1
5884 .LVL686:
5885 02d2 38BF it cc
5886 02d4 0025 movcc r5, #0
5887 .LVL687:
ARM GAS /tmp/ccMR8LsA.s page 167
5888 .LBB681:
1737:system/core/sdcard/sdcard.c **** int res = pthread_create(&thread, NULL, start_handler, &handlers[i]);
5889 .loc 1 1737 0
5890 .LPIC77:
5891 02d6 F944 add r9, pc
5892 .LBE681:
1772:system/core/sdcard/sdcard.c **** static int run(const char* source_path, const char* dest_path, uid_t uid,
5893 .loc 1 1772 0
5894 02d8 08FB0568 mla r8, r8, r5, r6
5895 02dc 0027 movs r7, #0
5896 02de 15E0 b .L437
5897 .LVL688:
5898 .L440:
5899 .LBB682:
1737:system/core/sdcard/sdcard.c **** int res = pthread_create(&thread, NULL, start_handler, &handlers[i]);
5900 .loc 1 1737 0
5901 02e0 07EB0803 add r3, r7, r8
5902 02e4 05A8 add r0, sp, #20
5903 .LVL689:
5904 02e6 0021 movs r1, #0
5905 .LVL690:
5906 02e8 4A46 mov r2, r9
5907 02ea 07F58027 add r7, r7, #262144
5908 02ee FFF7FEFF bl pthread_create(PLT)
5909 .LVL691:
5910 02f2 5837 adds r7, r7, #88
1738:system/core/sdcard/sdcard.c **** if (res) {
5911 .loc 1 1738 0
5912 02f4 0346 mov r3, r0
5913 02f6 40B1 cbz r0, .L438
1739:system/core/sdcard/sdcard.c **** ERROR("failed to start thread #%d, error=%d\n", i, res);
5914 .loc 1 1739 0
5915 02f8 924E ldr r6, .L481+16
5916 .LVL692:
5917 02fa 2A46 mov r2, r5
5918 02fc A649 ldr r1, .L481+100
5919 02fe A059 ldr r0, [r4, r6]
5920 .LVL693:
5921 .LPIC78:
5922 0300 7944 add r1, pc
5923 0302 A830 adds r0, r0, #168
5924 0304 FFF7FEFF bl fprintf(PLT)
5925 .LVL694:
5926 0308 FEE0 b .L439
5927 .LVL695:
5928 .L438:
5929 .LBE682:
1735:system/core/sdcard/sdcard.c **** for (; i < num_threads; i++) {
5930 .loc 1 1735 0
5931 030a 0135 adds r5, r5, #1
5932 .LVL696:
5933 .L437:
5934 030c 0DF5CE51 add r1, sp, #6592
5935 0310 081D adds r0, r1, #4
5936 .LVL697:
5937 0312 0368 ldr r3, [r0, #0]
5938 0314 9D42 cmp r5, r3
ARM GAS /tmp/ccMR8LsA.s page 168
5939 0316 E3DB blt .L440
1744:system/core/sdcard/sdcard.c **** if (fuse->derive == DERIVE_NONE) {
5940 .loc 1 1744 0
5941 0318 0DF61815 addw r5, sp, #2328
5942 .LVL698:
5943 031c 6A69 ldr r2, [r5, #20]
5944 031e 12B9 cbnz r2, .L441
1745:system/core/sdcard/sdcard.c **** handle_fuse_requests(&handlers[0]);
5945 .loc 1 1745 0
5946 0320 3046 mov r0, r6
5947 .LVL699:
5948 0322 FFF7FEFF bl handle_fuse_requests(PLT)
5949 .LVL700:
5950 .L441:
5951 .LBB683:
5952 .LBB684:
1658:system/core/sdcard/sdcard.c **** int nfd = inotify_init();
5953 .loc 1 1658 0
5954 0326 FFF7FEFF bl inotify_init(PLT)
5955 .LVL701:
1659:system/core/sdcard/sdcard.c **** if (nfd < 0) {
5956 .loc 1 1659 0
5957 032a B0F10008 subs r8, r0, #0
5958 032e 0BDA bge .L460
1660:system/core/sdcard/sdcard.c **** ERROR("inotify_init failed: %s\n", strerror(errno));
5959 .loc 1 1660 0
5960 0330 844D ldr r5, .L481+16
5961 .LVL702:
5962 0332 FFF7FEFF bl __errno(PLT)
5963 .LVL703:
5964 0336 0068 ldr r0, [r0, #0]
5965 0338 FFF7FEFF bl strerror(PLT)
5966 .LVL704:
5967 033c 9749 ldr r1, .L481+104
5968 033e 0246 mov r2, r0
5969 0340 6059 ldr r0, [r4, r5]
5970 .LPIC79:
5971 0342 7944 add r1, pc
5972 0344 A830 adds r0, r0, #168
5973 0346 C6E0 b .L479
5974 .LVL705:
5975 .L460:
5976 .LBB685:
5977 .LBB686:
5978 .LBB687:
5979 .LBB688:
1615:system/core/sdcard/sdcard.c **** hashmapForEach(fuse->package_to_appid, remove_str_to_int, fuse->package_to_appid);
5980 .loc 1 1615 0
5981 0348 05F58356 add r6, r5, #4192
5982 .LVL706:
5983 .LBE688:
5984 .LBE687:
5985 .LBE686:
5986 .LBE685:
1659:system/core/sdcard/sdcard.c **** if (nfd < 0) {
5987 .loc 1 1659 0
5988 034c 0027 movs r7, #0
ARM GAS /tmp/ccMR8LsA.s page 169
5989 .LBB704:
5990 .LBB701:
5991 .LBB697:
5992 .LBB693:
1615:system/core/sdcard/sdcard.c **** hashmapForEach(fuse->package_to_appid, remove_str_to_int, fuse->package_to_appid);
5993 .loc 1 1615 0
5994 034e 06F11009 add r9, r6, #16
5995 .LVL707:
5996 .L477:
5997 .LBE693:
5998 .LBE697:
5999 .LBE701:
1666:system/core/sdcard/sdcard.c **** if (!active) {
6000 .loc 1 1666 0
6001 0352 002F cmp r7, #0
6002 0354 40F0A680 bne .L444
6003 .LBB702:
1667:system/core/sdcard/sdcard.c **** int res = inotify_add_watch(nfd, kPackagesListFile, IN_DELETE_SELF);
6004 .loc 1 1667 0
6005 0358 914F ldr r7, .L481+108
6006 .LVL708:
1671:system/core/sdcard/sdcard.c **** ERROR("missing packages.list; retrying\n");
6007 .loc 1 1671 0
6008 035a DFF848A2 ldr sl, .L481+112
1667:system/core/sdcard/sdcard.c **** int res = inotify_add_watch(nfd, kPackagesListFile, IN_DELETE_SELF);
6009 .loc 1 1667 0
6010 .LPIC80:
6011 035e 7F44 add r7, pc
1671:system/core/sdcard/sdcard.c **** ERROR("missing packages.list; retrying\n");
6012 .loc 1 1671 0
6013 .LPIC81:
6014 0360 FA44 add sl, pc
6015 .L478:
1667:system/core/sdcard/sdcard.c **** int res = inotify_add_watch(nfd, kPackagesListFile, IN_DELETE_SELF);
6016 .loc 1 1667 0
6017 0362 4046 mov r0, r8
6018 0364 3946 mov r1, r7
6019 0366 4FF48062 mov r2, #1024
6020 036a FFF7FEFF bl inotify_add_watch(PLT)
6021 .LVL709:
1668:system/core/sdcard/sdcard.c **** if (res == -1) {
6022 .loc 1 1668 0
6023 036e 0130 adds r0, r0, #1
6024 .LVL710:
6025 0370 1CD1 bne .L445
1669:system/core/sdcard/sdcard.c **** if (errno == ENOENT || errno == EACCES) {
6026 .loc 1 1669 0
6027 0372 FFF7FEFF bl __errno(PLT)
6028 .LVL711:
6029 0376 0268 ldr r2, [r0, #0]
6030 0378 7249 ldr r1, .L481+16
6031 037a 022A cmp r2, #2
6032 037c 54F801B0 ldr fp, [r4, r1]
6033 0380 02D0 beq .L446
6034 0382 0368 ldr r3, [r0, #0]
6035 0384 0D2B cmp r3, #13
6036 0386 08D1 bne .L447
ARM GAS /tmp/ccMR8LsA.s page 170
6037 .L446:
1671:system/core/sdcard/sdcard.c **** ERROR("missing packages.list; retrying\n");
6038 .loc 1 1671 0
6039 0388 5046 mov r0, sl
6040 038a 0BF1A801 add r1, fp, #168
6041 038e FFF7FEFF bl fputs(PLT)
6042 .LVL712:
1672:system/core/sdcard/sdcard.c **** sleep(3);
6043 .loc 1 1672 0
6044 0392 0320 movs r0, #3
6045 0394 FFF7FEFF bl sleep(PLT)
6046 .LVL713:
6047 0398 E3E7 b .L478
6048 .L447:
1675:system/core/sdcard/sdcard.c **** ERROR("inotify_add_watch failed: %s\n", strerror(errno));
6049 .loc 1 1675 0
6050 039a 0068 ldr r0, [r0, #0]
6051 039c FFF7FEFF bl strerror(PLT)
6052 .LVL714:
6053 03a0 8149 ldr r1, .L481+116
6054 03a2 0246 mov r2, r0
6055 03a4 0BF1A800 add r0, fp, #168
6056 .LPIC82:
6057 03a8 7944 add r1, pc
6058 03aa 94E0 b .L479
6059 .LVL715:
6060 .L445:
6061 .LBB698:
6062 .LBB694:
1613:system/core/sdcard/sdcard.c **** pthread_mutex_lock(&fuse->lock);
6063 .loc 1 1613 0
6064 03ac 2846 mov r0, r5
6065 .LVL716:
6066 03ae FFF7FEFF bl pthread_mutex_lock(PLT)
6067 .LVL717:
1615:system/core/sdcard/sdcard.c **** hashmapForEach(fuse->package_to_appid, remove_str_to_int, fuse->package_to_appid);
6068 .loc 1 1615 0
6069 03b2 D9F80000 ldr r0, [r9, #0]
6070 03b6 7D49 ldr r1, .L481+120
6071 03b8 0246 mov r2, r0
6072 .LPIC83:
6073 03ba 7944 add r1, pc
6074 03bc FFF7FEFF bl hashmapForEach(PLT)
6075 .LVL718:
1616:system/core/sdcard/sdcard.c **** hashmapForEach(fuse->appid_with_rw, remove_int_to_null, fuse->appid_with_rw);
6076 .loc 1 1616 0
6077 03c0 7069 ldr r0, [r6, #20]
6078 03c2 7B49 ldr r1, .L481+124
6079 03c4 0246 mov r2, r0
6080 .LPIC84:
6081 03c6 7944 add r1, pc
6082 03c8 FFF7FEFF bl hashmapForEach(PLT)
6083 .LVL719:
1618:system/core/sdcard/sdcard.c **** FILE* file = fopen(kPackagesListFile, "r");
6084 .loc 1 1618 0
6085 03cc 7949 ldr r1, .L481+128
6086 03ce 3846 mov r0, r7
ARM GAS /tmp/ccMR8LsA.s page 171
6087 .LPIC86:
6088 03d0 7944 add r1, pc
6089 03d2 FFF7FEFF bl fopen(PLT)
6090 .LVL720:
1619:system/core/sdcard/sdcard.c **** if (!file) {
6091 .loc 1 1619 0
6092 03d6 0746 mov r7, r0
6093 03d8 0028 cmp r0, #0
6094 03da 51D1 bne .L470
1620:system/core/sdcard/sdcard.c **** ERROR("failed to open package list: %s\n", strerror(errno));
6095 .loc 1 1620 0
6096 03dc 594E ldr r6, .L481+16
6097 03de FFF7FEFF bl __errno(PLT)
6098 .LVL721:
6099 03e2 0068 ldr r0, [r0, #0]
6100 03e4 FFF7FEFF bl strerror(PLT)
6101 .LVL722:
6102 03e8 A759 ldr r7, [r4, r6]
6103 .LVL723:
6104 03ea 0246 mov r2, r0
6105 03ec 7249 ldr r1, .L481+132
6106 03ee A837 adds r7, r7, #168
6107 .LPIC87:
6108 03f0 7944 add r1, pc
6109 03f2 3846 mov r0, r7
6110 03f4 FFF7FEFF bl fprintf(PLT)
6111 .LVL724:
1621:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
6112 .loc 1 1621 0
6113 03f8 2846 mov r0, r5
6114 03fa FFF7FEFF bl pthread_mutex_unlock(PLT)
6115 .LVL725:
6116 .LBE694:
6117 .LBE698:
1683:system/core/sdcard/sdcard.c **** ERROR("read_package_list failed: %s\n", strerror(errno));
6118 .loc 1 1683 0
6119 03fe FFF7FEFF bl __errno(PLT)
6120 .LVL726:
6121 0402 0068 ldr r0, [r0, #0]
6122 0404 FFF7FEFF bl strerror(PLT)
6123 .LVL727:
6124 0408 6C49 ldr r1, .L481+136
6125 040a 0246 mov r2, r0
6126 040c 3846 mov r0, r7
6127 .LPIC91:
6128 040e 7944 add r1, pc
6129 0410 61E0 b .L479
6130 .LVL728:
6131 .L455:
6132 .LBB699:
6133 .LBB695:
6134 .LBB689:
1631:system/core/sdcard/sdcard.c **** if (sscanf(buf, "%s %d %*d %*s %*s %s", package_name, &appid, gids) == 3) {
6135 .loc 1 1631 0
6136 0412 0DF5E36A add sl, sp, #1816
6137 0416 C6A8 add r0, sp, #792
6138 .LVL729:
ARM GAS /tmp/ccMR8LsA.s page 172
6139 0418 CDF800A0 str sl, [sp, #0]
6140 041c 5946 mov r1, fp
6141 041e 0DF5A362 add r2, sp, #1304
6142 0422 05AB add r3, sp, #20
6143 0424 FFF7FEFF bl sscanf(PLT)
6144 .LVL730:
6145 0428 0328 cmp r0, #3
6146 042a 2CD1 bne .L476
6147 .LBB690:
1632:system/core/sdcard/sdcard.c **** char* package_name_dup = strdup(package_name);
6148 .loc 1 1632 0
6149 042c 0DF5A360 add r0, sp, #1304
6150 0430 FFF7FEFF bl strdup(PLT)
6151 .LVL731:
1633:system/core/sdcard/sdcard.c **** hashmapPut(fuse->package_to_appid, package_name_dup, (void*) appid);
6152 .loc 1 1633 0
6153 0434 059A ldr r2, [sp, #20]
1632:system/core/sdcard/sdcard.c **** char* package_name_dup = strdup(package_name);
6154 .loc 1 1632 0
6155 0436 0146 mov r1, r0
6156 .LVL732:
1633:system/core/sdcard/sdcard.c **** hashmapPut(fuse->package_to_appid, package_name_dup, (void*) appid);
6157 .loc 1 1633 0
6158 0438 D9F80000 ldr r0, [r9, #0]
6159 .LVL733:
6160 043c FFF7FEFF bl hashmapPut(PLT)
6161 .LVL734:
1635:system/core/sdcard/sdcard.c **** char* token = strtok(gids, ",");
6162 .loc 1 1635 0
6163 0440 5F49 ldr r1, .L481+140
6164 0442 5046 mov r0, sl
1641:system/core/sdcard/sdcard.c **** token = strtok(NULL, ",");
6165 .loc 1 1641 0
6166 0444 DFF87CA1 ldr sl, .L481+144
1635:system/core/sdcard/sdcard.c **** char* token = strtok(gids, ",");
6167 .loc 1 1635 0
6168 .LPIC89:
6169 0448 7944 add r1, pc
6170 044a FFF7FEFF bl strtok(PLT)
6171 .LVL735:
1641:system/core/sdcard/sdcard.c **** token = strtok(NULL, ",");
6172 .loc 1 1641 0
6173 .LPIC90:
6174 044e FA44 add sl, pc
6175 0450 13E0 b .L452
6176 .L454:
1637:system/core/sdcard/sdcard.c **** if (strtoul(token, NULL, 10) == fuse->write_gid) {
6177 .loc 1 1637 0
6178 0452 0021 movs r1, #0
6179 0454 0A22 movs r2, #10
6180 0456 FFF7FEFF bl strtoul(PLT)
6181 .LVL736:
6182 045a E969 ldr r1, [r5, #28]
6183 045c 8842 cmp r0, r1
6184 045e 08D1 bne .L453
1638:system/core/sdcard/sdcard.c **** hashmapPut(fuse->appid_with_rw, (void*) appid, (void*) 1);
6185 .loc 1 1638 0
ARM GAS /tmp/ccMR8LsA.s page 173
6186 0460 0DF5CC53 add r3, sp, #6528
6187 0464 0599 ldr r1, [sp, #20]
6188 0466 0C33 adds r3, r3, #12
6189 0468 0122 movs r2, #1
6190 046a 1868 ldr r0, [r3, #0]
6191 046c FFF7FEFF bl hashmapPut(PLT)
6192 .LVL737:
6193 0470 09E0 b .L476
6194 .L453:
1641:system/core/sdcard/sdcard.c **** token = strtok(NULL, ",");
6195 .loc 1 1641 0
6196 0472 0020 movs r0, #0
6197 0474 5146 mov r1, sl
6198 0476 FFF7FEFF bl strtok(PLT)
6199 .LVL738:
6200 .L452:
1636:system/core/sdcard/sdcard.c **** while (token != NULL) {
6201 .loc 1 1636 0
6202 047a 0028 cmp r0, #0
6203 047c E9D1 bne .L454
6204 047e 02E0 b .L476
6205 .LVL739:
6206 .L470:
6207 .LBE690:
1631:system/core/sdcard/sdcard.c **** if (sscanf(buf, "%s %d %*d %*s %*s %s", package_name, &appid, gids) == 3) {
6208 .loc 1 1631 0
6209 0480 DFF844B1 ldr fp, .L481+148
6210 .LPIC88:
6211 0484 FB44 add fp, pc
6212 .LVL740:
6213 .L476:
6214 .LBE689:
6215 .LBB691:
6216 .LBB692:
479:bionic/libc/include/stdio.h **** __bos(dest), format, __builtin_va_arg_pack());
480:bionic/libc/include/stdio.h **** }
481:bionic/libc/include/stdio.h **** #endif
482:bionic/libc/include/stdio.h ****
483:bionic/libc/include/stdio.h **** #if defined(__clang__)
484:bionic/libc/include/stdio.h **** #define sprintf(dest, ...) __builtin___sprintf_chk(dest, 0, __bos(dest), __VA_ARGS__)
485:bionic/libc/include/stdio.h **** #else
486:bionic/libc/include/stdio.h **** __BIONIC_FORTIFY_INLINE
487:bionic/libc/include/stdio.h **** __printflike(2, 3)
488:bionic/libc/include/stdio.h **** int sprintf(char *dest, const char *format, ...)
489:bionic/libc/include/stdio.h **** {
490:bionic/libc/include/stdio.h **** return __builtin___sprintf_chk(dest, 0,
491:bionic/libc/include/stdio.h **** __bos(dest), format, __builtin_va_arg_pack());
492:bionic/libc/include/stdio.h **** }
493:bionic/libc/include/stdio.h **** #endif
494:bionic/libc/include/stdio.h ****
495:bionic/libc/include/stdio.h **** #if !defined(__clang__)
496:bionic/libc/include/stdio.h **** extern char *__fgets_real(char *, int, FILE *)
497:bionic/libc/include/stdio.h **** __asm__(__USER_LABEL_PREFIX__ "fgets");
498:bionic/libc/include/stdio.h **** __errordecl(__fgets_too_big_error, "fgets called with size bigger than buffer");
499:bionic/libc/include/stdio.h **** __errordecl(__fgets_too_small_error, "fgets called with size less than zero");
500:bionic/libc/include/stdio.h **** extern char *__fgets_chk(char *, int, FILE *, size_t);
501:bionic/libc/include/stdio.h ****
ARM GAS /tmp/ccMR8LsA.s page 174
502:bionic/libc/include/stdio.h **** __BIONIC_FORTIFY_INLINE
503:bionic/libc/include/stdio.h **** char *fgets(char *dest, int size, FILE *stream)
504:bionic/libc/include/stdio.h **** {
505:bionic/libc/include/stdio.h **** size_t bos = __bos(dest);
506:bionic/libc/include/stdio.h ****
507:bionic/libc/include/stdio.h **** // Compiler can prove, at compile time, that the passed in size
508:bionic/libc/include/stdio.h **** // is always negative. Force a compiler error.
509:bionic/libc/include/stdio.h **** if (__builtin_constant_p(size) && (size < 0)) {
510:bionic/libc/include/stdio.h **** __fgets_too_small_error();
511:bionic/libc/include/stdio.h **** }
512:bionic/libc/include/stdio.h ****
513:bionic/libc/include/stdio.h **** // Compiler doesn't know destination size. Don't call __fgets_chk
514:bionic/libc/include/stdio.h **** if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
515:bionic/libc/include/stdio.h **** return __fgets_real(dest, size, stream);
516:bionic/libc/include/stdio.h **** }
517:bionic/libc/include/stdio.h ****
518:bionic/libc/include/stdio.h **** // Compiler can prove, at compile time, that the passed in size
519:bionic/libc/include/stdio.h **** // is always <= the actual object size. Don't call __fgets_chk
520:bionic/libc/include/stdio.h **** if (__builtin_constant_p(size) && (size <= (int) bos)) {
521:bionic/libc/include/stdio.h **** return __fgets_real(dest, size, stream);
6217 .loc 4 521 0
6218 0486 C6A8 add r0, sp, #792
6219 .LVL741:
6220 0488 4FF40071 mov r1, #512
6221 048c 3A46 mov r2, r7
6222 048e FFF7FEFF bl fgets(PLT)
6223 .LVL742:
6224 .LBE692:
6225 .LBE691:
1626:system/core/sdcard/sdcard.c **** while (fgets(buf, sizeof(buf), file) != NULL) {
6226 .loc 1 1626 0
6227 0492 0028 cmp r0, #0
6228 0494 BDD1 bne .L455
1649:system/core/sdcard/sdcard.c **** fclose(file);
6229 .loc 1 1649 0
6230 0496 3846 mov r0, r7
6231 .LBE695:
6232 .LBE699:
1686:system/core/sdcard/sdcard.c **** active = true;
6233 .loc 1 1686 0
6234 0498 0127 movs r7, #1
6235 .LVL743:
6236 .LBB700:
6237 .LBB696:
1649:system/core/sdcard/sdcard.c **** fclose(file);
6238 .loc 1 1649 0
6239 049a FFF7FEFF bl fclose(PLT)
6240 .LVL744:
1650:system/core/sdcard/sdcard.c **** pthread_mutex_unlock(&fuse->lock);
6241 .loc 1 1650 0
6242 049e 2846 mov r0, r5
6243 04a0 FFF7FEFF bl pthread_mutex_unlock(PLT)
6244 .LVL745:
6245 .L444:
6246 .LBE696:
6247 .LBE700:
6248 .LBE702:
ARM GAS /tmp/ccMR8LsA.s page 175
1690:system/core/sdcard/sdcard.c **** int res = read(nfd, event_buf, sizeof(event_buf));
6249 .loc 1 1690 0
6250 04a4 0DF58C7A add sl, sp, #280
6251 04a8 4046 mov r0, r8
6252 04aa 5146 mov r1, sl
6253 04ac 4FF40072 mov r2, #512
6254 04b0 FFF7FEFF bl read(PLT)
6255 .LVL746:
1691:system/core/sdcard/sdcard.c **** if (res < (int) sizeof(*event)) {
6256 .loc 1 1691 0
6257 04b4 0F28 cmp r0, #15
6258 04b6 11DC bgt .L462
1692:system/core/sdcard/sdcard.c **** if (errno == EINTR)
6259 .loc 1 1692 0
6260 04b8 FFF7FEFF bl __errno(PLT)
6261 .LVL747:
6262 04bc 0268 ldr r2, [r0, #0]
6263 04be 042A cmp r2, #4
6264 04c0 3FF447AF beq .L477
1694:system/core/sdcard/sdcard.c **** ERROR("failed to read inotify event: %s\n", strerror(errno));
6265 .loc 1 1694 0
6266 04c4 0068 ldr r0, [r0, #0]
6267 04c6 FFF7FEFF bl strerror(PLT)
6268 .LVL748:
6269 04ca 0246 mov r2, r0
6270 04cc 1D48 ldr r0, .L481+16
6271 04ce 3F49 ldr r1, .L481+152
6272 04d0 2058 ldr r0, [r4, r0]
6273 .LPIC92:
6274 04d2 7944 add r1, pc
6275 04d4 A830 adds r0, r0, #168
6276 .LVL749:
6277 .L479:
6278 04d6 FFF7FEFF bl fprintf(PLT)
6279 .LVL750:
6280 04da 0EE0 b .L443
6281 .LVL751:
6282 .L462:
1691:system/core/sdcard/sdcard.c **** if (res < (int) sizeof(*event)) {
6283 .loc 1 1691 0
6284 04dc 0023 movs r3, #0
6285 .LVL752:
6286 .L456:
6287 .LBB703:
1700:system/core/sdcard/sdcard.c **** event = (struct inotify_event *) (event_buf + event_pos);
6288 .loc 1 1700 0
6289 04de 0AEB0301 add r1, sl, r3
6290 .LVL753:
1703:system/core/sdcard/sdcard.c **** if ((event->mask & IN_IGNORED) == IN_IGNORED) {
6291 .loc 1 1703 0
6292 04e2 4A68 ldr r2, [r1, #4]
1709:system/core/sdcard/sdcard.c **** event_size = sizeof(*event) + event->len;
6293 .loc 1 1709 0
6294 04e4 C968 ldr r1, [r1, #12]
6295 .LVL754:
1706:system/core/sdcard/sdcard.c **** active = false;
6296 .loc 1 1706 0
ARM GAS /tmp/ccMR8LsA.s page 176
6297 04e6 12F4004F tst r2, #32768
6298 04ea 18BF it ne
6299 04ec 0027 movne r7, #0
6300 .LVL755:
1709:system/core/sdcard/sdcard.c **** event_size = sizeof(*event) + event->len;
6301 .loc 1 1709 0
6302 04ee 1031 adds r1, r1, #16
6303 .LVL756:
1710:system/core/sdcard/sdcard.c **** res -= event_size;
6304 .loc 1 1710 0
6305 04f0 401A subs r0, r0, r1
6306 .LVL757:
1711:system/core/sdcard/sdcard.c **** event_pos += event_size;
6307 .loc 1 1711 0
6308 04f2 5B18 adds r3, r3, r1
6309 .LVL758:
6310 .LBE703:
1698:system/core/sdcard/sdcard.c **** while (res >= (int) sizeof(*event)) {
6311 .loc 1 1698 0
6312 04f4 0F28 cmp r0, #15
6313 04f6 F2DC bgt .L456
6314 04f8 2BE7 b .L477
6315 .LVL759:
6316 .L443:
6317 .LBE704:
6318 .LBE684:
6319 .LBE683:
1750:system/core/sdcard/sdcard.c **** ERROR("terminated prematurely\n");
6320 .loc 1 1750 0
6321 04fa 1248 ldr r0, .L481+16
6322 04fc 2158 ldr r1, [r4, r0]
6323 04fe 3448 ldr r0, .L481+156
6324 0500 A831 adds r1, r1, #168
6325 .LPIC93:
6326 0502 7844 add r0, pc
6327 0504 FFF7FEFF bl fputs(PLT)
6328 .LVL760:
6329 .L439:
1755:system/core/sdcard/sdcard.c **** exit(1);
6330 .loc 1 1755 0
6331 0508 0120 movs r0, #1
6332 050a FFF7FEFF bl exit(PLT)
6333 .LVL761:
6334 .L427:
6335 .LBE705:
6336 .LBE707:
1821:system/core/sdcard/sdcard.c ****
1822:system/core/sdcard/sdcard.c **** /* we do not attempt to umount the file system here because we are no longer
1823:system/core/sdcard/sdcard.c **** * running as the root user */
1824:system/core/sdcard/sdcard.c ****
1825:system/core/sdcard/sdcard.c **** error:
1826:system/core/sdcard/sdcard.c **** close(fd);
6337 .loc 1 1826 0
6338 050e 0298 ldr r0, [sp, #8]
6339 0510 FFF7FEFF bl close(PLT)
6340 .LVL762:
6341 .L425:
ARM GAS /tmp/ccMR8LsA.s page 177
1827:system/core/sdcard/sdcard.c **** return res;
1828:system/core/sdcard/sdcard.c **** }
6342 .loc 1 1828 0
6343 0514 039B ldr r3, [sp, #12]
6344 0516 0DF5CC52 add r2, sp, #6528
6345 051a 1432 adds r2, r2, #20
6346 051c 5046 mov r0, sl
6347 051e 1268 ldr r2, [r2, #0]
6348 0520 1968 ldr r1, [r3, #0]
6349 0522 8A42 cmp r2, r1
6350 0524 01D0 beq .L458
6351 0526 FFF7FEFF bl __stack_chk_fail(PLT)
6352 .LVL763:
6353 .L458:
6354 052a 67B0 add sp, sp, #412
6355 052c 0DF5C05D add sp, sp, #6144
6356 0530 BDE8F08F pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
6357 .L482:
6358 .align 2
6359 .L481:
6360 0534 58000400 .word 262232
6361 0538 1C050000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC55+4)
6362 053c 00000000 .word __stack_chk_guard(GOT)
6363 0540 0A050000 .word .LC25-(.LPIC56+4)
6364 0544 00000000 .word __sF(GOT)
6365 0548 D4040000 .word .LC26-(.LPIC57+4)
6366 054c BA040000 .word .LC27-(.LPIC58+4)
6367 0550 AA040000 .word .LC28-(.LPIC60+4)
6368 0554 8A040000 .word .LC29-(.LPIC61+4)
6369 0558 84040000 .word .LANCHOR0-(.LPIC62+4)
6370 055c 66040000 .word .LC30-(.LPIC63+4)
6371 0560 42040000 .word .LC31-(.LPIC64+4)
6372 0564 1C040000 .word .LC32-(.LPIC65+4)
6373 0568 88030000 .word str_icase_equals-(.LPIC67+4)
6374 056c 84030000 .word str_hash-(.LPIC66+4)
6375 0570 76030000 .word int_hash-(.LPIC68+4)
6376 0574 78030000 .word int_equals-(.LPIC69+4)
6377 0578 6A030000 .word .LC33-(.LPIC70+4)
6378 057c 3C030000 .word str_hash-(.LPIC71+4)
6379 0580 3C030000 .word str_icase_equals-(.LPIC72+4)
6380 0584 2A030000 .word int_hash-(.LPIC73+4)
6381 0588 2C030000 .word int_equals-(.LPIC74+4)
6382 058c 1C030000 .word .LC34-(.LPIC75+4)
6383 0590 F2020000 .word .LC35-(.LPIC76+4)
6384 0594 BA020000 .word start_handler-(.LPIC77+4)
6385 0598 94020000 .word .LC36-(.LPIC78+4)
6386 059c 56020000 .word .LC37-(.LPIC79+4)
6387 05a0 3E020000 .word .LC38-(.LPIC80+4)
6388 05a4 40020000 .word .LC39-(.LPIC81+4)
6389 05a8 FC010000 .word .LC40-(.LPIC82+4)
6390 05ac EE010000 .word remove_str_to_int-(.LPIC83+4)
6391 05b0 E6010000 .word remove_int_to_null-(.LPIC84+4)
6392 05b4 E0010000 .word .LC41-(.LPIC86+4)
6393 05b8 C4010000 .word .LC42-(.LPIC87+4)
6394 05bc AA010000 .word .LC45-(.LPIC91+4)
6395 05c0 74010000 .word .LC44-(.LPIC89+4)
6396 05c4 72010000 .word .LC44-(.LPIC90+4)
ARM GAS /tmp/ccMR8LsA.s page 178
6397 05c8 40010000 .word .LC43-(.LPIC88+4)
6398 05cc F6000000 .word .LC46-(.LPIC92+4)
6399 05d0 CA000000 .word .LC47-(.LPIC93+4)
6400 .cfi_endproc
6401 .LFE119:
6402 .fnend
6404 .section .text.start_handler,"ax",%progbits
6405 .align 1
6406 .thumb
6407 .thumb_func
6409 start_handler:
6410 .fnstart
6411 .LFB112:
1593:system/core/sdcard/sdcard.c **** {
6412 .loc 1 1593 0
6413 .cfi_startproc
6414 @ args = 0, pretend = 0, frame = 0
6415 @ frame_needed = 0, uses_anonymous_args = 0
6416 .LVL764:
6417 0000 08B5 push {r3, lr}
6418 .save {r3, lr}
6419 .LCFI61:
6420 .cfi_def_cfa_offset 8
6421 .cfi_offset 3, -8
6422 .cfi_offset 14, -4
1595:system/core/sdcard/sdcard.c **** handle_fuse_requests(handler);
6423 .loc 1 1595 0
6424 0002 FFF7FEFF bl handle_fuse_requests(PLT)
6425 .LVL765:
6426 .cfi_endproc
6427 .LFE112:
6428 .fnend
6430 .section .text.sdcard_main,"ax",%progbits
6431 .align 1
6432 .global sdcard_main
6433 .thumb
6434 .thumb_func
6436 sdcard_main:
6437 .fnstart
6438 .LFB120:
1829:system/core/sdcard/sdcard.c ****
1830:system/core/sdcard/sdcard.c **** int sdcard_main(int argc, char **argv)
1831:system/core/sdcard/sdcard.c **** {
6439 .loc 1 1831 0
6440 .cfi_startproc
6441 @ args = 0, pretend = 0, frame = 24
6442 @ frame_needed = 0, uses_anonymous_args = 0
6443 .LVL766:
6444 0000 2DE9F04F push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
6445 .save {r4, r5, r6, r7, r8, r9, sl, fp, lr}
6446 .LCFI62:
6447 .cfi_def_cfa_offset 36
6448 .cfi_offset 4, -36
6449 .cfi_offset 5, -32
6450 .cfi_offset 6, -28
6451 .cfi_offset 7, -24
6452 .cfi_offset 8, -20
ARM GAS /tmp/ccMR8LsA.s page 179
6453 .cfi_offset 9, -16
6454 .cfi_offset 10, -12
6455 .cfi_offset 11, -8
6456 .cfi_offset 14, -4
1832:system/core/sdcard/sdcard.c **** int res;
1833:system/core/sdcard/sdcard.c **** const char *source_path = NULL;
1834:system/core/sdcard/sdcard.c **** const char *dest_path = NULL;
1835:system/core/sdcard/sdcard.c **** uid_t uid = 0;
1836:system/core/sdcard/sdcard.c **** gid_t gid = 0;
1837:system/core/sdcard/sdcard.c **** gid_t write_gid = AID_SDCARD_RW;
6457 .loc 1 1837 0
6458 0004 40F2F733 movw r3, #1015
1831:system/core/sdcard/sdcard.c **** {
6459 .loc 1 1831 0
6460 0008 DFF8B0B1 ldr fp, .L525
6461 .pad #44
6462 000c 8BB0 sub sp, sp, #44
6463 .LCFI63:
6464 .cfi_def_cfa_offset 80
1838:system/core/sdcard/sdcard.c **** int num_threads = DEFAULT_NUM_THREADS;
1839:system/core/sdcard/sdcard.c **** derive_t derive = DERIVE_NONE;
1840:system/core/sdcard/sdcard.c **** bool split_perms = false;
6465 .loc 1 1840 0
6466 000e 0026 movs r6, #0
1838:system/core/sdcard/sdcard.c **** int num_threads = DEFAULT_NUM_THREADS;
6467 .loc 1 1838 0
6468 0010 4FF0020A mov sl, #2
1841:system/core/sdcard/sdcard.c **** int i;
1842:system/core/sdcard/sdcard.c **** struct rlimit rlim;
1843:system/core/sdcard/sdcard.c ****
1844:system/core/sdcard/sdcard.c **** int opt;
1845:system/core/sdcard/sdcard.c **** while ((opt = getopt(argc, argv, "u:g:w:t:dls")) != -1) {
6469 .loc 1 1845 0
6470 0014 6A4F ldr r7, .L525+4
1839:system/core/sdcard/sdcard.c **** derive_t derive = DERIVE_NONE;
6471 .loc 1 1839 0
6472 0016 B146 mov r9, r6
1831:system/core/sdcard/sdcard.c **** {
6473 .loc 1 1831 0
6474 .LPIC94:
6475 0018 FB44 add fp, pc
6476 001a 0690 str r0, [sp, #24]
6477 001c 0791 str r1, [sp, #28]
6478 .LVL767:
1836:system/core/sdcard/sdcard.c **** gid_t gid = 0;
6479 .loc 1 1836 0
6480 001e 3446 mov r4, r6
1837:system/core/sdcard/sdcard.c **** gid_t write_gid = AID_SDCARD_RW;
6481 .loc 1 1837 0
6482 0020 0593 str r3, [sp, #20]
1835:system/core/sdcard/sdcard.c **** uid_t uid = 0;
6483 .loc 1 1835 0
6484 0022 3546 mov r5, r6
6485 .loc 1 1845 0
6486 .LPIC95:
6487 0024 7F44 add r7, pc
6488 0026 3EE0 b .L521
ARM GAS /tmp/ccMR8LsA.s page 180
6489 .LVL768:
6490 .L496:
1846:system/core/sdcard/sdcard.c **** switch (opt) {
6491 .loc 1 1846 0
6492 0028 6438 subs r0, r0, #100
6493 .LVL769:
6494 002a 1328 cmp r0, #19
6495 002c 6AD8 bhi .L523
6496 002e DFE800F0 tbb [pc, r0]
6497 .L494:
6498 0032 35 .byte (.L487-.L494)/2
6499 0033 69 .byte (.L523-.L494)/2
6500 0034 69 .byte (.L523-.L494)/2
6501 0035 14 .byte (.L488-.L494)/2
6502 0036 69 .byte (.L523-.L494)/2
6503 0037 69 .byte (.L523-.L494)/2
6504 0038 69 .byte (.L523-.L494)/2
6505 0039 69 .byte (.L523-.L494)/2
6506 003a 38 .byte (.L509-.L494)/2
6507 003b 69 .byte (.L523-.L494)/2
6508 003c 69 .byte (.L523-.L494)/2
6509 003d 69 .byte (.L523-.L494)/2
6510 003e 69 .byte (.L523-.L494)/2
6511 003f 69 .byte (.L523-.L494)/2
6512 0040 69 .byte (.L523-.L494)/2
6513 0041 33 .byte (.L490-.L494)/2
6514 0042 29 .byte (.L491-.L494)/2
6515 0043 0A .byte (.L492-.L494)/2
6516 0044 69 .byte (.L523-.L494)/2
6517 0045 1E .byte (.L493-.L494)/2
6518 .align 1
6519 .L492:
1847:system/core/sdcard/sdcard.c **** case 'u':
1848:system/core/sdcard/sdcard.c **** uid = strtoul(optarg, NULL, 10);
6520 .loc 1 1848 0
6521 0046 5F4D ldr r5, .L525+8
6522 0048 0A22 movs r2, #10
6523 004a 5BF80510 ldr r1, [fp, r5]
6524 004e 0868 ldr r0, [r1, #0]
6525 .LVL770:
6526 0050 0021 movs r1, #0
6527 0052 FFF7FEFF bl strtoul(PLT)
6528 .LVL771:
6529 0056 0546 mov r5, r0
1849:system/core/sdcard/sdcard.c **** break;
6530 .loc 1 1849 0
6531 0058 25E0 b .L521
6532 .LVL772:
6533 .L488:
1850:system/core/sdcard/sdcard.c **** case 'g':
1851:system/core/sdcard/sdcard.c **** gid = strtoul(optarg, NULL, 10);
6534 .loc 1 1851 0
6535 005a 5A4C ldr r4, .L525+8
6536 005c 0021 movs r1, #0
6537 005e 5BF80420 ldr r2, [fp, r4]
6538 0062 1068 ldr r0, [r2, #0]
6539 .LVL773:
ARM GAS /tmp/ccMR8LsA.s page 181
6540 0064 0A22 movs r2, #10
6541 0066 FFF7FEFF bl strtoul(PLT)
6542 .LVL774:
6543 006a 0446 mov r4, r0
1852:system/core/sdcard/sdcard.c **** break;
6544 .loc 1 1852 0
6545 006c 1BE0 b .L521
6546 .LVL775:
6547 .L493:
1853:system/core/sdcard/sdcard.c **** case 'w':
1854:system/core/sdcard/sdcard.c **** write_gid = strtoul(optarg, NULL, 10);
6548 .loc 1 1854 0
6549 006e DFF854E1 ldr lr, .L525+8
6550 0072 0021 movs r1, #0
6551 0074 5BF80E20 ldr r2, [fp, lr]
6552 0078 1068 ldr r0, [r2, #0]
6553 .LVL776:
6554 007a 0A22 movs r2, #10
6555 007c FFF7FEFF bl strtoul(PLT)
6556 .LVL777:
6557 0080 0590 str r0, [sp, #20]
1855:system/core/sdcard/sdcard.c **** break;
6558 .loc 1 1855 0
6559 0082 10E0 b .L521
6560 .LVL778:
6561 .L491:
1856:system/core/sdcard/sdcard.c **** case 't':
1857:system/core/sdcard/sdcard.c **** num_threads = strtoul(optarg, NULL, 10);
6562 .loc 1 1857 0
6563 0084 4F48 ldr r0, .L525+8
6564 .LVL779:
6565 0086 0021 movs r1, #0
6566 0088 0A22 movs r2, #10
6567 008a 5BF80030 ldr r3, [fp, r0]
6568 008e 1868 ldr r0, [r3, #0]
6569 0090 FFF7FEFF bl strtoul(PLT)
6570 .LVL780:
6571 0094 8246 mov sl, r0
1858:system/core/sdcard/sdcard.c **** break;
6572 .loc 1 1858 0
6573 0096 06E0 b .L521
6574 .LVL781:
6575 .L490:
1859:system/core/sdcard/sdcard.c **** case 'd':
1860:system/core/sdcard/sdcard.c **** derive = DERIVE_UNIFIED;
1861:system/core/sdcard/sdcard.c **** break;
1862:system/core/sdcard/sdcard.c **** case 'l':
1863:system/core/sdcard/sdcard.c **** derive = DERIVE_LEGACY;
1864:system/core/sdcard/sdcard.c **** break;
1865:system/core/sdcard/sdcard.c **** case 's':
1866:system/core/sdcard/sdcard.c **** split_perms = true;
6576 .loc 1 1866 0
6577 0098 0126 movs r6, #1
1867:system/core/sdcard/sdcard.c **** break;
6578 .loc 1 1867 0
6579 009a 04E0 b .L521
6580 .LVL782:
ARM GAS /tmp/ccMR8LsA.s page 182
6581 .L487:
1860:system/core/sdcard/sdcard.c **** derive = DERIVE_UNIFIED;
6582 .loc 1 1860 0
6583 009c 4FF00209 mov r9, #2
6584 00a0 01E0 b .L521
6585 .L509:
1863:system/core/sdcard/sdcard.c **** derive = DERIVE_LEGACY;
6586 .loc 1 1863 0
6587 00a2 4FF00109 mov r9, #1
6588 .LVL783:
6589 .L521:
1845:system/core/sdcard/sdcard.c **** while ((opt = getopt(argc, argv, "u:g:w:t:dls")) != -1) {
6590 .loc 1 1845 0 discriminator 1
6591 00a6 0698 ldr r0, [sp, #24]
6592 00a8 3A46 mov r2, r7
6593 00aa 0799 ldr r1, [sp, #28]
6594 00ac FFF7FEFF bl getopt(PLT)
6595 .LVL784:
6596 00b0 431C adds r3, r0, #1
6597 00b2 B9D1 bne .L496
1868:system/core/sdcard/sdcard.c **** case '?':
1869:system/core/sdcard/sdcard.c **** default:
1870:system/core/sdcard/sdcard.c **** return usage();
1871:system/core/sdcard/sdcard.c **** }
1872:system/core/sdcard/sdcard.c **** }
1873:system/core/sdcard/sdcard.c ****
1874:system/core/sdcard/sdcard.c **** for (i = optind; i < argc; i++) {
6598 .loc 1 1874 0
6599 00b4 444A ldr r2, .L525+12
1834:system/core/sdcard/sdcard.c **** const char *dest_path = NULL;
6600 .loc 1 1834 0
6601 00b6 0027 movs r7, #0
1833:system/core/sdcard/sdcard.c **** const char *source_path = NULL;
6602 .loc 1 1833 0
6603 00b8 B846 mov r8, r7
6604 .loc 1 1874 0
6605 00ba 5BF80200 ldr r0, [fp, r2]
6606 .LVL785:
6607 00be 0368 ldr r3, [r0, #0]
6608 .LVL786:
6609 00c0 27E0 b .L497
6610 .LVL787:
6611 .L501:
6612 .LBB708:
1875:system/core/sdcard/sdcard.c **** char* arg = argv[i];
6613 .loc 1 1875 0
6614 00c2 0798 ldr r0, [sp, #28]
6615 00c4 50F82300 ldr r0, [r0, r3, lsl #2]
6616 .LVL788:
1876:system/core/sdcard/sdcard.c **** if (!source_path) {
6617 .loc 1 1876 0
6618 00c8 B8F1000F cmp r8, #0
6619 00cc 1DD0 beq .L510
1877:system/core/sdcard/sdcard.c **** source_path = arg;
1878:system/core/sdcard/sdcard.c **** } else if (!dest_path) {
6620 .loc 1 1878 0
6621 00ce F7B1 cbz r7, .L511
ARM GAS /tmp/ccMR8LsA.s page 183
1879:system/core/sdcard/sdcard.c **** dest_path = arg;
1880:system/core/sdcard/sdcard.c **** } else if (!uid) {
6622 .loc 1 1880 0
6623 00d0 35B9 cbnz r5, .L499
1881:system/core/sdcard/sdcard.c **** uid = strtoul(arg, NULL, 10);
6624 .loc 1 1881 0
6625 00d2 2946 mov r1, r5
6626 00d4 0A22 movs r2, #10
6627 00d6 0493 str r3, [sp, #16]
6628 00d8 FFF7FEFF bl strtoul(PLT)
6629 .LVL789:
6630 00dc 0546 mov r5, r0
6631 .LVL790:
6632 00de 06E0 b .L522
6633 .LVL791:
6634 .L499:
1882:system/core/sdcard/sdcard.c **** } else if (!gid) {
6635 .loc 1 1882 0
6636 00e0 3CB9 cbnz r4, .L500
1883:system/core/sdcard/sdcard.c **** gid = strtoul(arg, NULL, 10);
6637 .loc 1 1883 0
6638 00e2 2146 mov r1, r4
6639 00e4 0A22 movs r2, #10
6640 00e6 0493 str r3, [sp, #16]
6641 00e8 FFF7FEFF bl strtoul(PLT)
6642 .LVL792:
6643 00ec 0446 mov r4, r0
6644 .LVL793:
6645 .L522:
6646 00ee 049B ldr r3, [sp, #16]
6647 00f0 0EE0 b .L498
6648 .LVL794:
6649 .L500:
1884:system/core/sdcard/sdcard.c **** } else {
1885:system/core/sdcard/sdcard.c **** ERROR("too many arguments\n");
6650 .loc 1 1885 0
6651 00f2 DFF8D8C0 ldr ip, .L525+16
6652 00f6 3648 ldr r0, .L525+20
6653 .LVL795:
6654 00f8 5BF80C10 ldr r1, [fp, ip]
6655 .LPIC96:
6656 00fc 7844 add r0, pc
6657 .LVL796:
6658 .L524:
6659 00fe A831 adds r1, r1, #168
6660 0100 FFF7FEFF bl fputs(PLT)
6661 .LVL797:
6662 .L523:
1886:system/core/sdcard/sdcard.c **** return usage();
6663 .loc 1 1886 0
6664 0104 FFF7FEFF bl usage(PLT)
6665 .LVL798:
6666 0108 54E0 b .L495
6667 .LVL799:
6668 .L510:
1877:system/core/sdcard/sdcard.c **** source_path = arg;
6669 .loc 1 1877 0
ARM GAS /tmp/ccMR8LsA.s page 184
6670 010a 8046 mov r8, r0
6671 .LVL800:
6672 010c 00E0 b .L498
6673 .LVL801:
6674 .L511:
1879:system/core/sdcard/sdcard.c **** dest_path = arg;
6675 .loc 1 1879 0
6676 010e 0746 mov r7, r0
6677 .LVL802:
6678 .L498:
6679 .LBE708:
1874:system/core/sdcard/sdcard.c **** for (i = optind; i < argc; i++) {
6680 .loc 1 1874 0
6681 0110 0133 adds r3, r3, #1
6682 .LVL803:
6683 .L497:
1874:system/core/sdcard/sdcard.c **** for (i = optind; i < argc; i++) {
6684 .loc 1 1874 0 is_stmt 0 discriminator 1
6685 0112 0699 ldr r1, [sp, #24]
6686 0114 8B42 cmp r3, r1
6687 0116 D4DB blt .L501
1887:system/core/sdcard/sdcard.c **** }
1888:system/core/sdcard/sdcard.c **** }
1889:system/core/sdcard/sdcard.c ****
1890:system/core/sdcard/sdcard.c **** if (!source_path) {
6688 .loc 1 1890 0 is_stmt 1
6689 0118 B8F1000F cmp r8, #0
6690 011c 05D1 bne .L502
1891:system/core/sdcard/sdcard.c **** ERROR("no source path specified\n");
6691 .loc 1 1891 0
6692 011e 2B4B ldr r3, .L525+16
6693 .LVL804:
6694 0120 2C48 ldr r0, .L525+24
6695 0122 5BF80310 ldr r1, [fp, r3]
6696 .LPIC97:
6697 0126 7844 add r0, pc
6698 0128 E9E7 b .L524
6699 .LVL805:
6700 .L502:
1892:system/core/sdcard/sdcard.c **** return usage();
1893:system/core/sdcard/sdcard.c **** }
1894:system/core/sdcard/sdcard.c **** if (!dest_path) {
6701 .loc 1 1894 0
6702 012a 2FB9 cbnz r7, .L503
1895:system/core/sdcard/sdcard.c **** ERROR("no dest path specified\n");
6703 .loc 1 1895 0
6704 012c 2749 ldr r1, .L525+16
6705 012e 2A48 ldr r0, .L525+28
6706 0130 5BF80110 ldr r1, [fp, r1]
6707 .LPIC98:
6708 0134 7844 add r0, pc
6709 0136 E2E7 b .L524
6710 .L503:
1896:system/core/sdcard/sdcard.c **** return usage();
1897:system/core/sdcard/sdcard.c **** }
1898:system/core/sdcard/sdcard.c **** if (!uid || !gid) {
6711 .loc 1 1898 0
ARM GAS /tmp/ccMR8LsA.s page 185
6712 0138 05B1 cbz r5, .L504
6713 .loc 1 1898 0 is_stmt 0 discriminator 1
6714 013a 2CB9 cbnz r4, .L505
6715 .L504:
1899:system/core/sdcard/sdcard.c **** ERROR("uid and gid must be nonzero\n");
6716 .loc 1 1899 0 is_stmt 1
6717 013c 234A ldr r2, .L525+16
6718 013e 2748 ldr r0, .L525+32
6719 0140 5BF80210 ldr r1, [fp, r2]
6720 .LPIC99:
6721 0144 7844 add r0, pc
6722 0146 DAE7 b .L524
6723 .L505:
1900:system/core/sdcard/sdcard.c **** return usage();
1901:system/core/sdcard/sdcard.c **** }
1902:system/core/sdcard/sdcard.c **** if (num_threads < 1) {
6724 .loc 1 1902 0
6725 0148 BAF1000F cmp sl, #0
6726 014c 06DC bgt .L506
1903:system/core/sdcard/sdcard.c **** ERROR("number of threads must be at least 1\n");
6727 .loc 1 1903 0
6728 014e DFF87CE0 ldr lr, .L525+16
6729 0152 2348 ldr r0, .L525+36
6730 0154 5BF80E10 ldr r1, [fp, lr]
6731 .LPIC100:
6732 0158 7844 add r0, pc
6733 015a D0E7 b .L524
6734 .L506:
1904:system/core/sdcard/sdcard.c **** return usage();
1905:system/core/sdcard/sdcard.c **** }
1906:system/core/sdcard/sdcard.c **** if (split_perms && derive == DERIVE_NONE) {
6735 .loc 1 1906 0
6736 015c 4EB1 cbz r6, .L507
6737 .loc 1 1906 0 is_stmt 0 discriminator 1
6738 015e B9F1000F cmp r9, #0
6739 0162 06D1 bne .L507
1907:system/core/sdcard/sdcard.c **** ERROR("cannot split permissions without deriving\n");
6740 .loc 1 1907 0 is_stmt 1
6741 0164 DFF864C0 ldr ip, .L525+16
6742 0168 1E48 ldr r0, .L525+40
6743 016a 5BF80C10 ldr r1, [fp, ip]
6744 .LPIC101:
6745 016e 7844 add r0, pc
6746 0170 C5E7 b .L524
6747 .L507:
1908:system/core/sdcard/sdcard.c **** return usage();
1909:system/core/sdcard/sdcard.c **** }
1910:system/core/sdcard/sdcard.c ****
1911:system/core/sdcard/sdcard.c **** rlim.rlim_cur = 8192;
6748 .loc 1 1911 0
6749 0172 4FF40053 mov r3, #8192
6750 .LVL806:
1912:system/core/sdcard/sdcard.c **** rlim.rlim_max = 8192;
1913:system/core/sdcard/sdcard.c **** if (setrlimit(RLIMIT_NOFILE, &rlim)) {
6751 .loc 1 1913 0
6752 0176 0720 movs r0, #7
6753 0178 08A9 add r1, sp, #32
ARM GAS /tmp/ccMR8LsA.s page 186
1911:system/core/sdcard/sdcard.c **** rlim.rlim_cur = 8192;
6754 .loc 1 1911 0
6755 017a 0893 str r3, [sp, #32]
1912:system/core/sdcard/sdcard.c **** rlim.rlim_max = 8192;
6756 .loc 1 1912 0
6757 017c 0993 str r3, [sp, #36]
6758 .loc 1 1913 0
6759 017e FFF7FEFF bl setrlimit(PLT)
6760 .LVL807:
6761 0182 50B1 cbz r0, .L508
1914:system/core/sdcard/sdcard.c **** ERROR("Error setting RLIMIT_NOFILE, errno = %d\n", errno);
6762 .loc 1 1914 0
6763 0184 FFF7FEFF bl __errno(PLT)
6764 .LVL808:
6765 0188 0268 ldr r2, [r0, #0]
6766 018a 1048 ldr r0, .L525+16
6767 018c 1649 ldr r1, .L525+44
6768 018e 5BF80000 ldr r0, [fp, r0]
6769 .LPIC102:
6770 0192 7944 add r1, pc
6771 0194 A830 adds r0, r0, #168
6772 0196 FFF7FEFF bl fprintf(PLT)
6773 .LVL809:
6774 .L508:
1915:system/core/sdcard/sdcard.c **** }
1916:system/core/sdcard/sdcard.c ****
1917:system/core/sdcard/sdcard.c **** res = run(source_path, dest_path, uid, gid, write_gid, num_threads, derive, split_perms);
6775 .loc 1 1917 0
6776 019a 059B ldr r3, [sp, #20]
6777 019c 4046 mov r0, r8
6778 019e CDF80890 str r9, [sp, #8]
6779 01a2 3946 mov r1, r7
6780 01a4 0396 str r6, [sp, #12]
6781 01a6 2A46 mov r2, r5
6782 01a8 8DE80804 stmia sp, {r3, sl}
6783 01ac 2346 mov r3, r4
6784 01ae FFF7FEFF bl run(PLT)
6785 .LVL810:
1918:system/core/sdcard/sdcard.c **** return res < 0 ? 1 : 0;
6786 .loc 1 1918 0
6787 01b2 C00F lsrs r0, r0, #31
6788 .LVL811:
6789 .L495:
1919:system/core/sdcard/sdcard.c **** }
6790 .loc 1 1919 0
6791 01b4 0BB0 add sp, sp, #44
6792 01b6 BDE8F08F pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
6793 .L526:
6794 01ba 00BF .align 2
6795 .L525:
6796 01bc A0010000 .word _GLOBAL_OFFSET_TABLE_-(.LPIC94+4)
6797 01c0 98010000 .word .LC48-(.LPIC95+4)
6798 01c4 00000000 .word optarg(GOT)
6799 01c8 00000000 .word optind(GOT)
6800 01cc 00000000 .word __sF(GOT)
6801 01d0 D0000000 .word .LC49-(.LPIC96+4)
6802 01d4 AA000000 .word .LC50-(.LPIC97+4)
ARM GAS /tmp/ccMR8LsA.s page 187
6803 01d8 A0000000 .word .LC51-(.LPIC98+4)
6804 01dc 94000000 .word .LC52-(.LPIC99+4)
6805 01e0 84000000 .word .LC53-(.LPIC100+4)
6806 01e4 72000000 .word .LC54-(.LPIC101+4)
6807 01e8 52000000 .word .LC55-(.LPIC102+4)
6808 .cfi_endproc
6809 .LFE120:
6810 .fnend
6812 .section .rodata.kGroups,"a",%progbits
6813 .align 2
6814 .LANCHOR0 = . + 0
6817 kGroups:
6818 0000 08040000 .word 1032
6819 .section .rodata.str1.1,"aMS",%progbits,1
6820 .LC0:
6821 0000 75736167 .ascii "usage: sdcard [OPTIONS] <source_path> <dest_path>\012"
6821 653A2073
6821 64636172
6821 64205B4F
6821 5054494F
6822 0032 20202020 .ascii " -u: specify UID to run as\012 -g: specify GI"
6822 2D753A20
6822 73706563
6822 69667920
6822 55494420
6823 0062 4420746F .ascii "D to run as\012 -w: specify GID required to writ"
6823 2072756E
6823 2061730A
6823 20202020
6823 2D773A20
6824 0092 65202864 .ascii "e (default sdcard_rw)\012 -t: specify number of "
6824 65666175
6824 6C742073
6824 64636172
6824 645F7277
6825 00c2 74687265 .ascii "threads to use (default %d)\012 -d: derive file "
6825 61647320
6825 746F2075
6825 73652028
6825 64656661
6826 00f2 7065726D .ascii "permissions based on path\012 -l: derive file pe"
6826 69737369
6826 6F6E7320
6826 62617365
6826 64206F6E
6827 0122 726D6973 .ascii "rmissions based on legacy internal layout\012 -s"
6827 73696F6E
6827 73206261
6827 73656420
6827 6F6E206C
6828 0152 3A207370 .ascii ": split derived permissions for pics, av (requires "
6828 6C697420
6828 64657269
6828 76656420
6828 7065726D
6829 0185 2D64206F .ascii "-d or -l)\012\012\000"
6829 72202D6C
ARM GAS /tmp/ccMR8LsA.s page 188
6829 290A0A00
6830 .LC1:
6831 0191 6175746F .ascii "autorun.inf\000"
6831 72756E2E
6831 696E6600
6832 .LC2:
6833 019d 2E616E64 .ascii ".android_secure\000"
6833 726F6964
6833 5F736563
6833 75726500
6834 .LC3:
6835 01ad 616E6472 .ascii "android_secure\000"
6835 6F69645F
6835 73656375
6835 726500
6836 .LC4:
6837 01bc 2A2A2A20 .ascii "*** REPLY FAILED *** %d\012\000"
6837 5245504C
6837 59204641
6837 494C4544
6837 202A2A2A
6838 .LC5:
6839 01d5 5A65726F .ascii "Zero refcnt %p\012\000"
6839 20726566
6839 636E7420
6839 25700A00
6840 .LC6:
6841 01e5 4661696C .ascii "Failed to open(%s): %s\012\000"
6841 65642074
6841 6F206F70
6841 656E2825
6841 73293A20
6842 .LC7:
6843 01fd 6F70656E .ascii "opendir %s failed: %s\012\000"
6843 64697220
6843 25732066
6843 61696C65
6843 643A2025
6844 .LC8:
6845 0214 416E6472 .ascii "Android\000"
6845 6F696400
6846 .LC9:
6847 021c 4443494D .ascii "DCIM\000"
6847 00
6848 .LC10:
6849 0221 50696374 .ascii "Pictures\000"
6849 75726573
6849 00
6850 .LC11:
6851 022a 416C6172 .ascii "Alarms\000"
6851 6D7300
6852 .LC12:
6853 0231 4D6F7669 .ascii "Movies\000"
6853 657300
6854 .LC13:
6855 0238 4D757369 .ascii "Music\000"
6855 6300
ARM GAS /tmp/ccMR8LsA.s page 189
6856 .LC14:
6857 023e 4E6F7469 .ascii "Notifications\000"
6857 66696361
6857 74696F6E
6857 7300
6858 .LC15:
6859 024c 506F6463 .ascii "Podcasts\000"
6859 61737473
6859 00
6860 .LC16:
6861 0255 52696E67 .ascii "Ringtones\000"
6861 746F6E65
6861 7300
6862 .LC17:
6863 025f 64617461 .ascii "data\000"
6863 00
6864 .LC18:
6865 0264 6F626200 .ascii "obb\000"
6866 .LC19:
6867 0268 75736572 .ascii "user\000"
6867 00
6868 .LC20:
6869 026d 25732F2E .ascii "%s/.nomedia\000"
6869 6E6F6D65
6869 64696100
6870 .LC21:
6871 0279 4661696C .ascii "Failed to touch(%s): %s\012\000"
6871 65642074
6871 6F20746F
6871 75636828
6871 2573293A
6872 .LC22:
6873 0292 5B25645D .ascii "[%d] handle_fuse_requests: errno=%d\012\000"
6873 2068616E
6873 646C655F
6873 66757365
6873 5F726571
6874 .LC23:
6875 02b7 5B25645D .ascii "[%d] request too short: len=%zu\012\000"
6875 20726571
6875 75657374
6875 20746F6F
6875 2073686F
6876 .LC24:
6877 02d8 5B25645D .ascii "[%d] malformed header: len=%zu, hdr->len=%u\012\000"
6877 206D616C
6877 666F726D
6877 65642068
6877 65616465
6878 .LC25:
6879 0305 2F646576 .ascii "/dev/fuse\000"
6879 2F667573
6879 6500
6880 .LC26:
6881 030f 63616E6E .ascii "cannot open fuse device: %s\012\000"
6881 6F74206F
6881 70656E20
ARM GAS /tmp/ccMR8LsA.s page 190
6881 66757365
6881 20646576
6882 .LC27:
6883 032c 66643D25 .ascii "fd=%i,rootmode=40000,default_permissions,allow_othe"
6883 692C726F
6883 6F746D6F
6883 64653D34
6883 30303030
6884 035f 722C7573 .ascii "r,user_id=%d,group_id=%d\000"
6884 65725F69
6884 643D2564
6884 2C67726F
6884 75705F69
6885 .LC28:
6886 0378 66757365 .ascii "fuse\000"
6886 00
6887 .LC29:
6888 037d 63616E6E .ascii "cannot mount fuse filesystem: %s\012\000"
6888 6F74206D
6888 6F756E74
6888 20667573
6888 65206669
6889 .LC30:
6890 039f 63616E6E .ascii "cannot setgroups: %s\012\000"
6890 6F742073
6890 65746772
6890 6F757073
6890 3A202573
6891 .LC31:
6892 03b5 63616E6E .ascii "cannot setgid: %s\012\000"
6892 6F742073
6892 65746769
6892 643A2025
6892 730A00
6893 .LC32:
6894 03c8 63616E6E .ascii "cannot setuid: %s\012\000"
6894 6F742073
6894 65747569
6894 643A2025
6894 730A00
6895 .LC33:
6896 03db 25732F6F .ascii "%s/obb\000"
6896 626200
6897 .LC34:
6898 03e2 25732F41 .ascii "%s/Android/obb\000"
6898 6E64726F
6898 69642F6F
6898 626200
6899 .LC35:
6900 03f1 63616E6E .ascii "cannot allocate storage for threads\012\000"
6900 6F742061
6900 6C6C6F63
6900 61746520
6900 73746F72
6901 .LC36:
6902 0416 6661696C .ascii "failed to start thread #%d, error=%d\012\000"
6902 65642074
ARM GAS /tmp/ccMR8LsA.s page 191
6902 6F207374
6902 61727420
6902 74687265
6903 .LC37:
6904 043c 696E6F74 .ascii "inotify_init failed: %s\012\000"
6904 6966795F
6904 696E6974
6904 20666169
6904 6C65643A
6905 .LC38:
6906 0455 2F646174 .ascii "/data/system/packages.list\000"
6906 612F7379
6906 7374656D
6906 2F706163
6906 6B616765
6907 .LC39:
6908 0470 6D697373 .ascii "missing packages.list; retrying\012\000"
6908 696E6720
6908 7061636B
6908 61676573
6908 2E6C6973
6909 .LC40:
6910 0491 696E6F74 .ascii "inotify_add_watch failed: %s\012\000"
6910 6966795F
6910 6164645F
6910 77617463
6910 68206661
6911 .LC41:
6912 04af 7200 .ascii "r\000"
6913 .LC42:
6914 04b1 6661696C .ascii "failed to open package list: %s\012\000"
6914 65642074
6914 6F206F70
6914 656E2070
6914 61636B61
6915 .LC43:
6916 04d2 25732025 .ascii "%s %d %*d %*s %*s %s\000"
6916 6420252A
6916 6420252A
6916 7320252A
6916 73202573
6917 .LC44:
6918 04e7 2C00 .ascii ",\000"
6919 .LC45:
6920 04e9 72656164 .ascii "read_package_list failed: %s\012\000"
6920 5F706163
6920 6B616765
6920 5F6C6973
6920 74206661
6921 .LC46:
6922 0507 6661696C .ascii "failed to read inotify event: %s\012\000"
6922 65642074
6922 6F207265
6922 61642069
6922 6E6F7469
6923 .LC47:
6924 0529 7465726D .ascii "terminated prematurely\012\000"
ARM GAS /tmp/ccMR8LsA.s page 192
6924 696E6174
6924 65642070
6924 72656D61
6924 74757265
6925 .LC48:
6926 0541 753A673A .ascii "u:g:w:t:dls\000"
6926 773A743A
6926 646C7300
6927 .LC49:
6928 054d 746F6F20 .ascii "too many arguments\012\000"
6928 6D616E79
6928 20617267
6928 756D656E
6928 74730A00
6929 .LC50:
6930 0561 6E6F2073 .ascii "no source path specified\012\000"
6930 6F757263
6930 65207061
6930 74682073
6930 70656369
6931 .LC51:
6932 057b 6E6F2064 .ascii "no dest path specified\012\000"
6932 65737420
6932 70617468
6932 20737065
6932 63696669
6933 .LC52:
6934 0593 75696420 .ascii "uid and gid must be nonzero\012\000"
6934 616E6420
6934 67696420
6934 6D757374
6934 20626520
6935 .LC53:
6936 05b0 6E756D62 .ascii "number of threads must be at least 1\012\000"
6936 6572206F
6936 66207468
6936 72656164
6936 73206D75
6937 .LC54:
6938 05d6 63616E6E .ascii "cannot split permissions without deriving\012\000"
6938 6F742073
6938 706C6974
6938 20706572
6938 6D697373
6939 .LC55:
6940 0601 4572726F .ascii "Error setting RLIMIT_NOFILE, errno = %d\012\000"
6940 72207365
6940 7474696E
6940 6720524C
6940 494D4954
6941 .text
6942 .Letext0:
6943 .file 6 "/home/rod/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/../lib
6944 .file 7 "bionic/libc/arch-arm/include/machine/_types.h"
6945 .file 8 "bionic/libc/include/stdint.h"
6946 .file 9 "bionic/libc/kernel/arch-arm/asm/posix_types.h"
6947 .file 10 "bionic/libc/kernel/arch-arm/asm/types.h"
ARM GAS /tmp/ccMR8LsA.s page 193
6948 .file 11 "bionic/libc/include/sys/types.h"
6949 .file 12 "bionic/libc/kernel/common/linux/time.h"
6950 .file 13 "bionic/libc/include/sys/vfs.h"
6951 .file 14 "bionic/libc/kernel/common/linux/uio.h"
6952 .file 15 "bionic/libc/include/dirent.h"
6953 .file 16 "bionic/libc/include/pthread.h"
6954 .file 17 "bionic/libc/kernel/common/linux/resource.h"
6955 .file 18 "bionic/libc/kernel/common/linux/inotify.h"
6956 .file 19 "system/core/include/cutils/hashmap.h"
6957 .file 20 "system/core/include/cutils/multiuser.h"
6958 .file 21 "system/core/include/private/android_filesystem_config.h"
6959 .file 22 "system/core/sdcard/fuse.h"
6960 .file 23 "bionic/libc/include/unistd.h"
6961 .file 24 "bionic/libc/include/ctype.h"
6962 .file 25 "bionic/libc/include/strings.h"
6963 .file 26 "bionic/libc/include/sys/uio.h"
6964 .file 27 "<built-in>"
6965 .file 28 "bionic/libc/include/malloc.h"
6966 .file 29 "bionic/libc/include/stdlib.h"
6967 .file 30 "bionic/libc/include/errno.h"
6968 .file 31 "system/core/include/cutils/fs.h"
6969 .file 32 "bionic/libc/include/sys/inotify.h"
6970 .file 33 "bionic/libc/include/sys/mount.h"
6971 .file 34 "bionic/libc/include/sys/resource.h"
ARM GAS /tmp/ccMR8LsA.s page 194
DEFINED SYMBOLS
*ABS*:0000000000000000 sdcard.c
/tmp/ccMR8LsA.s:20 .text.int_hash:0000000000000000 $t
/tmp/ccMR8LsA.s:24 .text.int_hash:0000000000000000 int_hash
.ARM.exidx.text.int_hash:0000000000000000 $d
/tmp/ccMR8LsA.s:41 .text.int_equals:0000000000000000 $t
/tmp/ccMR8LsA.s:45 .text.int_equals:0000000000000000 int_equals
.ARM.exidx.text.int_equals:0000000000000000 $d
/tmp/ccMR8LsA.s:65 .text.usage:0000000000000000 $t
/tmp/ccMR8LsA.s:69 .text.usage:0000000000000000 usage
/tmp/ccMR8LsA.s:104 .text.usage:000000000000001c $d
/tmp/ccMR8LsA.s:6820 .rodata.str1.1:0000000000000000 .LC0
.ARM.extab.text.usage:0000000000000000 $d
.ARM.exidx.text.usage:0000000000000000 $d
/tmp/ccMR8LsA.s:112 .text.str_icase_equals:0000000000000000 $t
/tmp/ccMR8LsA.s:116 .text.str_icase_equals:0000000000000000 str_icase_equals
.ARM.extab.text.str_icase_equals:0000000000000000 $d
.ARM.exidx.text.str_icase_equals:0000000000000000 $d
/tmp/ccMR8LsA.s:143 .text.str_hash:0000000000000000 $t
/tmp/ccMR8LsA.s:147 .text.str_hash:0000000000000000 str_hash
.ARM.exidx.text.str_hash:0000000000000000 $d
/tmp/ccMR8LsA.s:185 .text.get_node_path_locked:0000000000000000 $t
/tmp/ccMR8LsA.s:189 .text.get_node_path_locked:0000000000000000 get_node_path_locked
.ARM.exidx.text.get_node_path_locked:0000000000000000 $d
/tmp/ccMR8LsA.s:292 .text.remove_int_to_null:0000000000000000 $t
/tmp/ccMR8LsA.s:296 .text.remove_int_to_null:0000000000000000 remove_int_to_null
.ARM.extab.text.remove_int_to_null:0000000000000000 $d
.ARM.exidx.text.remove_int_to_null:0000000000000000 $d
/tmp/ccMR8LsA.s:325 .text.remove_str_to_int:0000000000000000 $t
/tmp/ccMR8LsA.s:329 .text.remove_str_to_int:0000000000000000 remove_str_to_int
.ARM.exidx.text.remove_str_to_int:0000000000000000 $d
/tmp/ccMR8LsA.s:364 .text.check_caller_access_to_name:0000000000000000 $t
/tmp/ccMR8LsA.s:368 .text.check_caller_access_to_name:0000000000000000 check_caller_access_to_name
/tmp/ccMR8LsA.s:467 .text.check_caller_access_to_name:0000000000000064 $d
/tmp/ccMR8LsA.s:6830 .rodata.str1.1:0000000000000191 .LC1
/tmp/ccMR8LsA.s:6832 .rodata.str1.1:000000000000019d .LC2
/tmp/ccMR8LsA.s:6834 .rodata.str1.1:00000000000001ad .LC3
.ARM.exidx.text.check_caller_access_to_name:0000000000000000 $d
/tmp/ccMR8LsA.s:475 .text.fuse_reply:0000000000000000 $t
/tmp/ccMR8LsA.s:479 .text.fuse_reply:0000000000000000 fuse_reply
/tmp/ccMR8LsA.s:566 .text.fuse_reply:0000000000000050 $d
/tmp/ccMR8LsA.s:6836 .rodata.str1.1:00000000000001bc .LC4
.ARM.exidx.text.fuse_reply:0000000000000000 $d
/tmp/ccMR8LsA.s:574 .text.release_node_locked:0000000000000000 $t
/tmp/ccMR8LsA.s:578 .text.release_node_locked:0000000000000000 release_node_locked
/tmp/ccMR8LsA.s:687 .text.remove_node_from_parent_locked:0000000000000000 remove_node_from_parent_locked
/tmp/ccMR8LsA.s:675 .text.release_node_locked:0000000000000058 $d
/tmp/ccMR8LsA.s:6838 .rodata.str1.1:00000000000001d5 .LC5
.ARM.exidx.text.release_node_locked:0000000000000000 $d
/tmp/ccMR8LsA.s:683 .text.remove_node_from_parent_locked:0000000000000000 $t
.ARM.exidx.text.remove_node_from_parent_locked:0000000000000000 $d
/tmp/ccMR8LsA.s:748 .text.get_caller_has_rw_locked:0000000000000000 $t
/tmp/ccMR8LsA.s:752 .text.get_caller_has_rw_locked:0000000000000000 get_caller_has_rw_locked
.ARM.exidx.text.get_caller_has_rw_locked:0000000000000000 $d
/tmp/ccMR8LsA.s:809 .text.handle_statfs.isra.19:0000000000000000 $t
/tmp/ccMR8LsA.s:813 .text.handle_statfs.isra.19:0000000000000000 handle_statfs.isra.19
/tmp/ccMR8LsA.s:967 .text.handle_statfs.isra.19:00000000000000c8 $d
ARM GAS /tmp/ccMR8LsA.s page 195
.ARM.extab.text.handle_statfs.isra.19:0000000000000000 $d
.ARM.exidx.text.handle_statfs.isra.19:0000000000000000 $d
/tmp/ccMR8LsA.s:974 .text.handle_readdir.isra.21:0000000000000000 $t
/tmp/ccMR8LsA.s:978 .text.handle_readdir.isra.21:0000000000000000 handle_readdir.isra.21
/tmp/ccMR8LsA.s:1185 .text.handle_readdir.isra.21:00000000000000e8 $d
.ARM.extab.text.handle_readdir.isra.21:0000000000000000 $d
.ARM.exidx.text.handle_readdir.isra.21:0000000000000000 $d
/tmp/ccMR8LsA.s:1194 .text.touch.constprop.26:0000000000000000 $t
/tmp/ccMR8LsA.s:1198 .text.touch.constprop.26:0000000000000000 touch.constprop.26
/tmp/ccMR8LsA.s:1293 .text.touch.constprop.26:0000000000000048 $d
/tmp/ccMR8LsA.s:6840 .rodata.str1.1:00000000000001e5 .LC6
.ARM.exidx.text.touch.constprop.26:0000000000000000 $d
/tmp/ccMR8LsA.s:1301 .text.find_file_within.constprop.27:0000000000000000 $t
/tmp/ccMR8LsA.s:1305 .text.find_file_within.constprop.27:0000000000000000 find_file_within.constprop.27
/tmp/ccMR8LsA.s:1494 .text.find_file_within.constprop.27:00000000000000b8 $d
/tmp/ccMR8LsA.s:6842 .rodata.str1.1:00000000000001fd .LC7
.ARM.exidx.text.find_file_within.constprop.27:0000000000000000 $d
/tmp/ccMR8LsA.s:1502 .text.lookup_node_and_path_by_id_locked.constprop.28:0000000000000000 $t
/tmp/ccMR8LsA.s:1506 .text.lookup_node_and_path_by_id_locked.constprop.28:0000000000000000 lookup_node_and_path_by_id_locked.constprop.28
.ARM.exidx.text.lookup_node_and_path_by_id_locked.constprop.28:0000000000000000 $d
/tmp/ccMR8LsA.s:1563 .text.handle_rmdir.isra.16:0000000000000000 $t
/tmp/ccMR8LsA.s:1567 .text.handle_rmdir.isra.16:0000000000000000 handle_rmdir.isra.16
/tmp/ccMR8LsA.s:1704 .text.handle_rmdir.isra.16:00000000000000bc $d
.ARM.extab.text.handle_rmdir.isra.16:0000000000000000 $d
.ARM.exidx.text.handle_rmdir.isra.16:0000000000000000 $d
/tmp/ccMR8LsA.s:1711 .text.handle_unlink.isra.15:0000000000000000 $t
/tmp/ccMR8LsA.s:1715 .text.handle_unlink.isra.15:0000000000000000 handle_unlink.isra.15
/tmp/ccMR8LsA.s:1852 .text.handle_unlink.isra.15:00000000000000bc $d
.ARM.extab.text.handle_unlink.isra.15:0000000000000000 $d
.ARM.exidx.text.handle_unlink.isra.15:0000000000000000 $d
/tmp/ccMR8LsA.s:1859 .text.handle_open.isra.14:0000000000000000 $t
/tmp/ccMR8LsA.s:1863 .text.handle_open.isra.14:0000000000000000 handle_open.isra.14
/tmp/ccMR8LsA.s:2083 .text.handle_open.isra.14:00000000000000f4 $d
.ARM.extab.text.handle_open.isra.14:0000000000000000 $d
.ARM.exidx.text.handle_open.isra.14:0000000000000000 $d
/tmp/ccMR8LsA.s:2090 .text.handle_opendir.isra.10:0000000000000000 $t
/tmp/ccMR8LsA.s:2094 .text.handle_opendir.isra.10:0000000000000000 handle_opendir.isra.10
/tmp/ccMR8LsA.s:2258 .text.handle_opendir.isra.10:00000000000000cc $d
.ARM.extab.text.handle_opendir.isra.10:0000000000000000 $d
.ARM.exidx.text.handle_opendir.isra.10:0000000000000000 $d
/tmp/ccMR8LsA.s:2265 .text.fuse_reply_attr:0000000000000000 $t
/tmp/ccMR8LsA.s:2269 .text.fuse_reply_attr:0000000000000000 fuse_reply_attr
.ARM.exidx.text.fuse_reply_attr:0000000000000000 $d
/tmp/ccMR8LsA.s:2456 .text.handle_getattr.isra.5:0000000000000000 $t
/tmp/ccMR8LsA.s:2460 .text.handle_getattr.isra.5:0000000000000000 handle_getattr.isra.5
/tmp/ccMR8LsA.s:2573 .text.handle_getattr.isra.5:0000000000000090 $d
.ARM.extab.text.handle_getattr.isra.5:0000000000000000 $d
.ARM.exidx.text.handle_getattr.isra.5:0000000000000000 $d
/tmp/ccMR8LsA.s:2580 .text.handle_setattr.isra.13:0000000000000000 $t
/tmp/ccMR8LsA.s:2584 .text.handle_setattr.isra.13:0000000000000000 handle_setattr.isra.13
/tmp/ccMR8LsA.s:2780 .text.handle_setattr.isra.13:0000000000000100 $d
.ARM.extab.text.handle_setattr.isra.13:0000000000000000 $d
.ARM.exidx.text.handle_setattr.isra.13:0000000000000000 $d
/tmp/ccMR8LsA.s:2788 .text.handle_rename.isra.17:0000000000000000 $t
/tmp/ccMR8LsA.s:2792 .text.handle_rename.isra.17:0000000000000000 handle_rename.isra.17
/tmp/ccMR8LsA.s:3249 .text.handle_rename.isra.17:000000000000023c $d
.ARM.extab.text.handle_rename.isra.17:0000000000000000 $d
ARM GAS /tmp/ccMR8LsA.s page 196
.ARM.exidx.text.handle_rename.isra.17:0000000000000000 $d
/tmp/ccMR8LsA.s:3256 .text.create_node_locked:0000000000000000 $t
/tmp/ccMR8LsA.s:3261 .text.create_node_locked:0000000000000000 create_node_locked
/tmp/ccMR8LsA.s:3441 .text.create_node_locked:00000000000000be $d
/tmp/ccMR8LsA.s:3447 .text.create_node_locked:00000000000000c4 $t
/tmp/ccMR8LsA.s:3740 .text.create_node_locked:0000000000000210 $d
/tmp/ccMR8LsA.s:6844 .rodata.str1.1:0000000000000214 .LC8
/tmp/ccMR8LsA.s:6846 .rodata.str1.1:000000000000021c .LC9
/tmp/ccMR8LsA.s:6848 .rodata.str1.1:0000000000000221 .LC10
/tmp/ccMR8LsA.s:6850 .rodata.str1.1:000000000000022a .LC11
/tmp/ccMR8LsA.s:6852 .rodata.str1.1:0000000000000231 .LC12
/tmp/ccMR8LsA.s:6854 .rodata.str1.1:0000000000000238 .LC13
/tmp/ccMR8LsA.s:6856 .rodata.str1.1:000000000000023e .LC14
/tmp/ccMR8LsA.s:6858 .rodata.str1.1:000000000000024c .LC15
/tmp/ccMR8LsA.s:6860 .rodata.str1.1:0000000000000255 .LC16
/tmp/ccMR8LsA.s:6862 .rodata.str1.1:000000000000025f .LC17
/tmp/ccMR8LsA.s:6864 .rodata.str1.1:0000000000000264 .LC18
/tmp/ccMR8LsA.s:6866 .rodata.str1.1:0000000000000268 .LC19
.ARM.exidx.text.create_node_locked:0000000000000000 $d
/tmp/ccMR8LsA.s:3759 .text.fuse_reply_entry:0000000000000000 $t
/tmp/ccMR8LsA.s:3763 .text.fuse_reply_entry:0000000000000000 fuse_reply_entry
.ARM.extab.text.fuse_reply_entry:0000000000000000 $d
.ARM.exidx.text.fuse_reply_entry:0000000000000000 $d
/tmp/ccMR8LsA.s:4024 .text.handle_lookup.isra.22:0000000000000000 $t
/tmp/ccMR8LsA.s:4028 .text.handle_lookup.isra.22:0000000000000000 handle_lookup.isra.22
/tmp/ccMR8LsA.s:4156 .text.handle_lookup.isra.22:00000000000000b8 $d
.ARM.extab.text.handle_lookup.isra.22:0000000000000000 $d
.ARM.exidx.text.handle_lookup.isra.22:0000000000000000 $d
/tmp/ccMR8LsA.s:4163 .text.handle_mknod.isra.23:0000000000000000 $t
/tmp/ccMR8LsA.s:4167 .text.handle_mknod.isra.23:0000000000000000 handle_mknod.isra.23
/tmp/ccMR8LsA.s:4329 .text.handle_mknod.isra.23:00000000000000e4 $d
.ARM.extab.text.handle_mknod.isra.23:0000000000000000 $d
.ARM.exidx.text.handle_mknod.isra.23:0000000000000000 $d
/tmp/ccMR8LsA.s:4336 .text.handle_mkdir.isra.24:0000000000000000 $t
/tmp/ccMR8LsA.s:4340 .text.handle_mkdir.isra.24:0000000000000000 handle_mkdir.isra.24
/tmp/ccMR8LsA.s:4612 .text.handle_mkdir.isra.24:0000000000000188 $d
/tmp/ccMR8LsA.s:6868 .rodata.str1.1:000000000000026d .LC20
/tmp/ccMR8LsA.s:6870 .rodata.str1.1:0000000000000279 .LC21
.ARM.extab.text.handle_mkdir.isra.24:0000000000000000 $d
.ARM.exidx.text.handle_mkdir.isra.24:0000000000000000 $d
/tmp/ccMR8LsA.s:4626 .text.handle_fuse_requests:0000000000000000 $t
/tmp/ccMR8LsA.s:4630 .text.handle_fuse_requests:0000000000000000 handle_fuse_requests
/tmp/ccMR8LsA.s:4778 .text.handle_fuse_requests:0000000000000096 $d
/tmp/ccMR8LsA.s:4811 .text.handle_fuse_requests:00000000000000d0 $t
/tmp/ccMR8LsA.s:5281 .text.handle_fuse_requests:00000000000002a8 $d
/tmp/ccMR8LsA.s:6872 .rodata.str1.1:0000000000000292 .LC22
/tmp/ccMR8LsA.s:6876 .rodata.str1.1:00000000000002d8 .LC24
/tmp/ccMR8LsA.s:6874 .rodata.str1.1:00000000000002b7 .LC23
.ARM.extab.text.handle_fuse_requests:0000000000000000 $d
.ARM.exidx.text.handle_fuse_requests:0000000000000000 $d
/tmp/ccMR8LsA.s:5297 .text.run:0000000000000000 $t
/tmp/ccMR8LsA.s:5301 .text.run:0000000000000000 run
/tmp/ccMR8LsA.s:6360 .text.run:0000000000000534 $d
/tmp/ccMR8LsA.s:6878 .rodata.str1.1:0000000000000305 .LC25
/tmp/ccMR8LsA.s:6880 .rodata.str1.1:000000000000030f .LC26
/tmp/ccMR8LsA.s:6882 .rodata.str1.1:000000000000032c .LC27
/tmp/ccMR8LsA.s:6885 .rodata.str1.1:0000000000000378 .LC28
ARM GAS /tmp/ccMR8LsA.s page 197
/tmp/ccMR8LsA.s:6887 .rodata.str1.1:000000000000037d .LC29
/tmp/ccMR8LsA.s:6889 .rodata.str1.1:000000000000039f .LC30
/tmp/ccMR8LsA.s:6891 .rodata.str1.1:00000000000003b5 .LC31
/tmp/ccMR8LsA.s:6893 .rodata.str1.1:00000000000003c8 .LC32
/tmp/ccMR8LsA.s:6895 .rodata.str1.1:00000000000003db .LC33
/tmp/ccMR8LsA.s:6897 .rodata.str1.1:00000000000003e2 .LC34
/tmp/ccMR8LsA.s:6899 .rodata.str1.1:00000000000003f1 .LC35
/tmp/ccMR8LsA.s:6409 .text.start_handler:0000000000000000 start_handler
/tmp/ccMR8LsA.s:6901 .rodata.str1.1:0000000000000416 .LC36
/tmp/ccMR8LsA.s:6903 .rodata.str1.1:000000000000043c .LC37
/tmp/ccMR8LsA.s:6905 .rodata.str1.1:0000000000000455 .LC38
/tmp/ccMR8LsA.s:6907 .rodata.str1.1:0000000000000470 .LC39
/tmp/ccMR8LsA.s:6909 .rodata.str1.1:0000000000000491 .LC40
/tmp/ccMR8LsA.s:6911 .rodata.str1.1:00000000000004af .LC41
/tmp/ccMR8LsA.s:6913 .rodata.str1.1:00000000000004b1 .LC42
/tmp/ccMR8LsA.s:6919 .rodata.str1.1:00000000000004e9 .LC45
/tmp/ccMR8LsA.s:6917 .rodata.str1.1:00000000000004e7 .LC44
/tmp/ccMR8LsA.s:6915 .rodata.str1.1:00000000000004d2 .LC43
/tmp/ccMR8LsA.s:6921 .rodata.str1.1:0000000000000507 .LC46
/tmp/ccMR8LsA.s:6923 .rodata.str1.1:0000000000000529 .LC47
.ARM.extab.text.run:0000000000000000 $d
.ARM.exidx.text.run:0000000000000000 $d
/tmp/ccMR8LsA.s:6405 .text.start_handler:0000000000000000 $t
.ARM.extab.text.start_handler:0000000000000000 $d
.ARM.exidx.text.start_handler:0000000000000000 $d
/tmp/ccMR8LsA.s:6431 .text.sdcard_main:0000000000000000 $t
/tmp/ccMR8LsA.s:6436 .text.sdcard_main:0000000000000000 sdcard_main
/tmp/ccMR8LsA.s:6498 .text.sdcard_main:0000000000000032 $d
/tmp/ccMR8LsA.s:6518 .text.sdcard_main:0000000000000046 $t
/tmp/ccMR8LsA.s:6796 .text.sdcard_main:00000000000001bc $d
/tmp/ccMR8LsA.s:6925 .rodata.str1.1:0000000000000541 .LC48
/tmp/ccMR8LsA.s:6927 .rodata.str1.1:000000000000054d .LC49
/tmp/ccMR8LsA.s:6929 .rodata.str1.1:0000000000000561 .LC50
/tmp/ccMR8LsA.s:6931 .rodata.str1.1:000000000000057b .LC51
/tmp/ccMR8LsA.s:6933 .rodata.str1.1:0000000000000593 .LC52
/tmp/ccMR8LsA.s:6935 .rodata.str1.1:00000000000005b0 .LC53
/tmp/ccMR8LsA.s:6937 .rodata.str1.1:00000000000005d6 .LC54
/tmp/ccMR8LsA.s:6939 .rodata.str1.1:0000000000000601 .LC55
.ARM.exidx.text.sdcard_main:0000000000000000 $d
/tmp/ccMR8LsA.s:6813 .rodata.kGroups:0000000000000000 $d
/tmp/ccMR8LsA.s:6817 .rodata.kGroups:0000000000000000 kGroups
.debug_frame:0000000000000010 $d
UNDEFINED SYMBOLS
__aeabi_unwind_cpp_pr0
fprintf
_GLOBAL_OFFSET_TABLE_
__sF
__aeabi_unwind_cpp_pr1
strcasecmp
strlen
hashmapHash
memcpy
hashmapRemove
free
writev
__errno
ARM GAS /tmp/ccMR8LsA.s page 198
memset
multiuser_get_app_id
hashmapContainsKey
pthread_mutex_lock
pthread_mutex_unlock
statfs
__stack_chk_fail
__stack_chk_guard
rewinddir
readdir
__memcpy_chk
open
strerror
close
access
opendir
closedir
rmdir
unlink
malloc
__open_2
lstat
truncate
utimensat
strcmp
rename
realloc
calloc
strtoul
__strlen_chk
hashmapGet
multiuser_get_uid
mknod
mkdir
snprintf
read
pread64
pwrite64
fdatasync
fsync
write
umount2
mount
setgroups
setgid
setuid
pthread_mutex_init
strdup
hashmapCreate
getuid
getgid
fs_prepare_dir
umask
fputs
pthread_create
inotify_init
inotify_add_watch
ARM GAS /tmp/ccMR8LsA.s page 199
sleep
hashmapForEach
fopen
sscanf
hashmapPut
strtok
fgets
fclose
exit
getopt
setrlimit
optarg
optind
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment