Searched defs:fn (Results 1 - 25 of 30) sorted by relevance

12

/system/core/libcutils/
H A Dload_file.c22 void *load_file(const char *fn, unsigned *_sz) argument
29 fd = open(fn, O_RDONLY);
H A Dcanned_fs_config.c45 int load_canned_fs_config(const char* fn) { argument
49 f = fopen(fn, "r");
51 fprintf(stderr, "failed to open %s: %s\n", fn, strerror(errno));
H A Dconfig_utils.c312 void config_load_file(cnode *root, const char *fn) argument
315 data = load_file(fn, 0);
/system/core/libmemunreachable/
H A DBinder.cpp38 std::function<ssize_t(size_t, uintptr_t*)> fn) {
39 if (fn == nullptr) {
48 ssize_t ret = fn(refs.size(), refs.data());
37 BinderReferencesToVector(allocator::vector<uintptr_t>& refs, std::function<ssize_t(size_t, uintptr_t*)> fn) argument
/system/security/keystore/
H A Dkeystore_aidl_hidl_marshalling_utils.h28 inline auto nullable(Fn fn, const android::Parcel& in, Args&&... args)
29 -> NullOr<decltype(fn(in, std::forward<Args>(args)...))> {
34 return fn(in, std::forward<Args>(args)...);
37 inline android::status_t nullable(Fn fn, const NullOr<Arg>& arg, android::Parcel* out) { argument
44 return fn(arg.value(), out);
47 inline android::status_t nullable(Fn fn, Arg&& arg, android::Parcel* out) { argument
51 return fn(std::forward<Arg>(arg), out);
/system/core/adb/
H A Dadb_utils.h76 void PopAll(Fn fn) { argument
87 fn(t);
H A Dfdevent.cpp400 void fdevent_run_on_main_thread(std::function<void()> fn) { argument
402 run_queue.push_back(std::move(fn));
/system/netd/libnetdutils/include/netdutils/
H A DMisc.h40 Cleanup(FnT fn) : mFn(fn) {} argument
55 Cleanup<FnT> makeCleanup(FnT fn) { argument
56 return Cleanup<FnT>(fn);
/system/netd/libnetdutils/
H A DSyscalls.cpp27 // Retry syscall fn as long as it returns -1 with errno == EINTR
29 typename std::result_of<FnT(Params...)>::type syscallRetry(FnT fn, Params&&... params) { argument
30 auto rv = fn(std::forward<Params>(params)...);
32 rv = fn(std::forward<Params>(params)...);
/system/nfc/halimpl/bcm2079x/adaptation/
H A DStartupConfig.cpp84 static const char fn[] = "StartupConfig::append"; local
86 ALOGE("%s: exceed max length", fn);
90 ALOGD("%s: try append %zu bytes", fn,
96 ALOGD("%s: new size %u bytes", fn, mBuffer[0]);
H A DNonVolatileStore.cpp67 std::string fn = get_storage_location(); local
70 fn.append(filename_prefix);
71 if (fn.length() > 200) {
75 snprintf(filename, sizeof(filename), "%s%u", fn.c_str(), block);
119 std::string fn = get_storage_location(); local
123 fn.append(filename_prefix);
124 if (fn.length() > 200) {
128 snprintf(filename, sizeof(filename), "%s%u", fn.c_str(), block);
185 std::string fn = get_storage_location(); local
194 fn
225 std::string fn = get_storage_location(); local
[all...]
/system/netd/server/
H A DNFLogListenerTest.cpp59 MOCK_METHOD2(subscribe, netdutils::Status(uint16_t type, const DispatchFn& fn));
81 void subscribe(uint16_t type, NFLogListenerInterface::DispatchFn fn) { argument
84 mListener->subscribe(type, fn);
H A DNetlinkListener.cpp87 Status NetlinkListener::subscribe(uint16_t type, const DispatchFn& fn) { argument
89 mDispatchMap[type] = fn;
104 const auto& fn = findWithDefault(mDispatchMap, nlmsg.nlmsg_type, kDefaultDispatchFn);
105 fn(nlmsg, buf);
H A DNFLogListener.cpp154 const auto& fn = findWithDefault(mDispatchMap, be16toh(nfmsg.res_id), kDefaultDispatchFn);
155 fn(nlmsg, nfmsg, drop(msg, sizeof(nfmsg)));
178 Status NFLogListener::subscribe(uint16_t nfLogGroup, const DispatchFn& fn) { argument
180 // Install fn into the dispatch map BEFORE requesting delivery of messages
183 mDispatchMap[nfLogGroup] = fn;
H A DInterfaceController.cpp109 // Run @fn on each interface as well as 'default' in the path @dirname.
111 std::function<void(const std::string& path, const std::string& iface)> fn) {
113 fn(dirname, "default");
127 fn(dirname, ent->d_name);
133 auto fn = [basename, value](const std::string& path, const std::string& iface) { local
136 forEachInterface(dirname, fn);
159 auto fn = [min, max](const std::string& prefix, const std::string& iface) { local
170 forEachInterface(ipv6_proc_path, fn);
110 forEachInterface(const std::string& dirname, std::function<void(const std::string& path, const std::string& iface)> fn) argument
/system/core/libdiskconfig/
H A Ddiskconfig.c139 load_diskconfig(const char *fn, char *path_override) argument
160 config_load_file(root, fn);
162 ALOGE("Could not read config file %s", fn);
167 ALOGE("Could not find device section in config file '%s'", fn);
/system/core/liblog/tests/
H A Dbenchmark.h38 Benchmark(const char* name, void (*fn)(int)) : name_(strdup(name)), fn_(fn) { argument
61 BenchmarkWantsArgBase(const char* name, void (*fn)(int, T)) : Benchmark(name) { argument
62 fn_arg_ = fn;
78 BenchmarkWithArg(const char* name, void (*fn)(int, T), const char* arg_name, T arg) : argument
79 BenchmarkWantsArg<T>(name, fn), arg_(arg) {
100 BenchmarkWantsArg<T>(const char* name, void (*fn)(int, T)) : argument
101 BenchmarkWantsArgBase<T>(name, fn) { }
107 BenchmarkWantsArg<int>(const char* name, void (*fn)(int, int)) : argument
108 BenchmarkWantsArgBase<int>(name, fn) { }
118 BenchmarkFactory(const char* name, void (*fn)(int)) argument
123 BenchmarkFactory(const char* name, void (*fn)(int, T)) argument
[all...]
/system/core/toolbox/upstream-netbsd/usr.bin/grep/
H A Dutil.c188 procfile(const char *fn) argument
199 if (strcmp(fn, "-") == 0) {
200 fn = label != NULL ? label : getstr(1);
203 if (!stat(fn, &sb)) {
212 f = grep_open(fn);
216 warn("%s", fn);
222 ln.file = grep_malloc(strlen(fn) + 1);
223 strcpy(ln.file, fn);
265 printf("%s%c", fn, line_sep);
267 printf("%s%c", fn, line_se
[all...]
/system/extras/libfec/include/fec/
H A Dio.h126 explicit io(const std::string& fn, int mode = O_RDONLY, int flags = 0, argument
128 open(fn, mode, flags, roots);
135 bool open(const std::string& fn, int mode = O_RDONLY, int flags = 0, argument
139 int rc = fec_open(&fh, fn.c_str(), mode, flags, roots);
/system/extras/showmap/
H A Dshowmap.cpp175 char fn[128]; local
182 snprintf(fn, sizeof(fn), "/proc/%d/smaps", pid);
183 fp = fopen(fn, "r");
/system/extras/sound/
H A Dplaywav.c153 int wav_play(const char *fn) argument
158 fd = open(fn, O_RDONLY);
160 fprintf(stderr, "playwav: cannot open '%s'\n", fn);
174 fprintf(stderr, "playwav: '%s' is not a riff/wave file\n", fn);
179 fprintf(stderr, "playwav: '%s' is not pcm format\n", fn);
183 fprintf(stderr, "playwav: '%s' is not 16bit per sample\n", fn);
193 int wav_rec(const char *fn, unsigned channels, unsigned rate) argument
217 fd = open(fn, O_CREAT | O_RDWR, 0666);
293 unlink(fn);
297 int mp3_play(const char *fn) argument
333 const char *fn = 0; local
[all...]
/system/core/init/
H A Dutil.cpp240 const std::function<void(const std::string&, const std::string&, bool)>& fn) {
247 fn(pieces[0], pieces[1], in_qemu);
239 import_kernel_cmdline(bool in_qemu, const std::function<void(const std::string&, const std::string&, bool)>& fn) argument
/system/core/liblog/
H A Dpmsg_reader.c274 __android_log_pmsg_file_read_fn fn, void* arg) {
299 if (!fn) {
582 r = (*fn)(names->id, names->prio, names->name, buf, len, arg);
273 __android_log_pmsg_file_read(log_id_t logId, char prio, const char* prefix, __android_log_pmsg_file_read_fn fn, void* arg) argument
/system/core/libutils/
H A DThreads.cpp213 static bool doCreateThread(android_thread_func_t fn, void* arg, android_thread_id_t *id)
219 pDetails->func = fn;
249 int androidCreateRawThreadEtc(android_thread_func_t fn,
256 return doCreateThread( fn, userData, threadId);
269 int androidCreateThread(android_thread_func_t fn, void* arg) argument
271 return createThreadEtc(fn, arg);
274 int androidCreateThreadGetID(android_thread_func_t fn, void *arg, android_thread_id_t *id) argument
276 return createThreadEtc(fn, arg, "android:unnamed_thread",
/system/tools/aidl/
H A Daidl.cpp78 string fn; local
82 if (!IoDelegate::GetAbsolutePath(filename, &fn)) {
102 len = fn.length();
106 p = fn.c_str() + (len - expected.length());

Completed in 341 milliseconds

12