/freebsd/contrib/file/src/ |
H A D | ascmagic.c | 73 file_unichar_t *ubuf = NULL; in file_ascmagic() local 92 if (file_encoding(ms, &bb, &ubuf, &ulen, &code, &code_mime, in file_ascmagic() 97 ubuf, ulen, code, type, text); in file_ascmagic() 99 free(ubuf); in file_ascmagic() 106 file_unichar_t *ubuf, size_t ulen, const char *code, const char *type, in file_ascmagic_with_encoding() argument 150 if ((utf8_end = encode_utf8(utf8_buf, mlen, ubuf, ulen)) in file_ascmagic_with_encoding() 177 if (ubuf[i] == '\n') { in file_ascmagic_with_encoding() 186 seen_cr = (ubuf[i] == '\r'); in file_ascmagic_with_encoding() 190 if (ubuf[i] == 0x85) { /* X3.64/ECMA-43 "next line" character */ in file_ascmagic_with_encoding() 202 if (ubuf[i] == '\033') in file_ascmagic_with_encoding() [all …]
|
H A D | encoding.c | 76 file_unichar_t **ubuf, size_t *ulen, const char **code, in file_encoding() argument 86 if (ubuf == NULL) in file_encoding() 87 ubuf = &udefbuf; in file_encoding() 99 mlen = (nbytes + 1) * sizeof((*ubuf)[0]); in file_encoding() 100 *ubuf = CAST(file_unichar_t *, calloc(CAST(size_t, 1), mlen)); in file_encoding() 101 if (*ubuf == NULL) { in file_encoding() 105 if (looks_ascii(buf, nbytes, *ubuf, ulen)) { in file_encoding() 106 if (looks_utf7(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding() 115 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding() 119 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) { in file_encoding() [all …]
|
H A D | compress.c | 1024 filter_error(unsigned char *ubuf, ssize_t n) in filter_error() argument 1029 ubuf[n] = '\0'; in filter_error() 1030 buf = RCAST(char *, ubuf); in filter_error() 1043 memmove(ubuf, p, CAST(size_t, n + 1)); in filter_error() 1045 DPRINTF("Filter error after[[[%s]]]\n", (char *)ubuf); in filter_error() 1046 if (islower(*ubuf)) in filter_error() 1047 *ubuf = toupper(*ubuf); in filter_error()
|
/freebsd/sys/dev/tws/ |
H A D | tws_user.c | 88 struct tws_ioctl_no_data_buf *ubuf = (struct tws_ioctl_no_data_buf *)buf; in tws_passthru() local 93 buffer_length = roundup2(ubuf->driver_pkt.buffer_length, 512); in tws_passthru() 129 error = copyin(ubuf->pdata, req->data, req->length); in tws_passthru() 138 memcpy(&req->cmd_pkt->cmd, &ubuf->cmd_pkt.cmd, in tws_passthru() 154 ubuf->driver_pkt.os_status = error; in tws_passthru() 159 ubuf->driver_pkt.os_status = req->error_code; in tws_passthru() 183 memcpy(&ubuf->cmd_pkt.hdr, &req->cmd_pkt->hdr, sizeof(struct tws_command_apache)); in tws_passthru() 184 memcpy(&ubuf->cmd_pkt.cmd, &req->cmd_pkt->cmd, sizeof(struct tws_command_apache)); in tws_passthru() 192 error = copyout(req->data, ubuf->pdata, ubuf->driver_pkt.buffer_length); in tws_passthru() 199 ubuf->driver_pkt.os_status = error; in tws_passthru() [all …]
|
/freebsd/sys/dev/iicbus/ |
H A D | iic.c | 438 struct uio ubuf; in iicioctl() local 536 ubuf.uio_iov = &uvec; in iicioctl() 537 ubuf.uio_iovcnt = 1; in iicioctl() 538 ubuf.uio_segflg = UIO_USERSPACE; in iicioctl() 539 ubuf.uio_td = td; in iicioctl() 540 ubuf.uio_resid = s->count; in iicioctl() 541 ubuf.uio_offset = 0; in iicioctl() 542 ubuf.uio_rw = UIO_WRITE; in iicioctl() 543 error = iicuio_move(priv, &ubuf, 0); in iicioctl() 556 ubuf in iicioctl() [all...] |
/freebsd/sys/contrib/dev/athk/ath11k/ |
H A D | debugfs.c | 560 const char __user *ubuf, in ath11k_write_enable_extd_tx_stats() argument 567 if (kstrtouint_from_user(ubuf, count, 0, &filter)) in ath11k_write_enable_extd_tx_stats() 591 char __user *ubuf, in ath11k_read_enable_extd_tx_stats() argument 604 return simple_read_from_buffer(ubuf, count, ppos, buf, len); in ath11k_read_enable_extd_tx_stats() 614 const char __user *ubuf, in ath11k_write_extd_rx_stats() argument 624 if (kstrtouint_from_user(ubuf, count, 0, &enable)) in ath11k_write_extd_rx_stats() 690 char __user *ubuf, in ath11k_read_extd_rx_stats() argument 702 return simple_read_from_buffer(ubuf, count, ppos, buf, len); in ath11k_read_extd_rx_stats() 1067 const char __user *ubuf, in ath11k_write_pktlog_filter() argument 1084 rc = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, ubuf, count); in ath11k_write_pktlog_filter() [all …]
|
/freebsd/contrib/sendmail/src/ |
H A D | parseaddr.c | 2017 static char ubuf[MAXNAME_I + 2]; local 2088 cataddr(++tv, NULL, ubuf, sizeof(ubuf), ' ', false); 2096 a->q_user = sm_rpool_strdup_x(e->e_rpool, ubuf); 2127 stripquotes(ubuf); 2128 if (ISSMTPCODE(ubuf) && ubuf[3] == ' ') 2133 if ((off = isenhsc(ubuf + 4, ' ')) > 0) 2135 ubuf[off + 4] = '\0'; 2141 ubuf[3] = '\0'; 2143 (void) sm_strlcpyn(fmt, sizeof(fmt), 2, ubuf, " %s"); 2145 usrerr(fmt, ubuf + off); [all …]
|
H A D | err.c | 134 char ubuf[80]; local 209 user = ubuf; 210 (void) sm_snprintf(ubuf, sizeof(ubuf), "UID%d", (int) RealUid);
|
/freebsd/contrib/tcsh/ |
H A D | tc.os.c | 626 char ubuf[100]; in douniverse() local 629 (void) getuniverse(ubuf); in douniverse() 630 xprintf("%s\n", ubuf); in douniverse() 639 (void) getuniverse(ubuf); in douniverse() 642 cleanup_push(ubuf, setuniverse_cleanup); in douniverse() 651 cleanup_until(ubuf); in douniverse() 871 char ubuf[100]; in doatt() local 876 (void) getuniverse(ubuf); in doatt() 878 cleanup_push(ubuf, setuniverse_cleanup); in doatt() 887 cleanup_until(ubuf); in doatt() [all …]
|
/freebsd/sys/dev/ntb/test/ |
H A D | ntb_tool.c | 366 get_ubuf(struct sysctl_req *req, char *ubuf) in get_ubuf() argument 373 rc = SYSCTL_IN(req, ubuf, req->newlen); in get_ubuf() 376 ubuf[req->newlen] = '\0'; in get_ubuf() 384 char ubuf[19]; in read_out() local 386 memset((void *)ubuf, 0, sizeof(ubuf)); in read_out() 387 snprintf(ubuf, sizeof(ubuf), "0x%jx", val); in read_out() 389 return SYSCTL_OUT(req, ubuf, sizeof(ubuf)); in read_out() 406 struct sysctl_req *req, char *ubuf, uint64_t *val, bool db_mask_sflag, in tool_fn_write() argument 422 sscanf(ubuf, "%c %jx", &cmd, &bits); in tool_fn_write() 575 struct tool_mw *inmw, char *ubuf, caddr_t write_buf, int *cmd_op, in tool_mw_write_fn() argument [all …]
|
/freebsd/crypto/openssh/ |
H A D | sftp-common.c | 222 char buf[1024], lc[8], mode[11+1], tbuf[12+1], ubuf[11+1], gbuf[11+1]; in ls_file() local 229 snprintf(ubuf, sizeof ubuf, "%u", (u_int)st->st_uid); in ls_file() 230 user = ubuf; in ls_file()
|
/freebsd/sys/compat/linux/ |
H A D | linux_stats.c | 141 newstat_copyout(struct stat *buf, void *ubuf) in newstat_copyout() argument 163 return (copyout(&tbuf, ubuf, sizeof(tbuf))); in newstat_copyout() 216 old_stat_copyout(struct stat *buf, void *ubuf) in old_stat_copyout() argument 240 return (copyout(&lbuf, ubuf, sizeof(lbuf))); in old_stat_copyout() 516 stat64_copyout(struct stat *buf, void *ubuf) in stat64_copyout() argument 546 return (copyout(&lbuf, ubuf, sizeof(lbuf))); in stat64_copyout() 670 statx_copyout(struct stat *buf, void *ubuf) in statx_copyout() argument 699 return (copyout(&tbuf, ubuf, sizeof(tbuf))); in statx_copyout()
|
/freebsd/sys/contrib/dev/athk/ath10k/ |
H A D | debug.c | 1892 const char __user *ubuf, in ath10k_write_pktlog_filter() argument 1899 if (kstrtouint_from_user(ubuf, count, 0, &filter)) in ath10k_write_pktlog_filter() 1938 static ssize_t ath10k_read_pktlog_filter(struct file *file, char __user *ubuf, in ath10k_read_pktlog_filter() argument 1950 return simple_read_from_buffer(ubuf, count, ppos, buf, len); in ath10k_read_pktlog_filter() 1960 const char __user *ubuf, in ath10k_write_quiet_period() argument 1966 if (kstrtouint_from_user(ubuf, count, 0, &period)) in ath10k_write_quiet_period() 1982 static ssize_t ath10k_read_quiet_period(struct file *file, char __user *ubuf, in ath10k_read_quiet_period() argument 1994 return simple_read_from_buffer(ubuf, count, ppos, buf, len); in ath10k_read_quiet_period() 2004 const char __user *ubuf, in ath10k_write_btcoex() argument 2015 if (copy_from_user(buf, ubuf, buf_size)) in ath10k_write_btcoex() [all …]
|
/freebsd/contrib/less/ |
H A D | output.c | 461 static char ubuf[MAX_UTF_CHAR_LEN]; 469 ubuf[ubuf_index++] = c; 472 c = get_wchar(ubuf) & 0xFF;
|
/freebsd/sys/compat/linuxkpi/common/src/ |
H A D | linux_seq_file.c | 43 seq_read(struct linux_file *f, char *ubuf, size_t size, off_t *ppos) in seq_read() argument 67 rc = strscpy(ubuf, sbuf_data(sbuf) + *ppos, size + 1); in seq_read()
|
/freebsd/contrib/diff/lib/ |
H A D | strftime.c | 745 char ubuf[1024]; /* enough for any single format in practice */ variable 760 len = strftime (ubuf, sizeof ubuf, ufmt, tp); 761 if (len == 0 && ubuf[0] != '\0') 763 cpy (len, ubuf);
|
/freebsd/sys/fs/ext2fs/ |
H A D | ext2_hash.c | 210 const unsigned char *ubuf = (const unsigned char *)src; in ext2_prep_hashbuf() local 224 buf_byte = (u_int)ubuf[i]; in ext2_prep_hashbuf()
|
/freebsd/sys/net/altq/ |
H A D | altq_subr.c | 700 altq_getqstats(struct pf_altq *a, void *ubuf, int *nbytes, int version) in altq_getqstats() argument 707 error = cbq_getqstats(a, ubuf, nbytes, version); in altq_getqstats() 712 error = priq_getqstats(a, ubuf, nbytes, version); in altq_getqstats() 717 error = hfsc_getqstats(a, ubuf, nbytes, version); in altq_getqstats() 722 error = fairq_getqstats(a, ubuf, nbytes, version); in altq_getqstats() 727 error = codel_getqstats(a, ubuf, nbytes, version); in altq_getqstats()
|
H A D | altq_codel.c | 157 codel_getqstats(struct pf_altq *a, void *ubuf, int *nbytes, int version) in codel_getqstats() argument 172 if ((error = copyout((caddr_t)&stats, ubuf, sizeof(stats))) != 0) in codel_getqstats()
|
H A D | altq_cbq.c | 417 cbq_getqstats(struct pf_altq *a, void *ubuf, int *nbytes, int version) in cbq_getqstats() argument 435 if ((error = copyout((caddr_t)&stats, ubuf, sizeof(stats))) != 0) in cbq_getqstats()
|
H A D | altq_priq.c | 176 priq_getqstats(struct pf_altq *a, void *ubuf, int *nbytes, int version) in priq_getqstats() argument 194 if ((error = copyout((caddr_t)&stats, ubuf, sizeof(stats))) != 0) in priq_getqstats()
|
H A D | altq_fairq.c | 230 fairq_getqstats(struct pf_altq *a, void *ubuf, int *nbytes, int version) in fairq_getqstats() argument 248 if ((error = copyout((caddr_t)&stats, ubuf, sizeof(stats))) != 0) in fairq_getqstats()
|
/freebsd/contrib/mandoc/ |
H A D | roff.c | 1361 char ubuf[24]; /* buffer to print a number */ in roff_expand() local 1525 ubuf[0] = iendarg > iarg ? '1' : '0'; in roff_expand() 1526 ubuf[1] = '\0'; in roff_expand() 1527 res = ubuf; in roff_expand() 1531 ubuf[0] = iendarg > iarg && iend > iendarg && in roff_expand() 1535 ubuf[1] = '\0'; in roff_expand() 1536 res = ubuf; in roff_expand() 1548 (void)snprintf(ubuf, sizeof(ubuf), "%d", in roff_expand() 1552 ubuf[0] = '\0'; in roff_expand() 1553 res = ubuf; in roff_expand() [all …]
|
/freebsd/crypto/openssl/test/ |
H A D | params_api_test.c | 476 unsigned char ubuf[100]; in test_param_construct() local 501 params[n++] = OSSL_PARAM_construct_BN("bignum", ubuf, sizeof(ubuf)); in test_param_construct()
|
/freebsd/sys/compat/lindebugfs/ |
H A D | lindebugfs.c | 628 fops_blob_read(struct file *filp, char __user *ubuf, size_t read_size, loff_t *ppos) in fops_blob_read() argument 638 return (simple_read_from_buffer(ubuf, read_size, ppos, blob->data, blob->size)); in fops_blob_read()
|