/cts/hostsidetests/security/securityPatch/CVE-2017-0333/ |
poc.c | 34 int dev_fd; variable 47 dev_fd = open(DEV, O_RDONLY); 49 if (dev_fd == -1) { 55 ret = ioctl(dev_fd, DRM_IOCTL_NOUVEAU_NVIF, &s_nvif);
|
/device/linaro/hikey/wpan/uim/ |
uim.c | 39 static int dev_fd; variable 57 void read_firmware_version(int dev_fd) 64 UIM_VER(" wrote %d bytes", (int)write(dev_fd, buffer, 4)); 65 UIM_VER(" reading %d bytes", (int)read(dev_fd, resp_buffer, 15)); 199 static int set_baud_rate(int dev_fd) 204 tcflush(dev_fd, TCIOFLUSH); 207 if (tcgetattr(dev_fd, &ti) < 0) { 222 tcsetattr(dev_fd, TCSANOW, &ti); 227 tcsetattr(dev_fd, TCSANOW, &ti); 229 tcflush(dev_fd, TCIOFLUSH) [all...] |
/hardware/qcom/display/msm8909/libdrmutils/ |
drm_res_mgr.cpp | 46 static bool GetConnector(int dev_fd, drmModeRes *res, drmModeConnector **connector) { 48 drmModeConnector *conn = drmModeGetConnector(dev_fd, res->connectors[i]); 60 static bool GetEncoder(int dev_fd, drmModeConnector *conn, drmModeEncoder **encoder) { 62 drmModeEncoder *enc = drmModeGetEncoder(dev_fd, conn->encoders[i]); 72 static bool GetCrtc(int dev_fd, drmModeRes *res, drmModeEncoder *enc, drmModeCrtc **crtc) { 75 drmModeCrtc *c = drmModeGetCrtc(dev_fd, res->crtcs[i]); 107 int dev_fd = -1; local 114 master->GetHandle(&dev_fd); 115 drmModeRes *res = drmModeGetResources(dev_fd); 122 if (!GetConnector(dev_fd, res, &conn)) [all...] |
/hardware/qcom/display/msm8909w_3100/libdrmutils/ |
drm_res_mgr.cpp | 46 static bool GetConnector(int dev_fd, drmModeRes *res, drmModeConnector **connector) { 48 drmModeConnector *conn = drmModeGetConnector(dev_fd, res->connectors[i]); 60 static bool GetEncoder(int dev_fd, drmModeConnector *conn, drmModeEncoder **encoder) { 62 drmModeEncoder *enc = drmModeGetEncoder(dev_fd, conn->encoders[i]); 72 static bool GetCrtc(int dev_fd, drmModeRes *res, drmModeEncoder *enc, drmModeCrtc **crtc) { 75 drmModeCrtc *c = drmModeGetCrtc(dev_fd, res->crtcs[i]); 107 int dev_fd = -1; local 114 master->GetHandle(&dev_fd); 115 drmModeRes *res = drmModeGetResources(dev_fd); 122 if (!GetConnector(dev_fd, res, &conn)) [all...] |
/hardware/qcom/display/msm8998/libdrmutils/ |
drm_res_mgr.cpp | 46 static bool GetConnector(int dev_fd, drmModeRes *res, drmModeConnector **connector) { 48 drmModeConnector *conn = drmModeGetConnector(dev_fd, res->connectors[i]); 60 static bool GetEncoder(int dev_fd, drmModeConnector *conn, drmModeEncoder **encoder) { 62 drmModeEncoder *enc = drmModeGetEncoder(dev_fd, conn->encoders[i]); 72 static bool GetCrtc(int dev_fd, drmModeRes *res, drmModeEncoder *enc, drmModeCrtc **crtc) { 75 drmModeCrtc *c = drmModeGetCrtc(dev_fd, res->crtcs[i]); 107 int dev_fd = -1; local 114 master->GetHandle(&dev_fd); 115 drmModeRes *res = drmModeGetResources(dev_fd); 122 if (!GetConnector(dev_fd, res, &conn)) [all...] |
/hardware/akm/AK8975_FS/libsensors/ |
SensorBase.cpp | 38 dev_fd(-1), data_fd(-1) 49 if (dev_fd >= 0) { 50 close(dev_fd); 55 if (dev_fd<0 && dev_name) { 56 dev_fd = open(dev_name, O_RDONLY); 57 ALOGE_IF(dev_fd<0, "Couldn't open %s (%s)", dev_name, strerror(errno)); 63 if (dev_fd >= 0) { 64 close(dev_fd); 65 dev_fd = -1; 92 return dev_fd; [all...] |
SensorBase.h | 35 int dev_fd; member in class:SensorBase
|
KionixSensor.cpp | 94 err = ioctl(dev_fd, KIONIX_IOCTL_ENABLE_OUTPUT); 99 err = ioctl(dev_fd, KIONIX_IOCTL_DISABLE_OUTPUT); 137 if (ioctl(dev_fd, KIONIX_IOCTL_UPDATE_ODR, &ms)) {
|
/external/ltp/lib/ |
tst_device.c | 72 int ctl_fd, dev_fd, rc, i; local 111 dev_fd = open(dev_path, O_RDONLY); 113 if (dev_fd < 0) 116 if (ioctl(dev_fd, LOOP_GET_STATUS, &loopinfo) == 0) { 122 close(dev_fd); 126 close(dev_fd); 136 int dev_fd, file_fd; local 139 dev_fd = open(dev, O_RDWR); 140 if (dev_fd < 0) { 148 close(dev_fd); 182 int dev_fd, ret, i; local [all...] |
/cts/hostsidetests/security/securityPatch/CVE-2016-8431/ |
poc.c | 31 int dev_fd; variable 59 dev_fd = open(DEV,O_RDONLY); 60 if(dev_fd == -1){ 66 ret = ioctl(dev_fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); 73 ret = ioctl(dev_fd, DRM_IOCTL_TEGRA_GEM_CREATE, &gem_create); 84 ioctl(dev_fd, DRM_IOCTL_TEGRA_SUBMIT, &submit_c); 89 close(dev_fd);
|
/cts/hostsidetests/security/securityPatch/CVE-2016-8432/ |
poc.c | 35 int dev_fd; variable 95 ioctl(dev_fd, DRM_IOCTL_TEGRA_SUBMIT, &submit_c); 107 dev_fd = open(DEV,O_RDONLY); 108 if(dev_fd == -1){ 114 ret = ioctl(dev_fd, DRM_IOCTL_TEGRA_OPEN_CHANNEL, &open_c); 123 ret = ioctl(dev_fd, DRM_IOCTL_TEGRA_GEM_CREATE, &gem_create); 134 while(ioctl(dev_fd, DRM_IOCTL_GEM_CLOSE, &gem_close) == 0); 144 close(dev_fd);
|
/external/syslinux/libinstaller/ |
syslxcom.h | 12 int syslinux_already_installed(int dev_fd);
|
/hardware/invensense/6515/libsensors_iio/ |
SensorBase.cpp | 52 dev_fd(-1), 103 if (dev_fd >= 0) { 104 close(dev_fd); 110 if (dev_fd<0 && dev_name) { 111 dev_fd = open(dev_name, O_RDONLY); 112 LOGE_IF(dev_fd<0, "Couldn't open %s (%s)", dev_name, strerror(errno)); 119 if (dev_fd >= 0) { 120 close(dev_fd); 121 dev_fd = -1; 129 return dev_fd; [all...] |
SensorBase.h | 74 int dev_fd; member in class:SensorBase
|
/hardware/invensense/65xx/libsensors_iio/ |
SensorBase.cpp | 50 dev_fd(-1), 97 if (dev_fd >= 0) { 98 close(dev_fd); 104 if (dev_fd<0 && dev_name) { 105 dev_fd = open(dev_name, O_RDONLY); 106 LOGE_IF(dev_fd<0, "Couldn't open %s (%s)", dev_name, strerror(errno)); 113 if (dev_fd >= 0) { 114 close(dev_fd); 115 dev_fd = -1; 123 return dev_fd; [all...] |
SensorBase.h | 73 int dev_fd; member in class:SensorBase
|
/external/dhcpcd-6.8.2/ |
dev.c | 65 eloop_event_delete(ctx->eloop, ctx->dev_fd, 0); 69 ctx->dev_fd = -1; 169 if (ctx->dev_fd != -1) { 171 ctx->dev_fd); 172 return ctx->dev_fd; 175 ctx->dev_fd = dev_start1(ctx); 176 if (ctx->dev_fd != -1) { 178 ctx->dev_fd, dev_handle_data, ctx, NULL, NULL) == -1) 187 return ctx->dev_fd;
|
/external/syslinux/linux/ |
syslinux.c | 106 int do_mount(int dev_fd, int *cookie, const char *mntpath, const char *fstype) 112 if (fstat(dev_fd, &st) < 0) 129 if (ioctl(loop_fd, LOOP_SET_FD, (void *)dev_fd)) { 147 (unsigned long)mypid, dev_fd); 161 (unsigned long)mypid, dev_fd); 262 int dev_fd, fd; local 302 dev_fd = open(opt.device, O_RDWR); 303 if (dev_fd < 0 || fstat(dev_fd, &st) < 0) { 316 xpread(dev_fd, sectbuf, SECTOR_SIZE, opt.offset) [all...] |
/external/f2fs-tools/tools/sg_write_buffer/include/ |
sg_pt.h | 44 /* Assumes dev_fd is an "open" file handle associated with device_name. If 45 * the implementation (possibly for one OS) cannot determine from dev_fd if 50 * NSID), or 0 if something else (e.g. ATA block device) or dev_fd < 0. 52 int check_pt_file_handle(int dev_fd, const char * device_name, int verbose); 66 * that will cause pt_device_is_nvme() to return true. Set dev_fd to 70 construct_scsi_pt_obj_with_fd(int dev_fd, int verbose); 72 /* Forget any previous dev_fd and install the one given. May attempt to 75 * will return. dev_fd should be >= 0 for a valid file handle or -1 . */ 76 int set_pt_file_handle(struct sg_pt_base * objp, int dev_fd, int verbose); 83 * used to issue more than one SCSI command. The dev_fd is remembered [all...] |
/external/syslinux/dos/ |
syslinux.c | 572 static void move_file(int dev_fd, char *pathname, char *filename) 579 new_name[0] = dev_fd | 0x40; 616 int dev_fd, fd; local 657 dev_fd = (opt.device[0] & ~0x20) - 0x40; 658 if (dev_fd < 1 || dev_fd > 26 || opt.device[1] != ':' || opt.device[2]) 661 set_lock_device(dev_fd); 664 read_device(dev_fd, sectbuf, 1, 0); 677 ldlinux_name[0] = dev_fd | 0x40; 678 ldlinuxc32_name[0] = dev_fd | 0x40 [all...] |
/external/f2fs-tools/tools/sg_write_buffer/ |
sg_pt_linux.c | 190 * true if dev_fd is a scsi generic pass-through device. If yields 191 * *is_nvme_p = true with *nsid_p = 0 then dev_fd is a NVMe char device. 192 * If yields *nsid_p > 0 then dev_fd is a NVMe block device. */ 194 check_file_type(int dev_fd, struct stat * dev_statp, bool * is_bsg_p, 206 if (dev_fd >= 0) { 207 if (fstat(dev_fd, dev_statp) < 0) { 226 nsid = ioctl(dev_fd, NVME_IOCTL_ID, NULL); 240 pr2ws("%s: invalid file descriptor (%d)\n", __func__, dev_fd); 270 /* Assumes dev_fd is an "open" file handle associated with device_name. If 271 * the implementation (possibly for one OS) cannot determine from dev_fd i [all...] |
/system/core/libappfuse/include/libappfuse/ |
FuseBridgeLoop.h | 51 bool AddBridge(int mount_id, base::unique_fd dev_fd, base::unique_fd proxy_fd);
|
/device/google/marlin/camera/QCamera2/stack/mm-camera-interface/src/ |
mm_camera_interface.c | 1565 int dev_fd = -1; local 1781 int dev_fd = -1; local [all...] |
/external/syslinux/mtools/ |
syslinux.c | 189 int dev_fd; local 241 dev_fd = open(opt.device, O_RDWR); 242 if (dev_fd < 0 || fstat(dev_fd, &st) < 0) { 254 xpread(dev_fd, sectbuf, SECTOR_SIZE, opt.offset); 282 dev_fd, (unsigned long long)opt.offset); 322 fs = libfat_open(libfat_xpread, dev_fd); 341 xpwrite(dev_fd, (const char _force *)syslinux_ldlinux 394 xpread(dev_fd, sectbuf, SECTOR_SIZE, opt.offset); 400 xpwrite(dev_fd, sectbuf, SECTOR_SIZE, opt.offset) [all...] |
/external/mmc-utils/ |
mmc_cmds.c | 1610 int ret, dev_fd, key_fd; local 1692 int ret, dev_fd; local 1721 int i, ret, dev_fd, data_fd, key_fd = -1; local 1868 int ret, dev_fd, key_fd, data_fd; local [all...] |