/device/google/cuttlefish/common/libs/utils/ |
D | files.cpp | 35 bool FileExists(const std::string& path) { in FileExists() argument 37 return stat(path.c_str(), &st) == 0; in FileExists() 40 bool FileHasContent(const std::string& path) { in FileHasContent() argument 41 return FileSize(path) > 0; in FileHasContent() 44 bool DirectoryExists(const std::string& path) { in DirectoryExists() argument 46 if (stat(path.c_str(), &st) == -1) { in DirectoryExists() 55 bool IsDirectoryEmpty(const std::string& path) { in IsDirectoryEmpty() argument 56 auto direc = ::opendir(path.c_str()); in IsDirectoryEmpty() 58 LOG(ERROR) << "IsDirectoryEmpty test failed with " << path in IsDirectoryEmpty() 68 LOG(ERROR) << "IsDirectoryEmpty test failed with " << path in IsDirectoryEmpty() [all …]
|
D | files.h | 24 bool FileExists(const std::string& path); 25 bool FileHasContent(const std::string& path); 26 bool DirectoryExists(const std::string& path); 27 bool IsDirectoryEmpty(const std::string& path); 28 off_t FileSize(const std::string& path); 32 std::chrono::system_clock::time_point FileModificationTime(const std::string& path); 37 std::string AbsolutePath(const std::string& path); 45 FileSizes SparseFileSizes(const std::string& path);
|
/device/linaro/dragonboard/qcom/tqftpserv/ |
D | translate.c | 74 char path[PATH_MAX]; in translate_readonly() local 115 strlen(file) + 1 > sizeof(path)) in translate_readonly() 118 strcpy(path, FIRMWARE_BASE); in translate_readonly() 119 strcat(path, dirname(firmware_value)); in translate_readonly() 120 strcat(path, "/"); in translate_readonly() 121 strcat(path, file); in translate_readonly() 123 fd = open(path, O_RDONLY); in translate_readonly() 128 warn("failed to open %s", path); in translate_readonly() 180 int translate_open(const char *path, int flags) in translate_open() argument 182 if (!strncmp(path, READONLY_PATH, strlen(READONLY_PATH))) in translate_open() [all …]
|
/device/google/contexthub/firmware/os/core/ |
D | syscall.c | 33 bool syscallAddTable(uint32_t path, uint32_t level, struct SyscallTable *table) in syscallAddTable() argument 39 uint32_t idx = path >> (32 - *bits); in syscallAddTable() 40 path <<= *bits++; in syscallAddTable() 57 static SyscallFunc* syscallFindHandlerLoc(uint32_t path) in syscallFindHandlerLoc() argument 63 uint32_t idx = path >> (32 - *bits); in syscallFindHandlerLoc() 65 path <<= *bits++; in syscallFindHandlerLoc() 79 bool syscallAddFunc(uint32_t path, SyscallFunc func) in syscallAddFunc() argument 81 SyscallFunc *f = syscallFindHandlerLoc(path); in syscallAddFunc() 90 SyscallFunc syscallGetHandler(uint32_t path) in syscallGetHandler() argument 92 SyscallFunc *f = syscallFindHandlerLoc(path); in syscallGetHandler()
|
/device/generic/goldfish-opengl/fuchsia/ |
D | releasepackage.py | 23 dir_path = os.path.dirname(os.path.realpath(__file__)) 27 fuchsia_root = os.path.abspath(os.path.join(dir_path, "../../../")) 28 fx_path = os.path.join(fuchsia_root, "scripts/fx") 31 release_dir = os.path.abspath(args.release_dir) 33 release_dir = os.path.join(fuchsia_root, "out/default") 35 if not os.path.exists(release_dir): 92 full_name = os.path.join(package_dir, file_name) 94 source_file_name = os.path.join(release_dir, target_name) 106 debug_source_file_name = os.path.join(release_dir, debug_target_name) 114 debug_output_dir = os.path.join(debug_dir, build_id[:2]) [all …]
|
/device/linaro/dragonboard/qcom/rmtfs/ |
D | sharedmem.c | 59 char path[32]; in rmtfs_mem_open_rfsa() local 63 sprintf(path, "/dev/qcom_rmtfs_mem%d", client_id); in rmtfs_mem_open_rfsa() 65 fd = open(path, O_RDWR); in rmtfs_mem_open_rfsa() 68 fprintf(stderr, "failed to open %s: %s\n", path, strerror(errno)); in rmtfs_mem_open_rfsa() 76 fprintf(stderr, "failed to stat %s: %s\n", path, strerror(errno)); in rmtfs_mem_open_rfsa() 97 fprintf(stderr, "failed to parse phys_addr of %s\n", path); in rmtfs_mem_open_rfsa() 104 fprintf(stderr, "failed to parse size of %s\n", path); in rmtfs_mem_open_rfsa() 129 char path[32]; in rmtfs_mem_open_uio() local 133 snprintf(path, sizeof(path), "/dev/qcom_rmtfs_uio%d", client_id); in rmtfs_mem_open_uio() 135 fd = open(path, O_RDWR); in rmtfs_mem_open_uio() [all …]
|
D | storage.c | 19 const char *path; member 75 struct rmtfd *storage_open(unsigned node, const char *path) in storage_open() argument 87 for (part = partition_table; part->path; part++) { in storage_open() 88 if (strcmp(part->path, path) == 0) in storage_open() 92 fprintf(stderr, "[RMTFS storage] request for unknown partition '%s', rejecting\n", path); in storage_open() 128 fspath, part->path, strerror(saved_errno)); in storage_open() 139 fspath, part->path, strerror(saved_errno)); in storage_open()
|
/device/generic/goldfish/wifi/createns/ |
D | createns.cpp | 99 std::string path = getNamespacePath(name); in writeNamespacePid() local 100 if (path.empty()) { in writeNamespacePid() 103 path += ".pid"; in writeNamespacePid() 105 Fd fd(::open(path.c_str(), in writeNamespacePid() 109 ALOGE("Unable to create file '%s': %s", path.c_str(), strerror(errno)); in writeNamespacePid() 125 removeFile(path.c_str()); in writeNamespacePid() 138 path.c_str(), strerror(errno)); in writeNamespacePid() 139 removeFile(path.c_str()); in writeNamespacePid() 237 std::string path = getNamespacePath(argv[1]); in main() local 238 if (path.empty()) { in main() [all …]
|
/device/google/cuttlefish/host/frontend/gcastv2/https/ |
D | HTTPServer.cpp | 99 auto path = request.getPath(); in handleSingleRequest() local 103 auto separatorPos = path.find('?'); in handleSingleRequest() 105 query = path.substr(separatorPos); in handleSingleRequest() 106 path.erase(separatorPos); in handleSingleRequest() 109 if (path == "/") { path = "/index.html"; } in handleSingleRequest() 116 auto it = mStaticFiles.find(path); in handleSingleRequest() 133 auto it = mWebSocketHandlerFactories.find(path); in handleSingleRequest() 162 << httpResultCode << " \"" << path << "\""; in handleSingleRequest() 208 const char *at, const char *path, std::optional<std::string> mimeType) { in addStaticFile() argument 210 mStaticFiles[at] = { path, mimeType }; in addStaticFile() [all …]
|
/device/google/cuttlefish/host/commands/assemble_cvd/ |
D | boot_image_unpacker.cc | 36 const std::string& path) { in ExtractFile() argument 37 auto dest = SharedFD::Open(path.c_str(), O_CREAT | O_RDWR, 0755); in ExtractFile() 39 LOG(ERROR) << "Unable to open " << path; in ExtractFile() 111 bool BootImageUnpacker::ExtractKernelImage(const std::string& path) const { in ExtractKernelImage() 114 path); in ExtractKernelImage() 116 bool BootImageUnpacker::ExtractRamdiskImage(const std::string& path) const { in ExtractRamdiskImage() 119 path); in ExtractRamdiskImage() 121 bool BootImageUnpacker::ExtractVendorRamdiskImage(const std::string& path) const { in ExtractVendorRamdiskImage() 124 vendor_ramdisk_image_size_, path); in ExtractVendorRamdiskImage()
|
D | flags.cc | 715 bool CleanPriorFiles(const std::string& path, const std::set<std::string>& preserving) { in CleanPriorFiles() argument 716 if (preserving.count(cpp_basename(path))) { in CleanPriorFiles() 717 LOG(DEBUG) << "Preserving: " << path; in CleanPriorFiles() 721 if (lstat(path.c_str(), &statbuf) < 0) { in CleanPriorFiles() 726 LOG(ERROR) << "Could not stat \"" << path << "\": " << strerror(error_num); in CleanPriorFiles() 731 LOG(DEBUG) << "Deleting: " << path; in CleanPriorFiles() 732 if (unlink(path.c_str()) < 0) { in CleanPriorFiles() 734 LOG(ERROR) << "Could not unlink \"" << path << "\", error was " << strerror(error_num); in CleanPriorFiles() 739 std::unique_ptr<DIR, int(*)(DIR*)> dir(opendir(path.c_str()), closedir); in CleanPriorFiles() 742 LOG(ERROR) << "Could not clean \"" << path << "\": error was " << strerror(error_num); in CleanPriorFiles() [all …]
|
/device/generic/goldfish/tools/ |
D | mk_combined_img.py | 42 param = os.path.expandvars(param) 52 sizeByMb = str((1024 * 1024 - 1 + os.path.getsize(line[0])) / 1024 / 1024) 129 output_filename = os.path.expandvars(args.output) 137 if not os.path.exists(config_filename): 147 if os.path.exists(output_filename) and len(partitions) == 2: 157 … prebuilt_gpt_dir = os.path.dirname(os.path.abspath( __file__ )) + "/prebuilt/gpt/" + gptprefix 160 if os.path.exists(gpt_head) and os.path.exists(gpt_tail): 179 offset = os.path.getsize(output_filename) 188 offset = os.path.getsize(output_filename) 194 offset = os.path.getsize(output_filename) // 1024 // 1024
|
/device/linaro/hikey/power/ |
D | power_hikey.c | 97 char path[PROPERTY_VALUE_MAX]; member 106 static int sysfs_write(const char *path, char *s) in sysfs_write() argument 110 int fd = open(path, O_WRONLY); in sysfs_write() 114 ALOGE("Error opening %s: %s\n", path, buf); in sysfs_write() 121 ALOGE("Error writing to %s: %s\n", path, buf); in sysfs_write() 128 static int sysfs_read(const char *path, char *s, int slen) in sysfs_read() argument 131 int fd = open(path, O_RDONLY); in sysfs_read() 134 ALOGE("Error opening %s\n", path); in sysfs_read() 140 ALOGE("Error reading %s\n", path); in sysfs_read() 364 sysfs_write(hikey_cpufreq_clusters[i].path, hikey_cpufreq_clusters[i].low_power_max); in power_set_interactive() [all …]
|
/device/google/cuttlefish/tools/ |
D | make_manifest.sh | 86 path=$2 88 if [ "${path}" != "" ]; then 89 filename=$(basename $path) 90 filetype=`file -b --mime-type "${path}"` 98 if [ ! "${path}" -ef "${FLAGS_tftpdir}/${filename}" ]; then 99 cp "${path}" "${FLAGS_tftpdir}/"
|
D | tombstone_to_line.py | 46 if object_path[0] == os.path.sep: 49 os.path.join(args.symbols, object_path), address] 101 def process_file(path, args): argument 102 with open(path + args.suffix, 'w') as out_file: 103 with open(path, 'r') as in_file: 112 default=os.path.join( 136 default=os.path.join(
|
/device/google/coral/vibrator/tests/ |
D | test-hwapi.cpp | 46 auto name = std::filesystem::path(n); in SetUp() 47 auto path = std::filesystem::path(mFilesDir.path) / name; in SetUp() local 48 std::ofstream touch{path}; in SetUp() 49 setenv(name.c_str(), path.c_str(), true); in SetUp() 50 mFileMap[name] = path; in SetUp() 55 auto name = std::filesystem::path(n); in SetUp() 56 auto path = std::filesystem::path(mEmptyDir.path) / name; in SetUp() local 57 setenv(name.c_str(), path.c_str(), true); in SetUp() 296 std::string value = TemporaryFile().path; in TEST_P() 306 std::string value = TemporaryFile().path; in TEST_P()
|
/device/google/fuchsia/bioniccompat/include/sys/ |
D | xattr.h | 34 inline ssize_t getxattr(const char* path __UNUSED, const char* name __UNUSED, void* value __UNUSED,… in getxattr() 39 inline ssize_t listxattr(const char *path __UNUSED, char *list __UNUSED, size_t size __UNUSED) { in listxattr() 44 inline int setxattr(const char *path __UNUSED, const char *name __UNUSED, const void *value __UNUSE… in setxattr() 49 inline int removexattr(const char *path __UNUSED, const char *name __UNUSED) { in removexattr()
|
/device/google/fuchsia/bioniccompat/include/ |
D | basename.h | 25 inline const char* __gnu_basename(const char* path) { in __gnu_basename() argument 26 const char* last_slash = strrchr(path, '/'); in __gnu_basename() 27 return (last_slash != NULL) ? last_slash + 1 : path; in __gnu_basename()
|
/device/google/wahoo/powerstats/ |
D | EaselStateResidencyDataProvider.cpp | 36 const std::string path = "/sys/devices/virtual/misc/mnh_sm/state"; in getResults() local 49 std::ifstream inFile(path, std::ifstream::in); in getResults() 51 PLOG(ERROR) << __func__ << ":Failed to open file " << path; in getResults() 57 PLOG(ERROR) << __func__ << ":Failed to parse " << path; in getResults()
|
/device/google/coral/vibrator/ |
D | Hardware.cpp | 63 std::string path; in pathsFromEnv() local 65 while (paths >> path) { in pathsFromEnv() 66 ret[path].open(path); in pathsFromEnv() 160 auto &path = entry.first; in debug() local 164 dprintf(fd, " %s:\n", path.c_str()); in debug() 224 std::string path; in debug() local 229 fileFromEnv("CALIBRATION_FILEPATH", &stream, &path); in debug() 231 dprintf(fd, " %s:\n", path.c_str()); in debug()
|
/device/google/contexthub/util/common/ |
D | file.cpp | 30 File::File(const char *path, const char *mode) in File() argument 33 mInitCheck = setTo(path, mode); in File() 44 status_t File::setTo(const char *path, const char *mode) { in setTo() argument 61 mFd = open(path, modeval, filemode); in setTo()
|
/device/google/cuttlefish/host/commands/fetcher/ |
D | curl_wrapper.cc | 66 bool CurlWrapper::DownloadToFile(const std::string& url, const std::string& path) { in DownloadToFile() argument 67 return CurlWrapper::DownloadToFile(url, path, {}); in DownloadToFile() 70 bool CurlWrapper::DownloadToFile(const std::string& url, const std::string& path, in DownloadToFile() argument 72 LOG(INFO) << "Attempting to save \"" << url << "\" to \"" << path << "\""; in DownloadToFile() 85 FILE* file = fopen(path.c_str(), "w"); in DownloadToFile() 87 LOG(ERROR) << "could not open file " << path; in DownloadToFile()
|
D | build_api.h | 102 const std::string& path); 107 const std::string& path); 114 const std::string& path) { in ArtifactToFile() argument 115 return std::visit([this, &artifact, &path](auto&& arg) { in ArtifactToFile() 116 return ArtifactToFile(arg, artifact, path); in ArtifactToFile()
|
/device/google/contexthub/firmware/os/inc/ |
D | syscall.h | 72 bool syscallAddTable(uint32_t path, uint32_t level, struct SyscallTable *table); 75 bool syscallAddFunc(uint32_t path, SyscallFunc func); 77 SyscallFunc syscallGetHandler(uint32_t path); // NULL if none
|
/device/amlogic/yukawa/hal/lights/ |
D | lights.cpp | 105 int writeLedArray(const char* path, LightAddress const& addr, int color) { in writeLedArray() argument 106 int const fd = open(path, O_RDWR); in writeLedArray() 108 LOG(ERROR) << "COULD NOT OPEN ARRAY_LED_DEVICE " << path; in writeLedArray() 128 void writeLed(const char* path, int color) { in writeLed() argument 129 int fd = open(path, O_WRONLY); in writeLed() 131 LOG(ERROR) << "COULD NOT OPEN LED_DEVICE " << path; in writeLed()
|