Searched refs:fd (Results 1 - 25 of 1007) sorted by relevance

1234567891011>>

/frameworks/base/native/android/
H A Dsharedmem.cpp28 size_t ASharedMemory_getSize(int fd) { argument
29 return ashmem_valid(fd) ? ashmem_get_size_region(fd) : 0;
32 int ASharedMemory_setProt(int fd, int prot) { argument
33 return ashmem_set_prot_region(fd, prot);
/frameworks/native/cmds/dumpstate/
H A DDumpstateService.cpp78 status_t DumpstateService::dump(int fd, const Vector<String16>&) { argument
79 dprintf(fd, "id: %d\n", ds_.id_);
80 dprintf(fd, "pid: %d\n", ds_.pid_);
81 dprintf(fd, "update_progress: %s\n", ds_.update_progress_ ? "true" : "false");
82 dprintf(fd, "update_progress_threshold: %d\n", ds_.update_progress_threshold_);
83 dprintf(fd, "last_updated_progress: %d\n", ds_.last_updated_progress_);
84 dprintf(fd, "progress:\n");
85 ds_.progress_->Dump(fd, " ");
86 dprintf(fd, "args: %s\n", ds_.args_.c_str());
87 dprintf(fd, "extra_option
[all...]
/frameworks/native/include/android/
H A Dsharedmem.h75 * \param fd file descriptor of the shared memory region
76 * \return size in bytes; 0 if fd is not a valid shared memory file descriptor.
78 size_t ASharedMemory_getSize(int fd);
92 * int fd = ASharedMemory_create("memory", 128);
95 * char *buffer = (char *) mmap(NULL, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
100 * ASharedMemory_setProt(fd, PROT_READ);
102 * // share fd with another process here and the other process can only map with PROT_READ.
104 * \param fd file descriptor of the shared memory region.
109 int ASharedMemory_setProt(int fd, int prot);
/frameworks/base/services/core/jni/
H A Dcom_android_server_UsbDeviceManager.cpp44 static void set_accessory_string(JNIEnv *env, int fd, int cmd, jobjectArray strArray, int index) argument
49 ioctl(fd, cmd, buffer);
61 int fd = open(DRIVER_NAME, O_RDWR); local
62 if (fd < 0) {
69 set_accessory_string(env, fd, ACCESSORY_GET_STRING_MANUFACTURER, strArray, 0);
70 set_accessory_string(env, fd, ACCESSORY_GET_STRING_MODEL, strArray, 1);
71 set_accessory_string(env, fd, ACCESSORY_GET_STRING_DESCRIPTION, strArray, 2);
72 set_accessory_string(env, fd, ACCESSORY_GET_STRING_VERSION, strArray, 3);
73 set_accessory_string(env, fd, ACCESSORY_GET_STRING_URI, strArray, 4);
74 set_accessory_string(env, fd, ACCESSORY_GET_STRING_SERIA
83 int fd = open(DRIVER_NAME, O_RDWR); local
99 int fd = open(DRIVER_NAME, O_RDWR); local
111 int fd = open(DRIVER_NAME, O_RDWR); local
[all...]
H A Dcom_android_server_PersistentDataBlockService.cpp35 uint64_t get_block_device_size(int fd) argument
40 ret = ioctl(fd, BLKGETSIZE64, &size);
48 int wipe_block_device(int fd) argument
52 uint64_t len = get_block_device_size(fd);
60 ret = ioctl(fd, BLKSECDISCARD, &range);
65 ret = ioctl(fd, BLKDISCARD, &range);
82 int fd = open(path.c_str(), O_RDONLY); local
84 if (fd < 0)
87 const uint64_t size = get_block_device_size(fd);
89 close(fd);
96 int fd = open(path.c_str(), O_WRONLY); local
[all...]
/frameworks/base/services/core/java/com/android/server/utils/
H A DPriorityDump.java34 public void dumpCritical(FileDescriptor fd, PrintWriter pw, String[] args) {
39 public void dumpNormal(FileDescriptor fd, PrintWriter pw, String[] args) {
45 protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
46 PriorityDump.dump(mPriorityDumper, fd, pw, args);
98 * <code>dumper.dumpHigh(fd, pw, {"arg1", "arg2", "arg3"}) </code>
104 public static void dump(PriorityDumper dumper, FileDescriptor fd, PrintWriter pw, argument
110 dumper.dumpCritical(fd, pw, getStrippedArgs(args));
114 dumper.dumpHigh(fd, pw, getStrippedArgs(args));
118 dumper.dumpNormal(fd, pw, getStrippedArgs(args));
123 dumper.dump(fd, p
147 dumpCritical(FileDescriptor fd, PrintWriter pw, String[] args) argument
154 dumpHigh(FileDescriptor fd, PrintWriter pw, String[] args) argument
161 dumpNormal(FileDescriptor fd, PrintWriter pw, String[] args) argument
173 dump(FileDescriptor fd, PrintWriter pw, String[] args) argument
[all...]
/frameworks/base/core/jni/
H A Dandroid_util_MemoryIntArray.cpp39 int fd = ashmem_create_region(nameStr, ashmemSize); local
42 if (fd < 0) {
47 int setProtResult = ashmem_set_prot_region(fd, PROT_READ | PROT_WRITE);
53 return fd;
56 static jlong android_util_MemoryIntArray_open(JNIEnv* env, jobject clazz, jint fd, argument
59 if (fd < 0) {
64 if (!ashmem_valid(fd)) {
69 int ashmemSize = ashmem_get_size_region(fd);
84 void* ashmemAddr = mmap(NULL, ashmemSize, protMode, MAP_SHARED, fd, 0);
91 int mmapedSize = ashmem_get_size_region(fd);
114 android_util_MemoryIntArray_close(JNIEnv* env, jobject clazz, jint fd, jlong ashmemAddr, jboolean owner) argument
149 android_util_MemoryIntArray_get(JNIEnv* env, jobject clazz, jint fd, jlong address, jint index) argument
171 android_util_MemoryIntArray_set(JNIEnv* env, jobject clazz, jint fd, jlong address, jint index, jint newValue) argument
193 android_util_MemoryIntArray_size(JNIEnv* env, jobject clazz, jint fd) argument
[all...]
H A Dandroid_os_MemoryFile.cpp49 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); local
50 void* result = mmap(NULL, length, prot, MAP_SHARED, fd, 0);
66 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); local
67 if (fd >= 0) {
69 close(fd);
77 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); local
78 if (unpinned && ashmem_pin_region(fd, 0, 0) == ASHMEM_WAS_PURGED) {
79 ashmem_unpin_region(fd, 0, 0);
87 ashmem_unpin_region(fd, 0, 0);
96 int fd local
113 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); local
122 int fd = jniGetFDFromFileDescriptor(env, fileDescriptor); local
[all...]
H A Dfd_utils.cpp47 static const char kFdPath[] = "/proc/self/fd";
123 FileDescriptorInfo* FileDescriptorInfo::CreateFromFd(int fd) { argument
127 if (TEMP_FAILURE_RETRY(fstat(fd, &f_stat)) == -1) {
128 PLOG(ERROR) << "Unable to stat fd " << fd;
136 if (!GetSocketName(fd, &socket_name)) {
142 << " (fd=" << fd << ")"; local
146 return new FileDescriptorInfo(fd);
165 const std::string fd_path = android::base::StringPrintf("/proc/self/fd/
268 FileDescriptorInfo(int fd) argument
278 FileDescriptorInfo(struct stat stat, const std::string& file_path, int fd, int open_flags, int fd_flags, int fs_flags, off_t offset) argument
292 GetSocketName(const int fd, std::string* result) argument
365 const int fd = ParseFd(e, dir_fd); local
404 const int fd = ParseFd(e, dir_fd); local
506 const int fd = (*it); local
525 const int fd = strtol(e->d_name, &end, 10); local
[all...]
/frameworks/base/core/tests/utiltests/jni/
H A Dandroid_util_MemoryIntArrayTest.cpp39 int fd = ashmem_create_region(nameStr, ashmemSize); local
42 if (fd < 0) {
46 int setProtResult = ashmem_set_prot_region(fd, PROT_READ | PROT_WRITE);
51 return fd;
55 __attribute__((unused)) jobject clazz, jint fd, jint size)
57 if (fd < 0) {
65 ioctl(fd, ASHMEM_SET_SIZE, size);
54 android_util_MemoryIntArrayTest_setAshmemSize(__attribute__((unused)) JNIEnv* env, __attribute__((unused)) jobject clazz, jint fd, jint size) argument
/frameworks/base/libs/androidfw/
H A DObbFile.cpp88 int fd; local
91 fd = ::open(filename, O_RDONLY);
92 if (fd < 0) {
96 success = readFrom(fd);
97 close(fd);
100 ALOGW("failed to read from %s (fd=%d)\n", filename, fd);
107 bool ObbFile::readFrom(int fd) argument
109 if (fd < 0) {
110 ALOGW("attempt to read from invalid fd\
117 parseObbFile(int fd) argument
228 int fd; local
245 writeTo(int fd) argument
313 int fd; local
330 removeFrom(int fd) argument
[all...]
/frameworks/base/core/java/android/net/
H A DLocalSocketImpl.java44 private FileDescriptor fd; field in class:LocalSocketImpl
45 /** whether fd is created internally */
62 FileDescriptor myFd = fd;
85 FileDescriptor myFd = fd;
103 FileDescriptor myFd = fd;
138 FileDescriptor myFd = fd;
152 FileDescriptor myFd = fd;
166 FileDescriptor myFd = fd;
193 private native int read_native(FileDescriptor fd) throws IOException; argument
195 FileDescriptor fd) throw
194 readba_native(byte[] b, int off, int len, FileDescriptor fd) argument
196 writeba_native(byte[] b, int off, int len, FileDescriptor fd) argument
198 write_native(int b, FileDescriptor fd) argument
200 connectLocal(FileDescriptor fd, String name, int namespace) argument
202 bindLocal(FileDescriptor fd, String name, int namespace) argument
204 getPeerCredentials_native( FileDescriptor fd) argument
221 LocalSocketImpl(FileDescriptor fd) argument
[all...]
/frameworks/base/core/java/com/android/internal/os/
H A DAppFuseMount.java32 final public ParcelFileDescriptor fd; field in class:AppFuseMount
37 * @param fd File descriptor pointing /dev/fuse and tagged with the mount point.
39 public AppFuseMount(int mountPointId, ParcelFileDescriptor fd) { argument
40 Preconditions.checkNotNull(fd);
42 this.fd = fd;
53 dest.writeParcelable(fd, flags);
/frameworks/av/media/libmediaplayerservice/
H A DActivityManager.cpp29 int fd = -1; local
35 fd = am->openContentUri(uri);
38 return fd;
/frameworks/base/core/java/android/app/backup/
H A DFullBackupDataOutput.java34 public FullBackupDataOutput(ParcelFileDescriptor fd, long quota) { argument
35 mData = new BackupDataOutput(fd.getFileDescriptor(), quota);
40 public FullBackupDataOutput(ParcelFileDescriptor fd) { argument
41 this(fd, -1);
H A DBackupDataOutput.java73 public BackupDataOutput(FileDescriptor fd) { argument
74 this(fd, -1);
79 public BackupDataOutput(FileDescriptor fd, long quota) { argument
80 if (fd == null) throw new NullPointerException();
82 mBackupWriter = ctor(fd);
84 throw new RuntimeException("Native initialization failed with fd=" + fd);
148 private native static long ctor(FileDescriptor fd); argument
/frameworks/native/services/surfaceflinger/tests/waitforvsync/
H A Dwaitforvsync.cpp33 int fd = open("/dev/graphics/fb0", O_RDWR); local
34 if (fd >= 0) {
37 int err = ioctl(fd, FBIO_WAITFORVSYNC, &crt);
43 close(fd);
/frameworks/base/core/java/android/view/textclassifier/
H A DSmartSelection.java40 SmartSelection(int fd) { argument
41 mCtx = nativeNew(fd);
81 public static String getLanguage(int fd) { argument
82 return nativeGetLanguage(fd);
88 public static int getVersion(int fd) { argument
89 return nativeGetVersion(fd);
92 private static native long nativeNew(int fd); argument
102 private static native String nativeGetLanguage(int fd); argument
104 private static native int nativeGetVersion(int fd); argument
/frameworks/native/libs/binder/
H A DIShellCallback.cpp49 int fd = reply.readParcelFileDescriptor(); local
50 return fd >= 0 ? fcntl(fd, F_DUPFD_CLOEXEC, 0) : fd;
67 int fd = openOutputFile(path, seLinuxContext); local
70 if (fd >= 0) {
72 reply->writeParcelFileDescriptor(fd, true);
76 } else if (fd >= 0) {
77 close(fd);
H A DMemoryHeapBase.cpp49 int fd = ashmem_create_region(name == NULL ? "MemoryHeapBase" : name, size); local
50 ALOGE_IF(fd<0, "error creating ashmem region: %s", strerror(errno));
51 if (fd >= 0) {
52 if (mapfd(fd, size) == NO_ERROR) {
54 ashmem_set_prot_region(fd, PROT_READ);
68 int fd = open(device, open_flags); local
69 ALOGE_IF(fd<0, "error opening %s: %s", device, strerror(errno));
70 if (fd >= 0) {
73 if (mapfd(fd, size) == NO_ERROR) {
79 MemoryHeapBase::MemoryHeapBase(int fd, size_ argument
88 init(int fd, void *base, int size, int flags, const char* device) argument
101 mapfd(int fd, size_t size, uint32_t offset) argument
140 int fd = android_atomic_or(-1, &mFD); local
[all...]
/frameworks/native/cmds/lshal/
H A DPipeRelay.cpp26 explicit RelayThread(int fd, std::ostream &os);
39 PipeRelay::RelayThread::RelayThread(int fd, std::ostream &os) argument
40 : mFd(fd),
73 void PipeRelay::CloseFd(int *fd) { argument
74 if (*fd >= 0) {
75 close(*fd);
76 *fd = -1;
102 int PipeRelay::fd() const { function in class:android::lshal::PipeRelay
/frameworks/base/core/java/com/android/server/
H A DNetworkManagementSocketTagger.java71 public void tag(FileDescriptor fd) throws SocketException { argument
74 Log.d(TAG, "tagSocket(" + fd.getInt$() + ") with statsTag=0x"
81 tagSocketFd(fd, options.statsTag, options.statsUid);
84 private void tagSocketFd(FileDescriptor fd, int tag, int uid) { argument
88 final int errno = native_tagSocketFd(fd, tag, uid);
90 Log.i(TAG, "tagSocketFd(" + fd.getInt$() + ", "
98 public void untag(FileDescriptor fd) throws SocketException { argument
100 Log.i(TAG, "untagSocket(" + fd.getInt$() + ")");
102 unTagSocketFd(fd);
105 private void unTagSocketFd(FileDescriptor fd) { argument
154 native_tagSocketFd(FileDescriptor fd, int tag, int uid) argument
155 native_untagSocketFd(FileDescriptor fd) argument
[all...]
/frameworks/av/services/audiopolicy/common/managerdefinitions/src/
H A DAudioSourceDescriptor.cpp32 status_t AudioSourceDescriptor::dump(int fd) argument
42 write(fd, result.string(), result.size());
43 mDevice->dump(fd, 2 , 0);
48 status_t AudioSourceCollection::dump(int fd) const
54 write(fd, buffer, strlen(buffer));
57 write(fd, buffer, strlen(buffer));
58 valueAt(i)->dump(fd);
/frameworks/av/services/camera/libcameraservice/utils/
H A DCameraTraces.cpp67 status_t CameraTraces::dump(int fd, const Vector<String16> &args __attribute__((unused))) { argument
68 ALOGV("%s: fd = %d", __FUNCTION__, fd);
72 if (fd < 0) {
73 ALOGW("%s: Negative FD (%d)", __FUNCTION__, fd);
77 dprintf(fd, "== Camera error traces (%zu): ==\n", pcsList.size());
80 dprintf(fd, " No camera traces collected.\n");
87 pcs.dump(fd, DUMP_INDENT);
/frameworks/av/services/audioflinger/
H A DFastCaptureDumpState.cpp36 void FastCaptureDumpState::dump(int fd) const
39 dprintf(fd, " FastCapture not initialized\n");
45 dprintf(fd, " FastCapture command=%s readSequence=%u framesRead=%u\n"

Completed in 682 milliseconds

1234567891011>>