Home
last modified time | relevance | path

Searched refs:st (Results 1 – 11 of 11) sorted by relevance

/bootable/recovery/minzip/
DDirUtil.c34 struct stat st; in getPathDirStatus() local
37 err = stat(path, &st); in getPathDirStatus()
41 if (S_ISDIR(st.st_mode)) { in getPathDirStatus()
185 struct stat st; in dirUnlinkHierarchy() local
191 if (lstat(path, &st) < 0) { in dirUnlinkHierarchy()
196 if (!S_ISDIR(st.st_mode)) { in dirUnlinkHierarchy()
242 struct stat st; in dirSetHierarchyPermissions() local
243 if (lstat(path, &st)) { in dirSetHierarchyPermissions()
248 if (S_ISLNK(st.st_mode)) { in dirSetHierarchyPermissions()
254 chmod(path, S_ISDIR(st.st_mode) ? dirMode : fileMode)) { in dirSetHierarchyPermissions()
[all …]
/bootable/recovery/applypatch/
Dimgdiff.c188 struct stat st; in ReadZip() local
189 if (stat(filename, &st) != 0) { in ReadZip()
194 unsigned char* img = malloc(st.st_size); in ReadZip()
196 if (fread(img, 1, st.st_size, f) != st.st_size) { in ReadZip()
206 for (i = st.st_size-20; i >= 0 && i > st.st_size - 65600; --i) { in ReadZip()
293 curr->len = st.st_size; in ReadZip()
304 while (pos < st.st_size) { in ReadZip()
352 curr->len = st.st_size - pos; in ReadZip()
378 struct stat st; in ReadImage() local
379 if (stat(filename, &st) != 0) { in ReadImage()
[all …]
Dfreecache.c106 struct stat st; in FindExpendableFiles() local
107 if (stat(path, &st) == 0 && S_ISREG(st.st_mode)) { in FindExpendableFiles()
Dbsdiff.c170 u_char *new,off_t newsize,off_t st,off_t en,off_t *pos) in search() argument
174 if(en-st<2) { in search()
175 x=matchlen(old+I[st],oldsize-I[st],new,newsize); in search()
179 *pos=I[st]; in search()
187 x=st+(en-st)/2; in search()
191 return search(I,old,oldsize,new,newsize,st,x,pos); in search()
Dapplypatch.c64 if (stat(filename, &file->st) != 0) { in LoadFileContents()
69 file->size = file->st.st_size; in LoadFileContents()
312 file->st.st_mode = 0644; in LoadPartitionContents()
313 file->st.st_uid = 0; in LoadPartitionContents()
314 file->st.st_gid = 0; in LoadPartitionContents()
346 if (chmod(filename, file->st.st_mode) != 0) { in SaveFileContents()
350 if (chown(filename, file->st.st_uid, file->st.st_gid) != 0) { in SaveFileContents()
1024 if (chmod(outname, source_to_use->st.st_mode) != 0) { in GenerateTarget()
1028 if (chown(outname, source_to_use->st.st_uid, in GenerateTarget()
1029 source_to_use->st.st_gid) != 0) { in GenerateTarget()
Dapplypatch.h34 struct stat st; member
/bootable/recovery/
Dadb_install.cpp100 struct stat st; in apply_from_adb() local
101 if (stat(ADB_SIDELOAD_FILENAME, &st) != 0) { in apply_from_adb()
Drecovery.cpp372 struct stat st; in copy_sideloaded_package() local
373 if (stat(SIDELOAD_TEMP_DIR, &st) != 0) { in copy_sideloaded_package()
377 if (!S_ISDIR(st.st_mode)) { in copy_sideloaded_package()
381 if ((st.st_mode & 0777) != 0700) { in copy_sideloaded_package()
382 LOGE("%s has perms %o\n", SIDELOAD_TEMP_DIR, st.st_mode); in copy_sideloaded_package()
385 if (st.st_uid != 0) { in copy_sideloaded_package()
386 LOGE("%s owned by %lu; not root\n", SIDELOAD_TEMP_DIR, st.st_uid); in copy_sideloaded_package()
/bootable/recovery/tools/ota/
Dcheck-lost+found.c60 struct stat st; in main() local
61 if (stat(kMarkerFile, &st)) { in main()
/bootable/recovery/updater/
Dinstall.c634 struct stat st; in FileGetPropFn() local
635 if (stat(filename, &st) < 0) { in FileGetPropFn()
643 if (st.st_size > MAX_FILE_GETPROP_SIZE) { in FileGetPropFn()
649 buffer = malloc(st.st_size+1); in FileGetPropFn()
651 ErrorAbort(state, "%s: failed to alloc %lld bytes", name, st.st_size+1); in FileGetPropFn()
662 if (fread(buffer, 1, st.st_size, f) != st.st_size) { in FileGetPropFn()
664 name, st.st_size+1, filename); in FileGetPropFn()
668 buffer[st.st_size] = '\0'; in FileGetPropFn()
/bootable/recovery/mtdutils/
Dmtdutils.c218 struct stat st; in mtd_mount_partition() local
219 rv = stat(mount_point, &st); in mtd_mount_partition()
223 mode_t new_mode = st.st_mode | S_IXUSR | S_IXGRP | S_IXOTH; in mtd_mount_partition()
224 if (new_mode != st.st_mode) { in mtd_mount_partition()