| /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 | 469 struct uio ubuf; in iicioctl() local 567 ubuf.uio_iov = &uvec; in iicioctl() 568 ubuf.uio_iovcnt = 1; in iicioctl() 569 ubuf.uio_segflg = UIO_USERSPACE; in iicioctl() 570 ubuf.uio_td = td; in iicioctl() 571 ubuf.uio_resid = s->count; in iicioctl() 572 ubuf.uio_offset = 0; in iicioctl() 573 ubuf.uio_rw = UIO_WRITE; in iicioctl() 574 error = iicuio_move(priv, &ubuf, 0); in iicioctl() 587 ubuf.uio_iov = &uvec; in iicioctl() [all …]
|
| /freebsd/sys/contrib/dev/athk/ath11k/ |
| H A D | debugfs.c | 441 const char __user *ubuf, in ath11k_write_enable_extd_tx_stats() argument 448 if (kstrtouint_from_user(ubuf, count, 0, &filter)) in ath11k_write_enable_extd_tx_stats() 472 char __user *ubuf, in ath11k_read_enable_extd_tx_stats() argument 485 return simple_read_from_buffer(ubuf, count, ppos, buf, len); in ath11k_read_enable_extd_tx_stats() 495 const char __user *ubuf, in ath11k_write_extd_rx_stats() argument 505 if (kstrtouint_from_user(ubuf, count, 0, &enable)) in ath11k_write_extd_rx_stats() 571 char __user *ubuf, in ath11k_read_extd_rx_stats() argument 583 return simple_read_from_buffer(ubuf, count, ppos, buf, len); in ath11k_read_extd_rx_stats() 948 const char __user *ubuf, in ath11k_write_pktlog_filter() argument 965 rc = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, ubuf, count); in ath11k_write_pktlog_filter() [all …]
|
| H A D | cfr.c | 648 const char __user *ubuf, in ath11k_write_file_enable_cfr() argument 655 if (kstrtouint_from_user(ubuf, count, 0, &enable_cfr)) in ath11k_write_file_enable_cfr() 691 const char __user *ubuf, in ath11k_write_file_cfr_unassoc() argument 704 simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, ubuf, count); in ath11k_write_file_cfr_unassoc() 773 char __user *ubuf, in ath11k_read_file_cfr_unassoc() argument 794 return simple_read_from_buffer(ubuf, count, ppos, buf, len); in ath11k_read_file_cfr_unassoc()
|
| /freebsd/crypto/openssh/ |
| H A D | sftp-common.c | 220 char buf[1024], lc[8], mode[11+1], tbuf[12+1], ubuf[11+1], gbuf[11+1]; in ls_file() local 227 snprintf(ubuf, sizeof ubuf, "%u", (u_int)st->st_uid); in ls_file() 228 user = ubuf; in ls_file()
|
| /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/sys/compat/linux/ |
| H A D | linux_stats.c | 187 newstat_copyout(struct stat *buf, void *ubuf) in newstat_copyout() argument 209 return (copyout(&tbuf, ubuf, sizeof(tbuf))); in newstat_copyout() 262 old_stat_copyout(struct stat *buf, void *ubuf) in old_stat_copyout() argument 286 return (copyout(&lbuf, ubuf, sizeof(lbuf))); in old_stat_copyout() 564 stat64_copyout(struct stat *buf, void *ubuf) in stat64_copyout() argument 594 return (copyout(&lbuf, ubuf, sizeof(lbuf))); in stat64_copyout() 718 statx_copyout(struct stat *buf, void *ubuf) in statx_copyout() argument 747 return (copyout(&tbuf, ubuf, sizeof(tbuf))); in statx_copyout()
|
| /freebsd/crypto/krb5/src/kadmin/server/ |
| H A D | ipropd_svc.c | 261 char *ubuf = 0; in ipropx_resync() local 343 if (asprintf(&ubuf, "%s -r %s dump -i%d -c %s", kdb5_util, in ipropx_resync() 372 DPRINT("%s: run `%s' ...\n", whoami, ubuf); in ipropx_resync() 375 p = popen(ubuf, "w"); in ipropx_resync() 441 free(ubuf); in ipropx_resync()
|
| /freebsd/sys/compat/linuxkpi/common/src/ |
| H A D | linux_simple_attr.c | 150 simple_attr_write_common(struct file *filp, const char __user *ubuf, in simple_attr_write_common() argument 167 if (copy_from_user(buf, ubuf, write_size) != 0) { in simple_attr_write_common()
|
| H A D | linux_seq_file.c | 43 seq_read(struct linux_file *f, char __user *ubuf, size_t size, off_t *ppos) in seq_read() argument 110 rc = copy_to_user(ubuf, sbuf_data(sbuf), todo); in seq_read()
|
| /freebsd/sys/contrib/dev/athk/ath10k/ |
| H A D | debug.c | 1895 const char __user *ubuf, in ath10k_write_pktlog_filter() argument 1902 if (kstrtouint_from_user(ubuf, count, 0, &filter)) in ath10k_write_pktlog_filter() 1941 static ssize_t ath10k_read_pktlog_filter(struct file *file, char __user *ubuf, in ath10k_read_pktlog_filter() argument 1953 return simple_read_from_buffer(ubuf, count, ppos, buf, len); in ath10k_read_pktlog_filter() 1963 const char __user *ubuf, in ath10k_write_quiet_period() argument 1969 if (kstrtouint_from_user(ubuf, count, 0, &period)) in ath10k_write_quiet_period() 1985 static ssize_t ath10k_read_quiet_period(struct file *file, char __user *ubuf, in ath10k_read_quiet_period() argument 1997 return simple_read_from_buffer(ubuf, count, ppos, buf, len); in ath10k_read_quiet_period() 2007 const char __user *ubuf, in ath10k_write_btcoex() argument 2015 ret = kstrtobool_from_user(ubuf, count, &val); in ath10k_write_btcoex() [all …]
|
| /freebsd/contrib/less/ |
| H A D | prompt.c | 107 char ubuf[MAX_UTF_CHAR_LEN+1]; in ap_estr() local 115 char *up = ubuf; in ap_estr() 118 ps = ubuf; in ap_estr()
|
| H A D | output.c | 473 static char ubuf[MAX_UTF_CHAR_LEN]; in putchr() 481 ubuf[ubuf_index++] = c; in putchr() 484 c = get_wchar(ubuf) & 0xFF; in putchr()
|
| /freebsd/sys/compat/lindebugfs/ |
| H A D | lindebugfs.c | 667 fops_str_read(struct file *filp, char __user *ubuf, size_t read_size, in fops_str_read() argument 692 ret = simple_read_from_buffer(ubuf, read_size, ppos, in fops_str_read() 775 fops_blob_read(struct file *filp, char __user *ubuf, size_t read_size, loff_t *ppos) in fops_blob_read() argument 785 return (simple_read_from_buffer(ubuf, read_size, ppos, blob->data, blob->size)); in fops_blob_read()
|
| /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 | 419 cbq_getqstats(struct pf_altq *a, void *ubuf, int *nbytes, int version) in cbq_getqstats() argument 437 if ((error = copyout((caddr_t)&stats, ubuf, sizeof(stats))) != 0) in cbq_getqstats()
|
| /freebsd/contrib/mandoc/ |
| H A D | roff.c | 1356 char ubuf[24]; /* buffer to print a number */ in roff_expand() local 1520 ubuf[0] = iendarg > iarg ? '1' : '0'; in roff_expand() 1521 ubuf[1] = '\0'; in roff_expand() 1522 res = ubuf; in roff_expand() 1526 ubuf[0] = iendarg > iarg && iend > iendarg && in roff_expand() 1530 ubuf[1] = '\0'; in roff_expand() 1531 res = ubuf; in roff_expand() 1543 (void)snprintf(ubuf, sizeof(ubuf), "%d", in roff_expand() 1547 ubuf[0] = '\0'; in roff_expand() 1548 res = ubuf; in roff_expand() [all …]
|