Searched refs:buflen (Results 1 - 25 of 29) sorted by relevance

12

/fuchsia/zircon/third_party/ulib/musl/src/string/
H A Dstrerror_r.c5 int strerror_r(int err, char* buf, size_t buflen) { argument
8 if (l >= buflen) {
9 if (buflen) {
10 memcpy(buf, msg, buflen - 1);
11 buf[buflen - 1] = 0;
/fuchsia/zircon/system/dev/audio/usb-audio/
H A Dusb-audio.cpp20 size_t buflen = sizeof(str_buf); local
21 zx_status_t res = usb_get_string_descriptor(&usb, desc_id, &lang_id, str_buf, &buflen);
31 buflen = fbl::min(buflen, sizeof(str_buf));
34 fbl::unique_ptr<uint8_t[]> mem(new (&ac) uint8_t[buflen + 1]);
39 ::memcpy(mem.get(), str_buf, buflen);
40 mem[buflen] = 0;
42 return fbl::Array<uint8_t>(mem.release(), buflen);
/fuchsia/zircon/third_party/ulib/musl/src/network/
H A Dgethostbyname_r.c6 int gethostbyname_r(const char* name, struct hostent* h, char* buf, size_t buflen, argument
8 return gethostbyname2_r(name, AF_INET, h, buf, buflen, res, err);
H A Dgetservbyport_r.c9 int getservbyport_r(int port, const char* prots, struct servent* se, char* buf, size_t buflen, argument
17 int r = getservbyport_r(port, "tcp", se, buf, buflen, res);
19 r = getservbyport_r(port, "udp", se, buf, buflen, res);
27 if (buflen < 3 * sizeof(char*) - i)
30 buflen -= sizeof(char*) - i;
39 buflen -= 2 * sizeof(char*);
43 switch (getnameinfo((void*)&sin, sizeof sin, 0, 0, buf, buflen,
H A Dgethostbyaddr_r.c10 int gethostbyaddr_r(const void* a, socklen_t l, int af, struct hostent* h, char* buf, size_t buflen, argument
35 if (buflen <= 5 * sizeof(char*) - i + l)
38 buflen -= 5 * sizeof(char*) - i + l;
52 switch (getnameinfo((void*)&sa, sl, buf, buflen, 0, 0, 0)) {
H A Dgetservbyname_r.c18 size_t buflen, struct servent** res) {
24 if (buflen < 2 * sizeof(char*) + align)
17 getservbyname_r(const char* name, const char* prots, struct servent* se, char* buf, size_t buflen, struct servent** res) argument
H A Dres_mkquery.c7 int datalen, const unsigned char* newrr, unsigned char* buf, int buflen) {
17 if (l > 253 || buflen < n || op > 15u || class > 255u || type > 255u)
6 __res_mkquery(int op, const char* dname, int class, int type, const unsigned char* data, int datalen, const unsigned char* newrr, unsigned char* buf, int buflen) argument
H A Dgethostbyname2_r.c10 int gethostbyname2_r(const char* name, int af, struct hostent* h, char* buf, size_t buflen, argument
52 if (need > buflen) {
/fuchsia/zircon/third_party/ulib/jemalloc/test/src/
H A Dtimer.c28 timer_ratio(timedelta_t *a, timedelta_t *b, char *buf, size_t buflen) argument
37 n = malloc_snprintf(&buf[i], buflen-i, "%"FMTu64, t0 / t1);
39 if (i >= buflen)
46 n = malloc_snprintf(&buf[i], buflen-i, ".");
50 while (i < buflen-1) {
51 uint64_t round = (i+1 == buflen-1 && ((t0 * mult * 10 / t1) % 10
53 n = malloc_snprintf(&buf[i], buflen-i,
/fuchsia/zircon/third_party/ulib/jemalloc/test/include/test/
H A Dtimer.h11 void timer_ratio(timedelta_t *a, timedelta_t *b, char *buf, size_t buflen);
/fuchsia/zircon/third_party/ulib/jemalloc/include/jemalloc/internal/
H A Dutil_externs.h6 int buferror(int err, char *buf, size_t buflen);
/fuchsia/zircon/system/ulib/kvstore/
H A Dkvstore.c16 void kvs_init(kvstore_t* kvs, void* buffer, size_t buflen) { argument
18 kvs->datamax = buflen;
20 if (buflen < sizeof(kvshdr_t)) {
27 int kvs_load(kvstore_t* kvs, void* buffer, size_t buflen) { argument
32 kvs->datalen = buflen;
33 kvs->datamax = buflen;
37 if (buflen < sizeof(hdr)) {
45 if (hdr.length > buflen) {
/fuchsia/zircon/system/ulib/kvstore/include/kvstore/
H A Dkvstore.h28 void kvs_init(kvstore_t* kvs, void* buffer, size_t buflen);
31 int kvs_load(kvstore_t* kvs, void* buffer, size_t buflen);
/fuchsia/zircon/system/dev/usb/usb-bus/
H A Dutil.c91 size_t buflen = 0; local
99 buflen = *inout_buflen;
104 memset(buf, 0, buflen);
173 buflen &= ~1;
174 memcpy(buf, lang_ids->wLangIds, MIN(table_sz, buflen));
212 *inout_buflen = buflen;
/fuchsia/zircon/third_party/ulib/jemalloc/src/
H A Dutil.c87 buferror(int err, char *buf, size_t buflen) argument
91 (LPSTR)buf, (DWORD)buflen, NULL);
94 char *b = strerror_r(err, buf, buflen);
96 strncpy(buf, b, buflen);
97 buf[buflen-1] = '\0';
101 return (strerror_r(err, buf, buflen));
/fuchsia/zircon/third_party/ulib/musl/stubs/
H A Dsocketstubs.c65 static ssize_t stub_sendto(int fd, const void* buf, size_t buflen, int flags, const struct sockaddr* addr, socklen_t addrlen) { argument
71 static ssize_t stub_recvfrom(int fd, void* restrict buf, size_t buflen, int flags, struct sockaddr* restrict addr, socklen_t* restrict addrlen) { argument
/fuchsia/zircon/kernel/syscalls/
H A Dsystem.cpp161 static zx_status_t bootdata_append_section(uint8_t* bootdata_buf, size_t buflen, argument
177 if ((total_len + new_section_length) > buflen) {
203 zx_status_t bootdata_append_section(uint8_t* bootdata_buf, size_t buflen, argument
207 zx_status_t status = bootdata_append_section(bootdata_buf, buflen, section_length, type, extra,
/fuchsia/zircon/third_party/ulib/linenoise/
H A Dlinenoise.c153 size_t buflen; /* Edited line buffer size. */ member in struct:linenoiseState
441 nwritten = snprintf(ls->buf,ls->buflen,"%s",lc.cvec[i]);
696 if (l->len < l->buflen) {
772 strncpy(l->buf,history[history_len - 1 - l->history_index],l->buflen);
773 l->buf[l->buflen-1] = '\0';
825 static int linenoiseEdit(int stdin_fd, int stdout_fd, char *buf, size_t buflen, const char *prompt) argument
834 l.buflen = buflen;
845 l.buflen--; /* Make sure there is always space for the nulterm */
1047 static int linenoiseRaw(char *buf, size_t buflen, cons argument
[all...]
/fuchsia/zircon/system/dev/bus/virtio/
H A Dinput.cpp383 size_t buflen = 0;
387 buflen = sizeof(kbd_hid_report_desc);
389 *data = malloc(buflen);
393 *len = buflen;
394 memcpy(*data, buf, buflen);
/fuchsia/zircon/system/core/devmgr/
H A Ddevhost-api.cpp209 __EXPORT zx_status_t device_get_metadata(zx_device_t* dev, uint32_t type, void* buf, size_t buflen, argument
213 r = devhost_get_metadata(dev, type, buf, buflen, actual);
H A Ddevhost.h74 zx_status_t devhost_get_metadata(zx_device_t* dev, uint32_t type, void* buf, size_t buflen,
/fuchsia/zircon/kernel/lib/console/
H A Dconsole.cpp321 char* buffer, size_t buflen, cmd_args* args, int arg_count) {
455 int rc = env_get(varname, &buffer[outpos], buflen - outpos);
637 size_t buflen; member in struct:line_read_struct
653 if (bufpos == (lineread->buflen - 1))
672 lineread.buflen = LINE_LEN;
320 tokenize_command(const char* inbuffer, const char** continuebuffer, char* buffer, size_t buflen, cmd_args* args, int arg_count) argument
/fuchsia/zircon/system/ulib/ddk/include/ddk/
H A Ddevice.h260 zx_status_t device_get_metadata(zx_device_t* dev, uint32_t type, void* buf, size_t buflen,
/fuchsia/zircon/system/dev/input/pc-ps2/
H A Di8042.c655 size_t buflen = 0; local
658 buflen = sizeof(kbd_hid_report_desc);
661 buflen = sizeof(mouse_hid_report_desc);
666 *data = malloc(buflen);
667 *len = buflen;
668 memcpy(*data, buf, buflen);
/fuchsia/zircon/system/ulib/fdio/
H A Dsocket.c372 static ssize_t zxsio_rx_dgram(fdio_t* io, void* buf, size_t buflen) { argument
373 return zxsio_read_stream(io, buf, buflen);
376 static ssize_t zxsio_tx_dgram(fdio_t* io, const void* buf, size_t buflen) { argument
377 zx_status_t r = zxsio_write_stream(io, buf, buflen);

Completed in 232 milliseconds

12