Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 78) sorted by relevance

1234

/Documentation/target/
Dtcm_mod_builder.py41 buf = ""
50 buf = "#define " + fabric_mod_name.upper() + "_VERSION \"v0.1\"\n"
51 buf += "#define " + fabric_mod_name.upper() + "_NAMELEN 32\n"
52 buf += "\n"
53 buf += "struct " + fabric_mod_name + "_tpg {\n"
54 buf += " /* FC lport target portal group tag for TCM */\n"
55 buf += " u16 lport_tpgt;\n"
56 buf += " /* Pointer back to " + fabric_mod_name + "_lport */\n"
57 buf += " struct " + fabric_mod_name + "_lport *lport;\n"
58 buf += " /* Returned by " + fabric_mod_name + "_make_tpg() */\n"
[all …]
Dtcmu-design.rst309 char buf[256];
314 ret = read(fd, buf, sizeof(buf));
316 buf[ret-1] = '\0'; /* null-terminate and chop off the \n */
319 if (strncmp(buf, "tcm-user", 8))
325 ret = read(fd, buf, sizeof(buf));
329 map_len = strtoull(buf, NULL, 0);
338 char buf[4];
340 int ret = read(dev_fd, buf, 4); /* will block */
390 uint32_t buf = 0;
392 write(fd, &buf, 4);
/Documentation/media/uapi/v4l/
Dv4l2grab.c.rst64 struct v4l2_buffer buf;
105 CLEAR(buf);
107 buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
108 buf.memory = V4L2_MEMORY_MMAP;
109 buf.index = n_buffers;
111 xioctl(fd, VIDIOC_QUERYBUF, &buf);
113 buffers[n_buffers].length = buf.length;
114 buffers[n_buffers].start = v4l2_mmap(NULL, buf.length,
116 fd, buf.m.offset);
125 CLEAR(buf);
[all …]
Dcapture.c.rst93 struct v4l2_buffer buf;
117 CLEAR(buf);
119 buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
120 buf.memory = V4L2_MEMORY_MMAP;
122 if (-1 == xioctl(fd, VIDIOC_DQBUF, &buf)) {
137 assert(buf.index < n_buffers);
139 process_image(buffers[buf.index].start, buf.bytesused);
141 if (-1 == xioctl(fd, VIDIOC_QBUF, &buf))
146 CLEAR(buf);
148 buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
[all …]
Ddmabuf.rst81 struct v4l2_buffer buf;
83 memset(&buf, 0, sizeof buf);
84 buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
85 buf.memory = V4L2_MEMORY_DMABUF;
86 buf.index = index;
87 buf.m.fd = dmafd;
89 if (ioctl(v4lfd, VIDIOC_QBUF, &buf) == -1) {
104 struct v4l2_buffer buf;
108 memset(&buf, 0, sizeof buf);
109 buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
[all …]
Dpixfmt-y12i.rst29 __u8 *buf;
30 left0 = 0xfff & *(__u16 *)buf;
31 right0 = *(__u16 *)(buf + 1) >> 4;
Dfunc-write.rst30 .. c:function:: ssize_t write( int fd, void *buf, size_t count )
39 ``buf``
50 ``buf``. When the hardware outputs are not active yet, this function
81 ``buf`` references an inaccessible memory area.
/Documentation/driver-api/
Ddma-buf.rst4 The dma-buf subsystem provides the framework for sharing buffers for
11 The three main components of this are: (1) dma-buf, representing a
20 This document serves as a guide to device-driver writers on what is the dma-buf
49 Any exporters or users of the dma-buf buffer sharing framework must have a
59 - Since kernel 3.12 the dma-buf FD supports the llseek system call, but only
64 If llseek on dma-buf FDs isn't support the kernel will report -ESPIPE for all
65 cases. Userspace can use this to detect support for discovering the dma-buf
81 flag be set when the dma-buf fd is created. So any API provided by
94 .. kernel-doc:: drivers/dma-buf/dma-buf.c
95 :doc: dma buf device access
[all …]
Dnvmem.rst116 int nvmem_cell_write(struct nvmem_cell *cell, void *buf, ssize_t len);
134 size_t bytes, void *buf);
136 size_t bytes, void *buf);
138 struct nvmem_cell_info *info, void *buf);
140 struct nvmem_cell_info *info, void *buf);
/Documentation/networking/
Dcxacru-cf.py34 buf = sys.stdin.read(4) variable
36 if len(buf) == 0:
38 elif len(buf) != 4:
40 sys.stderr.write("Error: read {0} not 4 bytes\n".format(len(buf)))
45 sys.stdout.write("{0:x}={1}".format(i, struct.unpack("<I", buf)[0]))
/Documentation/translations/zh_CN/filesystems/
Dsysfs.txt106 char *buf);
108 const char *buf, size_t count);
161 char *buf)
168 ret = dev_attr->show(dev, dev_attr, buf);
184 ssize_t (*show)(struct device *dev, struct device_attribute *attr, char *buf);
186 const char *buf, size_t count);
234 char *buf)
236 return scnprintf(buf, PAGE_SIZE, "%s\n", dev->name);
240 const char *buf, size_t count)
243 (int)min(count, sizeof(dev->name) - 1), buf);
[all …]
/Documentation/usb/
Dgadget_hid.rst193 int keyboard_fill_report(char report[8], char buf[BUF_LEN], int *hold)
195 char *tok = strtok(buf, " ");
246 int mouse_fill_report(char report[8], char buf[BUF_LEN], int *hold)
248 char *tok = strtok(buf, " ");
297 int joystick_fill_report(char report[8], char buf[BUF_LEN], int *hold)
299 char *tok = strtok(buf, " ");
372 char buf[BUF_LEN];
413 cmd_len = read(fd, buf, BUF_LEN - 1);
416 printf(" %02x", buf[i]);
422 cmd_len = read(STDIN_FILENO, buf, BUF_LEN - 1);
[all …]
Dgadget_printer.rst221 static char buf[BUF_SIZE];
231 bytes_read = read(fd[0].fd, buf, BUF_SIZE);
240 fwrite(buf, 1, bytes_read, stdout);
272 static char buf[BUF_SIZE];
274 int bytes_read = fread(buf, 1, BUF_SIZE, stdin);
287 retval = write(fd[0].fd, buf, bytes_read);
318 static char buf[BUF_SIZE];
331 bytes_read = read(fd, buf, BUF_SIZE);
337 fwrite(buf, 1, bytes_read, stdout);
377 set_printer_status(unsigned char buf, int clear_printer_status_bit)
[all …]
/Documentation/media/uapi/mediactl/
Drequest-api.rst167 struct v4l2_buffer buf;
179 buf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
180 buf.flags |= V4L2_BUF_FLAG_REQUEST_FD;
181 buf.request_fd = req_fd;
182 if (ioctl(codec_fd, VIDIOC_QBUF, &buf))
202 struct v4l2_buffer buf;
204 memset(&buf, 0, sizeof(buf));
205 buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
206 if (ioctl(codec_fd, VIDIOC_DQBUF, &buf))
250 struct v4l2_buffer buf;
[all …]
/Documentation/media/uapi/dvb/
Ddmx-fread.rst25 .. c:function:: size_t read(int fd, void *buf, size_t count)
34 ``buf``
45 the driver’s internal circular buffer to ``buf``. The maximum amount of data
83 invalid \*buf pointer.
Daudio-fwrite.rst26 .. c:function:: size_t write(int fd, const void *buf, size_t count)
46 - void \*buf
54 - Size of buf.
Dvideo-fwrite.rst26 .. c:function:: size_t write(int fd, const void *buf, size_t count)
45 - void \*buf
53 - Size of buf.
/Documentation/filesystems/
Dsysfs.txt91 char *buf);
93 const char *buf, size_t count);
169 char *buf)
176 ret = dev_attr->show(dev, dev_attr, buf);
193 ssize_t (*show)(struct device *dev, struct device_attribute *attr, char *buf);
195 const char *buf, size_t count);
255 char *buf)
257 return scnprintf(buf, PAGE_SIZE, "%s\n", dev->name);
261 const char *buf, size_t count)
264 (int)min(count, sizeof(dev->name) - 1), buf);
[all …]
/Documentation/driver-api/iio/
Dtriggered-buffers.rst32 u16 buf[8];
37 buf[i++] = sensor_get_data(bit)
39 iio_push_to_buffers_with_timestamp(indio_dev, buf, timestamp);
/Documentation/ia64/
Derr_inject.rst125 char buf[MAX_BUF_SIZE];
137 memset(buf, 0, MAX_BUF_SIZE);
138 vsprintf(buf, fmt, args);
141 fwrite(buf, sizeof(buf), 1, log);
361 struct semid_ds *buf;
442 char buf[MAX_BUF_SIZE];
446 sprintf(buf, "%lx", *data);
448 sprintf(buf, "%lx,%lx,%lx", data[0], data[1], data[2]);
459 ret=write(fd, buf, sizeof(buf));
472 char buf[MAX_BUF_SIZE];
[all …]
/Documentation/media/uapi/rc/
Dlirc-read.rst30 .. c:function:: ssize_t read( int fd, void *buf, size_t count )
40 ``buf``
50 descriptor ``fd`` into the buffer starting at ``buf``. If ``count`` is zero,
Dlirc-write.rst30 .. c:function:: ssize_t write( int fd, void *buf, size_t count )
39 ``buf``
50 ``buf``.
/Documentation/fault-injection/
Dfault-injection.rst408 char buf[128];
411 sprintf(buf, "/proc/self/task/%ld/fail-nth", syscall(SYS_gettid));
412 fail_nth = open(buf, O_RDWR);
414 sprintf(buf, "%d", i);
415 write(fail_nth, buf, strlen(buf));
418 pread(fail_nth, buf, sizeof(buf), 0);
423 printf("%d-th fault %c: res=%d/%d\n", i, atoi(buf) ? 'N' : 'Y',
425 if (atoi(buf))
/Documentation/i2c/
Ddev-interface.rst64 char buf[10];
78 buf[0] = reg;
79 buf[1] = 0x43;
80 buf[2] = 0x65;
81 if (write(file, buf, 3) != 3) {
86 if (read(file, buf, 1) != 1) {
89 /* buf[0] contains the read byte */
/Documentation/trace/
Dftrace-uses.rst182 int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf,
188 @buf
197 If @buf is NULL and reset is set, all functions will be enabled for tracing.
199 The @buf can also be a glob expression to enable all functions that
212 with new functions defined by @buf, have @reset be non-zero.
243 int ftrace_set_notrace(struct ftrace_ops *ops, unsigned char *buf,
251 that match @buf to it.
264 If a filter is in place, and the @reset is non-zero, and @buf contains a

1234