/linux-4.4.14/tools/perf/util/ |
H A D | strbuf.h | 10 * 1. the ->buf member is always malloc-ed, hence strbuf's can be used to 19 * member to be a valid C-string. Every strbuf function ensure this 34 * missing API to the strbuf module is the way to go. 45 struct strbuf { struct 53 /*----- strbuf life cycle -----*/ 54 extern void strbuf_init(struct strbuf *buf, ssize_t hint); 55 extern void strbuf_release(struct strbuf *); 56 extern char *strbuf_detach(struct strbuf *, size_t *); 58 /*----- strbuf size related -----*/ strbuf_avail() 59 static inline ssize_t strbuf_avail(const struct strbuf *sb) { strbuf_avail() 63 extern void strbuf_grow(struct strbuf *, size_t); 65 static inline void strbuf_setlen(struct strbuf *sb, size_t len) { strbuf_setlen() 74 static inline void strbuf_addch(struct strbuf *sb, int c) { strbuf_addch() 80 extern void strbuf_remove(struct strbuf *, size_t pos, size_t len); 82 extern void strbuf_add(struct strbuf *, const void *, size_t); strbuf_addstr() 83 static inline void strbuf_addstr(struct strbuf *sb, const char *s) { strbuf_addstr() 88 extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...); 89 extern void strbuf_addv(struct strbuf *sb, const char *fmt, va_list ap); 92 extern ssize_t strbuf_read(struct strbuf *, int fd, ssize_t hint);
|
H A D | strbuf.c | 16 * initialized strbuf. 20 void strbuf_init(struct strbuf *sb, ssize_t hint) strbuf_init() 28 void strbuf_release(struct strbuf *sb) strbuf_release() 36 char *strbuf_detach(struct strbuf *sb, size_t *sz) strbuf_detach() 45 void strbuf_grow(struct strbuf *sb, size_t extra) strbuf_grow() 54 static void strbuf_splice(struct strbuf *sb, size_t pos, size_t len, strbuf_splice() 73 void strbuf_remove(struct strbuf *sb, size_t pos, size_t len) strbuf_remove() 78 void strbuf_add(struct strbuf *sb, const void *data, size_t len) strbuf_add() 85 void strbuf_addv(struct strbuf *sb, const char *fmt, va_list ap) strbuf_addv() 108 void strbuf_addf(struct strbuf *sb, const char *fmt, ...) strbuf_addf() 117 ssize_t strbuf_read(struct strbuf *sb, int fd, ssize_t hint) strbuf_read()
|
H A D | quote.c | 20 static void sq_quote_buf(struct strbuf *dst, const char *src) sq_quote_buf() 42 void sq_quote_argv(struct strbuf *dst, const char** argv, size_t maxlen) sq_quote_argv()
|
H A D | exec_cmd.c | 15 struct strbuf d = STRBUF_INIT; system_path() 70 static void add_path(struct strbuf *out, const char *path) add_path() 85 struct strbuf new_path = STRBUF_INIT; setup_path()
|
H A D | quote.h | 27 extern void sq_quote_argv(struct strbuf *, const char **argv, size_t maxlen);
|
H A D | dwarf-aux.h | 124 extern int die_get_typename(Dwarf_Die *vr_die, struct strbuf *buf); 127 extern int die_get_varname(Dwarf_Die *vr_die, struct strbuf *buf); 129 struct strbuf *buf);
|
H A D | cache.h | 6 #include "strbuf.h"
|
H A D | dwarf-aux.c | 897 * @buf: a strbuf for result type name 904 int die_get_typename(Dwarf_Die *vr_die, struct strbuf *buf) die_get_typename() 943 * @buf: a strbuf for type and variable name 947 int die_get_varname(Dwarf_Die *vr_die, struct strbuf *buf) die_get_varname() 966 * @buf: a strbuf for variable byte offset range 972 struct strbuf *buf) die_get_var_innermost_scope() 1027 * @buf: a strbuf for type and variable name and byte offset range 1032 int die_get_var_range(Dwarf_Die *sp_die, Dwarf_Die *vr_die, struct strbuf *buf) die_get_var_range()
|
H A D | help.c | 124 struct strbuf buf = STRBUF_INIT; list_commands_in_dir()
|
H A D | parse-options.c | 10 static struct strbuf error_buf = STRBUF_INIT; 508 struct strbuf buf = STRBUF_INIT; parse_options_subcommand()
|
H A D | header.c | 23 #include "strbuf.h" 1585 struct strbuf sb; process_cpu_topology() 1695 struct strbuf sb; process_numa_topology() 1755 struct strbuf sb; process_pmu_mappings()
|
H A D | pmu.c | 634 struct strbuf buf; pmu_formats_string()
|
H A D | probe-event.c | 2162 struct strbuf *result) perf_probe_event__sprintf() 2202 struct strbuf buf = STRBUF_INIT; show_perf_probe_event()
|
H A D | probe-finder.c | 1296 struct strbuf buf; collect_variables_cb()
|
/linux-4.4.14/arch/sparc/kernel/ |
H A D | iommu.c | 269 struct strbuf *strbuf; dma_4u_map_page() local 277 strbuf = dev->archdata.stc; dma_4u_map_page() 300 if (strbuf->strbuf_enabled) dma_4u_map_page() 320 static void strbuf_flush(struct strbuf *strbuf, struct iommu *iommu, strbuf_flush() argument 326 if (strbuf->strbuf_ctxflush && strbuf_flush() 331 flushreg = strbuf->strbuf_ctxflush; strbuf_flush() 332 matchreg = STC_CTXMATCH_ADDR(strbuf, ctx); strbuf_flush() 357 iommu_write(strbuf->strbuf_pflush, vaddr); strbuf_flush() 368 STC_FLUSHFLAG_INIT(strbuf); strbuf_flush() 369 iommu_write(strbuf->strbuf_fsync, strbuf->strbuf_flushflag_pa); strbuf_flush() 373 while (!STC_FLUSHFLAG_SET(strbuf)) { strbuf_flush() 391 struct strbuf *strbuf; dma_4u_unmap_page() local 402 strbuf = dev->archdata.stc; dma_4u_unmap_page() 418 if (strbuf->strbuf_enabled) dma_4u_unmap_page() 419 strbuf_flush(strbuf, iommu, bus_addr, ctx, dma_4u_unmap_page() 442 struct strbuf *strbuf; dma_4u_map_sg() local 449 strbuf = dev->archdata.stc; dma_4u_map_sg() 459 if (strbuf->strbuf_enabled) dma_4u_map_sg() 614 struct strbuf *strbuf; dma_4u_unmap_sg() local 620 strbuf = dev->archdata.stc; dma_4u_unmap_sg() 643 if (strbuf->strbuf_enabled) dma_4u_unmap_sg() 644 strbuf_flush(strbuf, iommu, dma_handle, ctx, dma_4u_unmap_sg() 665 struct strbuf *strbuf; dma_4u_sync_single_for_cpu() local 669 strbuf = dev->archdata.stc; dma_4u_sync_single_for_cpu() 671 if (!strbuf->strbuf_enabled) dma_4u_sync_single_for_cpu() 683 strbuf->strbuf_ctxflush) { dma_4u_sync_single_for_cpu() 693 strbuf_flush(strbuf, iommu, bus_addr, ctx, npages, direction); dma_4u_sync_single_for_cpu() 703 struct strbuf *strbuf; dma_4u_sync_sg_for_cpu() local 709 strbuf = dev->archdata.stc; dma_4u_sync_sg_for_cpu() 711 if (!strbuf->strbuf_enabled) dma_4u_sync_sg_for_cpu() 719 strbuf->strbuf_ctxflush) { dma_4u_sync_sg_for_cpu() 739 strbuf_flush(strbuf, iommu, bus_addr, ctx, npages, direction);
|
H A D | sbus.c | 478 /* XXX check iommu/strbuf for further error status XXX */ sysio_sbus_error_handler() 543 struct strbuf *strbuf; sbus_iommu_init() local 557 strbuf = kzalloc(sizeof(*strbuf), GFP_ATOMIC); sbus_iommu_init() 558 if (!iommu || !strbuf) sbus_iommu_init() 562 op->dev.archdata.stc = strbuf; sbus_iommu_init() 573 strbuf->strbuf_control = reg_base + STRBUF_CONTROL; sbus_iommu_init() 574 strbuf->strbuf_pflush = reg_base + STRBUF_PFLUSH; sbus_iommu_init() 575 strbuf->strbuf_fsync = reg_base + STRBUF_FSYNC; sbus_iommu_init() 577 strbuf->strbuf_enabled = 1; sbus_iommu_init() 579 strbuf->strbuf_flushflag = (volatile unsigned long *) sbus_iommu_init() 580 ((((unsigned long)&strbuf->__flushflag_buf[0]) sbus_iommu_init() 583 strbuf->strbuf_flushflag_pa = (unsigned long) sbus_iommu_init() 584 __pa(strbuf->strbuf_flushflag); sbus_iommu_init() 627 upa_writeq(control, strbuf->strbuf_control); sbus_iommu_init() 633 ptag = strbuf->strbuf_control + sbus_iommu_init() 635 ltag = strbuf->strbuf_control + sbus_iommu_init() 658 kfree(strbuf); sbus_iommu_init()
|
H A D | psycho_common.c | 36 struct strbuf *strbuf = &pbm->stc; psycho_check_stc_error() local 40 if (!strbuf->strbuf_control) psycho_check_stc_error() 43 err_base = strbuf->strbuf_err_stat; psycho_check_stc_error() 44 tag_base = strbuf->strbuf_tag_diag; psycho_check_stc_error() 45 line_base = strbuf->strbuf_line_diag; psycho_check_stc_error() 57 control = upa_readq(strbuf->strbuf_control); psycho_check_stc_error() 58 upa_writeq(control | PSYCHO_STRBUF_CTRL_DENAB, strbuf->strbuf_control); psycho_check_stc_error() 74 upa_writeq(control, strbuf->strbuf_control); psycho_check_stc_error()
|
H A D | pci_impl.h | 143 struct strbuf stc;
|
H A D | pci_schizo.c | 129 struct strbuf *strbuf = &pbm->stc; __schizo_check_stc_error_pbm() local 150 control = upa_readq(strbuf->strbuf_control); __schizo_check_stc_error_pbm() 152 strbuf->strbuf_control); __schizo_check_stc_error_pbm() 168 upa_writeq(control, strbuf->strbuf_control); __schizo_check_stc_error_pbm()
|
/linux-4.4.14/drivers/acpi/ |
H A D | proc.c | 99 char strbuf[5]; acpi_system_write_wakeup_device() local 105 if (copy_from_user(strbuf, buffer, count)) acpi_system_write_wakeup_device() 107 strbuf[count] = '\0'; acpi_system_write_wakeup_device() 108 sscanf(strbuf, "%s", str); acpi_system_write_wakeup_device()
|
/linux-4.4.14/scripts/dtc/ |
H A D | flattree.c | 259 void *etarget, struct data *strbuf, flatten_tree() 284 nameoff = stringtable_insert(strbuf, prop->name); for_each_property() 300 emit->cell(etarget, stringtable_insert(strbuf, "name")); 310 flatten_tree(child, emit, etarget, strbuf, vi); for_each_child() 376 struct data strbuf = empty_data; dt_to_blob() local 387 flatten_tree(bi->dt, &bin_emitter, &dtbuf, &strbuf, vi); dt_to_blob() 393 make_fdt_header(&fdt, vi, reservebuf.len, dtbuf.len, strbuf.len, dt_to_blob() 426 blob = data_merge(blob, strbuf); dt_to_blob() 449 static void dump_stringtable_asm(FILE *f, struct data strbuf) dump_stringtable_asm() argument 454 p = strbuf.val; dump_stringtable_asm() 456 while (p < (strbuf.val + strbuf.len)) { dump_stringtable_asm() 467 struct data strbuf = empty_data; dt_to_asm() local 553 flatten_tree(bi->dt, &asm_emitter, f, &strbuf, vi); dt_to_asm() 560 dump_stringtable_asm(f, strbuf); dt_to_asm() 577 data_free(strbuf); dt_to_asm() 679 struct inbuf *strbuf, int flags) flat_read_property() 688 name = flat_read_stringtable(strbuf, stroff); flat_read_property() 744 struct inbuf *strbuf, unflatten_tree() 770 prop = flat_read_property(dtbuf, strbuf, flags); unflatten_tree() 775 child = unflatten_tree(dtbuf,strbuf, flatname, flags); unflatten_tree() 813 struct inbuf dtbuf, strbuf; dt_from_blob() local 894 inbuf_init(&strbuf, blob + off_str, blob + off_str + size_str); dt_from_blob() 896 inbuf_init(&strbuf, blob + off_str, blob + totalsize); dt_from_blob() 922 tree = unflatten_tree(&dtbuf, &strbuf, "", flags); dt_from_blob() 258 flatten_tree(struct node *tree, struct emitter *emit, void *etarget, struct data *strbuf, struct version_info *vi) flatten_tree() argument 678 flat_read_property(struct inbuf *dtbuf, struct inbuf *strbuf, int flags) flat_read_property() argument 743 unflatten_tree(struct inbuf *dtbuf, struct inbuf *strbuf, const char *parent_flatname, int flags) unflatten_tree() argument
|
/linux-4.4.14/tools/perf/ |
H A D | builtin-help.c | 60 struct strbuf buffer = STRBUF_INIT; check_emacsclient_version() 110 struct strbuf man_page = STRBUF_INIT; exec_woman_emacs() 126 struct strbuf man_page = STRBUF_INIT; exec_man_konqueror() 165 struct strbuf shell_cmd = STRBUF_INIT; exec_man_cmd() 325 struct strbuf new_path = STRBUF_INIT; setup_man_path() 384 static int get_html_page_path(struct strbuf *page_path, const char *page) get_html_page_path() 417 struct strbuf page_path; /* it leaks but we exec bellow */ show_html_page()
|
H A D | builtin.h | 5 #include "util/strbuf.h"
|
H A D | perf.c | 306 struct strbuf buf; handle_alias() 453 struct strbuf cmd = STRBUF_INIT; execv_dashed_external()
|
/linux-4.4.14/net/tipc/ |
H A D | eth_media.c | 42 char *strbuf, int bufsz) tipc_eth_addr2str() 47 sprintf(strbuf, "%pM", addr->value); tipc_eth_addr2str() 41 tipc_eth_addr2str(struct tipc_media_addr *addr, char *strbuf, int bufsz) tipc_eth_addr2str() argument
|
H A D | bearer.h | 112 char *strbuf,
|
/linux-4.4.14/fs/hfs/ |
H A D | dir.c | 59 char strbuf[HFS_MAX_NAMELEN]; hfs_readdir() local 124 len = hfs_mac2asc(sb, strbuf, &fd.key->cat.CName); hfs_readdir() 131 if (!dir_emit(ctx, strbuf, len, hfs_readdir() 140 if (!dir_emit(ctx, strbuf, len, hfs_readdir()
|
/linux-4.4.14/arch/sparc/include/asm/ |
H A D | iommu_64.h | 45 struct strbuf { struct
|
/linux-4.4.14/fs/hfsplus/ |
H A D | dir.c | 136 char *strbuf; hfsplus_readdir() local 148 strbuf = kmalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_MAX_STRLEN + 1, GFP_KERNEL); hfsplus_readdir() 149 if (!strbuf) { hfsplus_readdir() 208 err = hfsplus_uni2asc(sb, &fd.key->cat.name, strbuf, &len); hfsplus_readdir() 222 if (!dir_emit(ctx, strbuf, len, hfsplus_readdir() 249 if (!dir_emit(ctx, strbuf, len, hfsplus_readdir() 278 kfree(strbuf); hfsplus_readdir()
|
H A D | xattr.c | 695 char *strbuf; hfsplus_listxattr() local 715 strbuf = kmalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_ATTR_MAX_STRLEN + hfsplus_listxattr() 717 if (!strbuf) { hfsplus_listxattr() 751 strbuf, &xattr_name_len)) { hfsplus_listxattr() 758 if (can_list(strbuf)) hfsplus_listxattr() 759 res += name_len(strbuf, xattr_name_len); hfsplus_listxattr() 760 } else if (can_list(strbuf)) { hfsplus_listxattr() 761 if (size < (res + name_len(strbuf, xattr_name_len))) { hfsplus_listxattr() 766 strbuf, xattr_name_len); hfsplus_listxattr() 774 kfree(strbuf); hfsplus_listxattr()
|
/linux-4.4.14/drivers/net/wimax/i2400m/ |
H A D | control.c | 275 * @strbuf: buffer to place a formatted error message (unless NULL). 280 * and a message in @strbuf describing the error. 283 char *strbuf, size_t strbuf_size) i2400m_msg_check_status() 298 if (strbuf) i2400m_msg_check_status() 299 snprintf(strbuf, strbuf_size, "%s (%d)", str, status); i2400m_msg_check_status() 282 i2400m_msg_check_status(const struct i2400m_l3l4_hdr *l3l4_hdr, char *strbuf, size_t strbuf_size) i2400m_msg_check_status() argument
|
/linux-4.4.14/drivers/android/ |
H A D | binder.c | 2969 char strbuf[11]; binder_open() local 2971 snprintf(strbuf, sizeof(strbuf), "%u", proc->pid); binder_open() 2972 proc->debugfs_entry = debugfs_create_file(strbuf, S_IRUGO, binder_open()
|
/linux-4.4.14/drivers/video/fbdev/sis/ |
H A D | sis_main.c | 149 char strbuf[16], strbuf1[20]; sisfb_search_mode() local 181 sprintf(strbuf, "%ux%ux%u", xres, yres, depth); sisfb_search_mode() 182 nameptr = strbuf; sisfb_search_mode() 185 sprintf(strbuf, "%ux%ux%u", xres, yres, depth); sisfb_search_mode() 186 nameptr = strbuf; sisfb_search_mode() 190 sprintf(strbuf, "%ux%ux8", xres, yres); sisfb_search_mode() 191 nameptr = strbuf; sisfb_search_mode()
|
/linux-4.4.14/drivers/video/fbdev/aty/ |
H A D | atyfb_base.c | 3170 char strbuf[16]; aty_init_lcd() local 3272 sprintf(strbuf, "%d", aty_init_lcd() 3276 sprintf(strbuf, ",%d", aty_init_lcd() 3279 strcat(refresh_rates_buf, strbuf); aty_init_lcd()
|
/linux-4.4.14/drivers/scsi/ |
H A D | gdth.c | 201 static char strbuf[MAX_SERBUF+1]; variable 251 i = vsprintf(strbuf,fmt,args); ser_printk() 252 ser_puts(strbuf); ser_printk()
|