diff --git a/librz/arch/asm.c b/librz/arch/asm.c index 530ac183c1f..e02184063d9 100644 --- a/librz/arch/asm.c +++ b/librz/arch/asm.c @@ -438,7 +438,7 @@ static void unset_plugins_config(RZ_BORROW RzAsm *rz_asm, RZ_BORROW RzConfig *pc RzListIter *it; rz_list_foreach (pcfg->nodes, it, n) { if (!rz_config_rm(conf, n->name)) { - RZ_LOG_WARN("Failed to remove \"%s\" from the global config.", n->name) + RZ_LOG_WARN("Failed to remove \"%s\" from the global config.\n", n->name) } } } diff --git a/librz/arch/dwarf_process.c b/librz/arch/dwarf_process.c index c8cd0f793c7..7b6deece7b5 100644 --- a/librz/arch/dwarf_process.c +++ b/librz/arch/dwarf_process.c @@ -1795,7 +1795,7 @@ static bool store_base_type(void *u, const char *k, const void *v) { RzPVector *types = (RzPVector *)v; const ut32 len = rz_pvector_len(types); if (len == 0) { - RZ_LOG_WARN("BaseType %s has nothing", name); + RZ_LOG_WARN("BaseType %s has nothing\n", name); } else if (len == 1) { RzBaseType *t = rz_pvector_head(types); update_base_type(analysis->typedb, t); diff --git a/librz/arch/esil/esil.c b/librz/arch/esil/esil.c index a03bbeeb51e..147f434c7e9 100644 --- a/librz/arch/esil/esil.c +++ b/librz/arch/esil/esil.c @@ -888,7 +888,7 @@ static int esil_interrupt_linux_i386(RzAnalysisEsil *esil) { //move this into } if (sn != 0x80) { - RZ_LOG_ERROR("Interrupt 0x%x not handled.", sn); + RZ_LOG_ERROR("Interrupt 0x%x not handled.\n", sn); esil->trap = RZ_ANALYSIS_TRAP_UNHANDLED; esil->trap_code = sn; return -1; @@ -3093,7 +3093,7 @@ RZ_API int rz_analysis_esil_condition(RzAnalysisEsil *esil, const char *str) { } free(popped); } else { - RZ_LOG_ERROR("Cannot pop because The ESIL stack is empty"); + RZ_LOG_ERROR("Cannot pop because The ESIL stack is empty\n"); return -1; } return ret; diff --git a/librz/arch/isa/8051/8051_parse.c b/librz/arch/isa/8051/8051_parse.c index c46e46e8dbf..c54384a5934 100644 --- a/librz/arch/isa/8051/8051_parse.c +++ b/librz/arch/isa/8051/8051_parse.c @@ -101,7 +101,7 @@ static I8051OpAddressing *addressing_pattern1(const ut8 *buf) { } else if (lo >= 0x8 && lo <= 0xf) { return addressing_register(I8051_R0 + lo - 0x8); } - RZ_LOG_DEBUG("invalid addressing pattern 1") + RZ_LOG_DEBUG("invalid addressing pattern 1\n") return NULL; } @@ -122,7 +122,7 @@ static I8051OpAddressing *addressing_pattern11(const ut8 *buf) { case 0x3: return addressing_indirect(addressing_register(I8051_R0 + lo - 0x2)); default: - RZ_LOG_DEBUG("invalid addressing pattern 11") + RZ_LOG_DEBUG("invalid addressing pattern 11\n") return NULL; } } @@ -144,7 +144,7 @@ static I8051OpAddressing *addressing_pattern1_imm(const ut8 *buf) { } else if (lo >= 0x5) { return addressing_pattern1(buf); } - RZ_LOG_DEBUG("invalid addressing pattern 1_imm") + RZ_LOG_DEBUG("invalid addressing pattern 1_imm\n") return NULL; } @@ -526,4 +526,4 @@ RZ_IPI I8051Op *rz_8051_op_parse(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL con } return op; -} \ No newline at end of file +} diff --git a/librz/arch/isa/pyc/opcode.c b/librz/arch/isa/pyc/opcode.c index e59099c5808..8593ce21607 100644 --- a/librz/arch/isa/pyc/opcode.c +++ b/librz/arch/isa/pyc/opcode.c @@ -333,6 +333,6 @@ void(rm_op)(struct op_parameter par) { op_obj->op_name = rz_str_newf("<%u>", par.op_code); op_obj->type = op_obj->op_pop = op_obj->op_push = 0; } else { - RZ_LOG_ERROR("Error in rm_op() while constructing opcodes for .pyc file: \n .op_code = %u, .op_name = %s", par.op_code, par.op_name); + RZ_LOG_ERROR("Error in rm_op() while constructing opcodes for .pyc file: \n .op_code = %u, .op_name = %s\n", par.op_code, par.op_name); } } diff --git a/librz/arch/isa/x86/x86_il.c b/librz/arch/isa/x86/x86_il.c index 1cd8a7b645f..1e36f7dad7c 100644 --- a/librz/arch/isa/x86/x86_il.c +++ b/librz/arch/isa/x86/x86_il.c @@ -340,7 +340,7 @@ void label_port(RzILVM *vm, RzILOpEffect *op); RZ_IPI bool rz_x86_il_opcode(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisOp *aop, ut64 pc, RZ_BORROW RZ_NONNULL const X86ILIns *ins) { rz_return_val_if_fail(analysis && aop && ins && ins->ins_size > 0, false); if (ins->mnem >= X86_INS_ENDING) { - RZ_LOG_ERROR("RzIL: x86: Invalid instruction type %d", ins->mnem); + RZ_LOG_ERROR("RzIL: x86: Invalid instruction type %d\n", ins->mnem); return false; } diff --git a/librz/arch/isa_gnu/z80/z80asm.c b/librz/arch/isa_gnu/z80/z80asm.c index 8e24f6a359f..bf7327736c2 100644 --- a/librz/arch/isa_gnu/z80/z80asm.c +++ b/librz/arch/isa_gnu/z80/z80asm.c @@ -170,7 +170,7 @@ static void readlabel(Z80AssemblerState *state, const char **p, int store, int s return; } if (pos == *p) { - RZ_LOG_ERROR("assembler: z80: `:' found without a label"); + RZ_LOG_ERROR("assembler: z80: `:' found without a label\n"); return; } if (!store) { diff --git a/librz/bin/dwarf/lists.c b/librz/bin/dwarf/lists.c index 87410a5ff05..f42f200a723 100644 --- a/librz/bin/dwarf/lists.c +++ b/librz/bin/dwarf/lists.c @@ -16,7 +16,7 @@ RZ_IPI bool ListsHdr_parse(RzBinDwarfListsHdr *hdr, RzBinEndianReader *R) { U8_OR_RET_FALSE(hdr->encoding.address_size); U8_OR_RET_FALSE(hdr->segment_selector_size); if (hdr->segment_selector_size != 0) { - RZ_LOG_ERROR("Segment selector size not supported: %d", hdr->segment_selector_size); + RZ_LOG_ERROR("Segment selector size not supported: %d\n", hdr->segment_selector_size); return false; } U_OR_RET_FALSE(32, hdr->offset_entry_count); diff --git a/librz/bin/dwarf/loclists.c b/librz/bin/dwarf/loclists.c index 57157fae8bd..54fbd0a671a 100644 --- a/librz/bin/dwarf/loclists.c +++ b/librz/bin/dwarf/loclists.c @@ -103,7 +103,7 @@ static bool RawLocListEntry_parse( RET_FALSE_IF_FAIL(parse_data(R, &raw->start_length.data, encoding)); break; case DW_LLE_GNU_view_pair: - RZ_LOG_ERROR("GNU_view_pair not implemented"); + RZ_LOG_ERROR("GNU_view_pair not implemented\n"); return false; } break; diff --git a/librz/bin/dwarf/op.c b/librz/bin/dwarf/op.c index 5e1f9bb273d..28087566ebd 100644 --- a/librz/bin/dwarf/op.c +++ b/librz/bin/dwarf/op.c @@ -1021,7 +1021,7 @@ static bool Evaluation_evaluate_one_operation( } case OPERATION_KIND_NOP: break; case OPERATION_KIND_PUSH_OBJECT_ADDRESS: { - OK_OR_ERR(self->object_address, RZ_LOG_ERROR("object address not set")); + OK_OR_ERR(self->object_address, RZ_LOG_ERROR("object address not set\n")); RzBinDwarfValue v = { .type = RzBinDwarfValueType_GENERIC, .generic = *self->object_address, @@ -1356,7 +1356,7 @@ RZ_API RZ_BORROW RzVector /**/ *rz_bin_dwarf_evaluation_result( if (self->state.kind == EVALUATION_STATE_COMPLETE) { return &self->result; } - RZ_LOG_ERROR("Called `Evaluation::result` on an `Evaluation` that has not been completed"); + RZ_LOG_ERROR("Called `Evaluation::result` on an `Evaluation` that has not been completed\n"); return NULL; } diff --git a/librz/bin/dwarf/unit.c b/librz/bin/dwarf/unit.c index 50e528253ed..ae43b227352 100644 --- a/librz/bin/dwarf/unit.c +++ b/librz/bin/dwarf/unit.c @@ -98,7 +98,7 @@ static bool CU_attrs_parse( .encoding = &cu->hdr.encoding, }; if (!RzBinDwarfAttr_parse(ctx->info->R, &attr, &opt)) { - RZ_LOG_ERROR("DWARF: failed attr: 0x%" PFMT64x " %s [%s]\n ", + RZ_LOG_ERROR("DWARF: failed attr: 0x%" PFMT64x " %s [%s]\n", die->offset, rz_bin_dwarf_attr(spec->at), rz_bin_dwarf_form(spec->form)); continue; } diff --git a/librz/bin/dwarf/value.c b/librz/bin/dwarf/value.c index a77146ccfed..64d78b90cc7 100644 --- a/librz/bin/dwarf/value.c +++ b/librz/bin/dwarf/value.c @@ -81,7 +81,7 @@ RZ_IPI bool ValueType_from_encoding(DW_ATE encoding, ut64 byte_size, RzBinDwarfV case DW_ATE_lo_user: case DW_ATE_hi_user: default: - RZ_LOG_VERBOSE("Unsupported encoding: %d", encoding); + RZ_LOG_VERBOSE("Unsupported encoding: %d\n", encoding); return false; } if (value_type == -1) { diff --git a/librz/bin/format/elf/elf_strtab.c b/librz/bin/format/elf/elf_strtab.c index 8abed1b04a3..2cc9f219b15 100644 --- a/librz/bin/format/elf/elf_strtab.c +++ b/librz/bin/format/elf/elf_strtab.c @@ -41,7 +41,7 @@ RZ_OWN RzBinElfStrtab *Elf_(rz_bin_elf_strtab_new)(RZ_NONNULL ELFOBJ *bin, ut64 } if (result->data[0] != '\0' || result->data[size - 1] != '\0') { - RZ_LOG_WARN("String table at 0x%" PFMT64x " should start and end by a NULL byte", offset); + RZ_LOG_WARN("String table at 0x%" PFMT64x " should start and end by a NULL byte\n", offset); Elf_(rz_bin_elf_strtab_free)(result); return NULL; } diff --git a/librz/bin/format/mach0/mach0.c b/librz/bin/format/mach0/mach0.c index c190ed492d1..cd26ffb7963 100644 --- a/librz/bin/format/mach0/mach0.c +++ b/librz/bin/format/mach0/mach0.c @@ -2751,7 +2751,7 @@ size_t MACH0_(imports_count)(struct MACH0_(obj_t) * bin) { return MACH0_(chained_imports_count)(bin); } else { if (bin->dysymtab.nundefsym > bin->nsymtab) { - RZ_LOG_ERROR("Invalid nundefsym value in LC_DYSYMTAB"); + RZ_LOG_ERROR("Invalid nundefsym value in LC_DYSYMTAB\n"); return 0; } return bin->dysymtab.nundefsym; diff --git a/librz/bin/format/mach0/mach0_chained_fixups.c b/librz/bin/format/mach0/mach0_chained_fixups.c index a56f7e1b1da..50c45c8b8b9 100644 --- a/librz/bin/format/mach0/mach0_chained_fixups.c +++ b/librz/bin/format/mach0/mach0_chained_fixups.c @@ -278,11 +278,11 @@ static void reconstruct_threaded_bind(ut64 paddr, ut64 vaddr, st64 addend, ut8 r ReconstructThreadedCtx *ctx = user; struct mach0_chained_fixups_t *cf = &ctx->bin->chained_fixups; if (cf->imports_format != DYLD_CHAINED_IMPORT_THREADED) { - RZ_LOG_ERROR("Missing BIND_SUBOPCODE_THREADED_SET_BIND_ORDINAL_TABLE_SIZE_ULEB before bind"); + RZ_LOG_ERROR("Missing BIND_SUBOPCODE_THREADED_SET_BIND_ORDINAL_TABLE_SIZE_ULEB before bind\n"); return; } if (sym_ord >= rz_vector_len(&cf->imports)) { - RZ_LOG_ERROR("Imports overflow BIND_SUBOPCODE_THREADED_SET_BIND_ORDINAL_TABLE_SIZE_ULEB value"); + RZ_LOG_ERROR("Imports overflow BIND_SUBOPCODE_THREADED_SET_BIND_ORDINAL_TABLE_SIZE_ULEB value\n"); return; } RzDyldChainedImportThreaded *imp = rz_vector_index_ptr(&cf->imports, sym_ord); diff --git a/librz/bin/format/mz/mz.c b/librz/bin/format/mz/mz.c index 35fde90d9ed..e24e1c64019 100644 --- a/librz/bin/format/mz/mz.c +++ b/librz/bin/format/mz/mz.c @@ -232,7 +232,6 @@ static int rz_bin_mz_init_hdr(struct rz_bin_mz_obj_t *bin) { int relocations_size, dos_file_size; MZ_image_dos_header *mz; if (!(mz = RZ_NEW0(MZ_image_dos_header))) { - RZ_LOG_ERROR("Cannot allocate MZ_image_dos_header"); return false; } if (!read_mz_header(mz, bin->b)) { diff --git a/librz/bin/format/objc/mach0_classes.c b/librz/bin/format/objc/mach0_classes.c index 908c12f769e..e912b3b12e3 100644 --- a/librz/bin/format/objc/mach0_classes.c +++ b/librz/bin/format/objc/mach0_classes.c @@ -1178,7 +1178,7 @@ RZ_API void MACH0_(get_class_t)(mach0_ut p, RzBinFile *bf, RzBuffer *buf, RzBinC #if SWIFT_SUPPORT if (q(c.data + n_value) & 7) { - RZ_LOG_INFO("This is a Swift class"); + RZ_LOG_INFO("This is a Swift class\n"); } #endif if (!is_meta_class && !dupe) { diff --git a/librz/bin/format/pe/dotnet.c b/librz/bin/format/pe/dotnet.c index fbe0ef9ed28..69b2d548668 100644 --- a/librz/bin/format/pe/dotnet.c +++ b/librz/bin/format/pe/dotnet.c @@ -270,7 +270,7 @@ static int read_image_metadata_tilde_header(RzBuffer *b, ut64 addr, Pe_image_clr #define TRY_SEEK(rowsize, rowcountname) \ if (rz_buf_seek(b, (rowsize) * (st64)rowcounts->rowcountname, RZ_BUF_CUR) < 0) { \ - RZ_LOG_WARN("seeking #rowcountname (size %d)", rowsize); \ + RZ_LOG_WARN("seeking #rowcountname (size %d)\n", rowsize); \ goto error; \ } diff --git a/librz/bin/format/pe/pe_security.c b/librz/bin/format/pe/pe_security.c index 5bd96c6d5f2..19b31aff8c1 100644 --- a/librz/bin/format/pe/pe_security.c +++ b/librz/bin/format/pe/pe_security.c @@ -109,7 +109,7 @@ int PE_(bin_pe_init_security)(RzBinPEObj *bin) { } cert->dwLength += (8 - (cert->dwLength & 7)) & 7; // align32 if (offset + cert->dwLength > paddr + size) { - RZ_LOG_INFO("Invalid certificate entry"); + RZ_LOG_INFO("Invalid certificate entry\n"); RZ_FREE(cert); return false; } diff --git a/librz/bin/format/pyc/marshal.c b/librz/bin/format/pyc/marshal.c index 4a0a0dbbfe6..69d25542c75 100644 --- a/librz/bin/format/pyc/marshal.c +++ b/librz/bin/format/pyc/marshal.c @@ -238,7 +238,7 @@ static pyc_object *get_stringref_object(RzBinPycObj *pyc, RzBuffer *buffer) { n = get_st32(buffer, &error); if (n >= rz_list_length(pyc->interned_table)) { - RZ_LOG_ERROR("bad marshal data (string ref out of range)"); + RZ_LOG_ERROR("bad marshal data (string ref out of range)\n"); return NULL; } if (error) { @@ -405,7 +405,7 @@ static pyc_object *get_string_object(RzBuffer *buffer) { n = get_ut32(buffer, &error); if (n > ST32_MAX) { - RZ_LOG_ERROR("bad marshal data (string size out of range)"); + RZ_LOG_ERROR("bad marshal data (string size out of range)\n"); return NULL; } if (error) { @@ -452,7 +452,7 @@ static pyc_object *get_unicode_object(RzBinPycObj *pyc, RzBuffer *buffer) { n = get_ut32(buffer, &error); if (n > ST32_MAX) { - RZ_LOG_ERROR("bad marshal data (unicode size out of range)"); + RZ_LOG_ERROR("bad marshal data (unicode size out of range)\n"); return NULL; } if (error) { @@ -481,7 +481,7 @@ static pyc_object *get_interned_object(RzBinPycObj *pyc, RzBuffer *buffer) { n = get_ut32(buffer, &error); if (n > ST32_MAX) { - RZ_LOG_ERROR("bad marshal data (string size out of range)"); + RZ_LOG_ERROR("bad marshal data (string size out of range)\n"); return NULL; } if (error) { diff --git a/librz/bin/format/xnu/rz_cf_dict.c b/librz/bin/format/xnu/rz_cf_dict.c index 16c10ab6069..6133c1b879f 100644 --- a/librz/bin/format/xnu/rz_cf_dict.c +++ b/librz/bin/format/xnu/rz_cf_dict.c @@ -207,7 +207,7 @@ RZ_API RzCFValueDict *rz_cf_value_dict_parse(RzBuffer *file_buf, ut64 offset, ut if (next_state->phase == RZ_CF_STATE_IN_DICT && state->phase == RZ_CF_STATE_IN_KEY) { if (!content) { - RZ_LOG_ERROR("NULL key is not supported"); + RZ_LOG_ERROR("NULL key is not supported\n"); goto beach; } next_state->key = content; @@ -219,25 +219,25 @@ RZ_API RzCFValueDict *rz_cf_value_dict_parse(RzBuffer *file_buf, ut64 offset, ut if (idlist && state->idstate == RZ_CF_ID_STATE_REF) { value = rz_list_get_n(idlist, (int)state->id); if (!value) { - RZ_LOG_ERROR("Missing value for IDREF %" PFMT32u, state->id); + RZ_LOG_ERROR("Missing value for IDREF %" PFMT32u "\n", state->id); goto beach; } if (state->phase == RZ_CF_STATE_IN_DICT) { if (rz_list_length(state->dict->pairs) != 0) { - RZ_LOG_ERROR("Dict with IDREF already has elements"); + RZ_LOG_ERROR("Dict with IDREF already has elements\n"); goto beach; } rz_cf_value_dict_free(state->dict); state->dict = NULL; } else if (state->phase == RZ_CF_STATE_IN_ARRAY) { if (rz_list_length(state->dict->pairs) != 0) { - RZ_LOG_ERROR("Array with IDREF already has elements"); + RZ_LOG_ERROR("Array with IDREF already has elements\n"); goto beach; } rz_cf_value_array_free(state->array); state->array = NULL; } else if (state->phase == RZ_CF_STATE_IN_SCALAR && content) { - RZ_LOG_ERROR("Element with IDREF already has content"); + RZ_LOG_ERROR("Element with IDREF already has content\n"); goto beach; } value = rz_cf_value_clone(value); @@ -287,7 +287,7 @@ RZ_API RzCFValueDict *rz_cf_value_dict_parse(RzBuffer *file_buf, ut64 offset, ut if (value) { rz_list_insert(idlist, state->id, value); } else { - RZ_LOG_WARN("Missing value for ID %" PFMT32u, state->id); + RZ_LOG_WARN("Missing value for ID %" PFMT32u "\n", state->id); } } } diff --git a/librz/bin/p/bin_elf.inc b/librz/bin/p/bin_elf.inc index 0830fc813d9..ebd7f2accf0 100644 --- a/librz/bin/p/bin_elf.inc +++ b/librz/bin/p/bin_elf.inc @@ -68,7 +68,7 @@ static ut32 hexagon_get_bitmask_r6(ut32 insn) { return hex_rel6_x_masks[i].relocMask; } } - RZ_LOG_ERROR("Unrecognized instruction for 6_X relocation: 0x%x", insn); + RZ_LOG_ERROR("Unrecognized instruction for 6_X relocation: 0x%x\n", insn); return 0; } @@ -133,7 +133,7 @@ static ut32 hexagon_get_bitmask_r16(ut32 insn) { } } - RZ_LOG_ERROR("Unrecognized instruction for 16_X relocation: 0x%x", insn); + RZ_LOG_ERROR("Unrecognized instruction for 16_X relocation: 0x%x\n", insn); return 0; } @@ -830,7 +830,7 @@ static void patch_reloc_hexagon(RZ_INOUT RzBuffer *buf_patched, const ut64 patch switch (rel_type) { default: - RZ_LOG_WARN("Patching for reloc type %d not implemented.", rel_type); + RZ_LOG_WARN("Patching for reloc type %d not implemented.\n", rel_type); rz_warn_if_reached(); // For more implementetations check out the LLVM src: // https://github.com/llvm/llvm-project/blob/abc17a67519747be36f1fd03e227c5103da4c677/lld/ELF/Arch/Hexagon.cpp diff --git a/librz/core/agraph.c b/librz/core/agraph.c index be2a55ebc8b..8774c8d24cf 100644 --- a/librz/core/agraph.c +++ b/librz/core/agraph.c @@ -4361,7 +4361,7 @@ RZ_IPI int rz_core_visual_graph(RzCore *core, RzAGraph *g, RzAnalysisFunction *_ } RzGraph *graph = rz_core_graph(core, RZ_CORE_GRAPH_TYPE_FUNCALL, function->addr); if (!graph) { - RZ_LOG_INFO("failed to compute callgraph"); + RZ_LOG_INFO("failed to compute callgraph\n"); break; } rz_core_agraph_reset(core); diff --git a/librz/core/analysis_objc.c b/librz/core/analysis_objc.c index ae61c760945..c77cc1f0a1c 100644 --- a/librz/core/analysis_objc.c +++ b/librz/core/analysis_objc.c @@ -605,7 +605,7 @@ RZ_API void rz_core_analysis_objc_stubs(RzCore *core) { goto found; } } - RZ_LOG_ERROR("__objc_stubs section not found for analysis"); + RZ_LOG_ERROR("__objc_stubs section not found for analysis\n"); return; found: analyze_objc_stubs(core, stubs_section->vaddr, stubs_section->vsize); diff --git a/librz/core/cconfig.c b/librz/core/cconfig.c index f3a5ff4a4aa..4653e248c07 100644 --- a/librz/core/cconfig.c +++ b/librz/core/cconfig.c @@ -2185,7 +2185,7 @@ static bool cb_pager(void *user, void *data) { RzCore *core = (RzCore *)user; RzConfigNode *node = (RzConfigNode *)data; if (!strcmp(node->value, "?")) { - RZ_LOG_ERROR("usage: scr.pager must be '..' for internal less, or the path to a program in $PATH"); + RZ_LOG_ERROR("usage: scr.pager must be '..' for internal less, or the path to a program in $PATH\n"); return false; } /* Let cons know we have a new pager. */ diff --git a/librz/core/cfile.c b/librz/core/cfile.c index cbe5da44390..eeb8a69faa4 100644 --- a/librz/core/cfile.c +++ b/librz/core/cfile.c @@ -381,7 +381,7 @@ RZ_API bool rz_core_file_reopen(RzCore *core, const char *args, int perm, int lo } } if (!ofilepath) { - RZ_LOG_ERROR("Unknown file path"); + RZ_LOG_ERROR("Unknown file path\n"); free(obinfilepath); return false; } @@ -446,7 +446,7 @@ RZ_API bool rz_core_file_reopen(RzCore *core, const char *args, int perm, int lo ret = rz_core_bin_load(core, obinfilepath, baddr); rz_core_bin_update_arch_bits(core); if (!ret) { - RZ_LOG_ERROR("Error: Failed to reload rbin for: '%s'", path); + RZ_LOG_ERROR("Error: Failed to reload rbin for: '%s'\n", path); } origoff = rz_num_math(core->num, "entry0"); } diff --git a/librz/core/cil.c b/librz/core/cil.c index 1f9ffad9da0..2e65b882baa 100644 --- a/librz/core/cil.c +++ b/librz/core/cil.c @@ -492,7 +492,7 @@ RZ_IPI bool rz_core_analysis_il_vm_set(RzCore *core, const char *var_name, ut64 case RZ_IL_TYPE_PURE_FLOAT: // TODO : ut64 value is enough for user input ? // TODO : type is different with given value ? - RZ_LOG_ERROR("RzIL: Set float var from user input not supported yet"); + RZ_LOG_ERROR("RzIL: Set float var from user input not supported yet\n"); return false; } if (val) { @@ -764,8 +764,8 @@ RZ_IPI bool rz_core_analysis_il_step_with_events(RzCore *core, PJ *pj) { bool evt_write = rz_config_get_b(core->config, "rzil.step.events.write"); if (!evt_read && !evt_write) { - RZ_LOG_ERROR("RzIL: cannot print events when all the events are disabled."); - RZ_LOG_ERROR("RzIL: please set 'rzil.step.events.read' or/and 'rzil.step.events.write' to true and try again."); + RZ_LOG_ERROR("RzIL: cannot print events when all the events are disabled.\n"); + RZ_LOG_ERROR("RzIL: please set 'rzil.step.events.read' or/and 'rzil.step.events.write' to true and try again.\n"); return false; } diff --git a/librz/core/cmd/cmd.c b/librz/core/cmd/cmd.c index df11a7a4da9..c411b28ce87 100644 --- a/librz/core/cmd/cmd.c +++ b/librz/core/cmd/cmd.c @@ -751,7 +751,7 @@ static RzCmdStatus pointer_write(RzCore *core, const char *addr_arg, const char bool ok; ut64 addr = rz_num_math(core->num, addr_arg); if (core->num->nc.errors) { - RZ_LOG_ERROR("Could not convert address argument to number"); + RZ_LOG_ERROR("Could not convert address argument to number\n"); return RZ_CMD_STATUS_ERROR; } @@ -762,7 +762,7 @@ static RzCmdStatus pointer_write(RzCore *core, const char *addr_arg, const char // write a numerical value ut64 value = rz_num_math(core->num, value_arg); if (core->num->nc.errors) { - RZ_LOG_ERROR("Could not convert value argument to number"); + RZ_LOG_ERROR("Could not convert value argument to number\n"); return RZ_CMD_STATUS_ERROR; } @@ -3679,7 +3679,7 @@ DEFINE_HANDLE_TS_FCN_AND_SYMBOL(redirect_stmt) { is_html = true; is_append = true; } else { - RZ_LOG_ERROR("This should never happen, redirect_operator is no known type"); + RZ_LOG_ERROR("This should never happen, redirect_operator is no known type\n"); rz_warn_if_reached(); } diff --git a/librz/core/cmd/cmd_analysis.c b/librz/core/cmd/cmd_analysis.c index c2f4c981082..66217d0b84f 100644 --- a/librz/core/cmd/cmd_analysis.c +++ b/librz/core/cmd/cmd_analysis.c @@ -1516,7 +1516,7 @@ static void cmd_analysis_esil(RzCore *core, const char *input) { switch (input[2]) { case ' ': // "aeli" with arguments if (!rz_analysis_esil_load_interrupts_from_lib(esil, input + 3)) { - RZ_LOG_ERROR("core: Failed to load interrupts from '%s'.", input + 3); + RZ_LOG_ERROR("core: Failed to load interrupts from '%s'.\n", input + 3); } break; case 0: // "aeli" with no args @@ -3068,7 +3068,7 @@ RZ_IPI RzCmdStatus rz_analysis_function_vars_regs_handler(RzCore *core, int argc const char *vartype = argc > 3 ? argv[3] : "int"; RzRegItem *i = rz_reg_get(core->analysis->reg, argv[1], -1); if (!i) { - RZ_LOG_ERROR("core: Register not found"); + RZ_LOG_ERROR("core: Register not found\n"); return RZ_CMD_STATUS_ERROR; } char *error_msg = NULL; diff --git a/librz/core/cmd/cmd_debug.c b/librz/core/cmd/cmd_debug.c index 2c734cc2cd9..f43b92f3404 100644 --- a/librz/core/cmd/cmd_debug.c +++ b/librz/core/cmd/cmd_debug.c @@ -1461,7 +1461,7 @@ static void debug_trace_calls(RzCore *core, ut64 from, ut64 to, ut64 final_addr) int t = core->dbg->trace->enabled; if (rz_debug_is_dead(core->dbg)) { - RZ_LOG_ERROR("core: No process to debug."); + RZ_LOG_ERROR("core: No process to debug.\n"); return; } core->dbg->trace->enabled = 0; diff --git a/librz/core/cmd/cmd_eval.c b/librz/core/cmd/cmd_eval.c index 0062a0df92c..babf3c8828d 100644 --- a/librz/core/cmd/cmd_eval.c +++ b/librz/core/cmd/cmd_eval.c @@ -428,7 +428,7 @@ RZ_IPI RzCmdStatus rz_eval_bool_invert_handler(RzCore *core, int argc, const cha RZ_IPI RzCmdStatus rz_eval_editor_handler(RzCore *core, int argc, const char **argv) { const char *val = rz_config_get(core->config, argv[1]); if (!val) { - RZ_LOG_ERROR("core: Invalid config key '%s'", argv[1]); + RZ_LOG_ERROR("core: Invalid config key '%s'\n", argv[1]); return RZ_CMD_STATUS_ERROR; } char *p = rz_core_editor(core, NULL, val); diff --git a/librz/core/cmd/cmd_info.c b/librz/core/cmd/cmd_info.c index 58e6d0ff350..0c3a7a24e78 100644 --- a/librz/core/cmd/cmd_info.c +++ b/librz/core/cmd/cmd_info.c @@ -669,7 +669,7 @@ RZ_IPI RzCmdStatus rz_cmd_info_hashes_handler(RzCore *core, int argc, const char fh_new = i < rz_pvector_len(new_hashes) ? (RzBinFileHash *)rz_pvector_at(new_hashes, i) : NULL; fh_old = i < rz_pvector_len(old_hashes) ? (RzBinFileHash *)rz_pvector_at(old_hashes, i) : NULL; if (fh_new && fh_old && strcmp(fh_new->type, fh_old->type)) { - RZ_LOG_ERROR("core: Wrong file hashes structure"); + RZ_LOG_ERROR("core: Wrong file hashes structure\n"); } if (fh_new && fh_old && !strcmp(fh_new->hex, fh_old->hex)) { fprintf(stderr, "= %s %s\n", fh_new->type, fh_new->hex); // output one line because hash remains same `= hashtype hashval` diff --git a/librz/core/cmd/cmd_math.c b/librz/core/cmd/cmd_math.c index fc164cb3bf8..ed2aad311bd 100644 --- a/librz/core/cmd/cmd_math.c +++ b/librz/core/cmd/cmd_math.c @@ -241,7 +241,7 @@ RZ_IPI RzCmdStatus rz_generate_random_number_handler(RzCore *core, int argc, con ut64 high = rz_num_math(core->num, uplimit); if (low >= high) { - RZ_LOG_ERROR("core : Invalid arguments passed to %s : low-limit shouldn't be more then high-limit", argv[0]); + RZ_LOG_ERROR("core : Invalid arguments passed to %s : low-limit shouldn't be more then high-limit\n", argv[0]); return RZ_CMD_STATUS_ERROR; } @@ -262,7 +262,7 @@ RZ_IPI RzCmdStatus rz_print_binary_handler(RzCore *core, int argc, const char ** RZ_IPI RzCmdStatus rz_base64_encode_handler(RzCore *core, int argc, const char **argv) { char *buf = rz_base64_encode_dyn((ut8 *)argv[1], strlen(argv[1])); if (!buf) { - RZ_LOG_ERROR("core: Out of memory!"); + RZ_LOG_ERROR("Out of memory!\n"); return RZ_CMD_STATUS_ERROR; } rz_cons_println(buf); @@ -273,7 +273,7 @@ RZ_IPI RzCmdStatus rz_base64_encode_handler(RzCore *core, int argc, const char * RZ_IPI RzCmdStatus rz_base64_decode_handler(RzCore *core, int argc, const char **argv) { ut8 *buf = rz_base64_decode_dyn(argv[1], -1); if (!buf) { - RZ_LOG_ERROR("core: Out of memory!"); + RZ_LOG_ERROR("Base64 string is invalid\n"); return RZ_CMD_STATUS_ERROR; } rz_cons_println((char *)buf); @@ -293,7 +293,7 @@ RZ_IPI RzCmdStatus rz_print_boundaries_prot_handler(RzCore *core, int argc, cons const char *mode = rz_str_trim_head_ro(argv[1]); RzList *list = rz_core_get_boundaries_prot(core, -1, mode, "search"); if (!list) { - RZ_LOG_ERROR("core: Failed to get boundaries protection values in RzList"); + RZ_LOG_ERROR("Failed to get boundaries protection values in RzList\n"); return RZ_CMD_STATUS_ERROR; } RzListIter *iter; diff --git a/librz/core/cmd/cmd_meta.c b/librz/core/cmd/cmd_meta.c index 932444f5e40..f5f3fc96a24 100644 --- a/librz/core/cmd/cmd_meta.c +++ b/librz/core/cmd/cmd_meta.c @@ -59,7 +59,7 @@ static void meta_variable_comment_print(RzCore *Core, RzAnalysisVar *var, RzCmdS static RzCmdStatus meta_variable_comment_list(RzCore *core, RzAnalysisVarStorageType kind, RzCmdStateOutput *state) { RzAnalysisFunction *fcn = rz_analysis_get_fcn_in(core->analysis, core->offset, 0); if (!fcn) { - RZ_LOG_ERROR("Cannot find the function at the 0x%08" PFMT64x " offset", core->offset); + RZ_LOG_ERROR("Cannot find the function at the 0x%08" PFMT64x " offset\n", core->offset); return RZ_CMD_STATUS_ERROR; } void **it; @@ -76,7 +76,7 @@ static RzCmdStatus meta_variable_comment_list(RzCore *core, RzAnalysisVarStorage static RzCmdStatus meta_variable_comment_list_all(RzCore *core, RzCmdStateOutput *state) { RzAnalysisFunction *fcn = rz_analysis_get_fcn_in(core->analysis, core->offset, 0); if (!fcn) { - RZ_LOG_ERROR("Cannot find the function at the 0x%08" PFMT64x " offset", core->offset); + RZ_LOG_ERROR("Cannot find the function at the 0x%08" PFMT64x " offset\n", core->offset); return RZ_CMD_STATUS_ERROR; } void **it; @@ -283,7 +283,7 @@ static void meta_function_comment_remove(RzAnalysis *analysis, RzAnalysisFunctio RZ_IPI RzCmdStatus rz_comment_function_remove_handler(RzCore *core, int argc, const char **argv) { RzAnalysisFunction *fcn = rz_analysis_get_fcn_in(core->analysis, core->offset, 0); if (!fcn) { - RZ_LOG_ERROR("Cannot find the function at the 0x%08" PFMT64x " offset", core->offset); + RZ_LOG_ERROR("Cannot find the function at the 0x%08" PFMT64x " offset\n", core->offset); return RZ_CMD_STATUS_ERROR; } meta_function_comment_remove(core->analysis, fcn); diff --git a/librz/core/cmd/cmd_print.c b/librz/core/cmd/cmd_print.c index f74f4819adb..ac6b40aa353 100644 --- a/librz/core/cmd/cmd_print.c +++ b/librz/core/cmd/cmd_print.c @@ -3062,7 +3062,7 @@ RZ_IPI RzCmdStatus rz_print_hexdump_oct_handler(RzCore *core, int argc, const ch return RZ_CMD_STATUS_ERROR; \ } \ if (size <= 0) { \ - RZ_LOG_ERROR("Size must be greater 0"); \ + RZ_LOG_ERROR("Size must be greater than 0\n"); \ return RZ_CMD_STATUS_ERROR; \ } \ char *code = rz_lang_byte_array(core->block, size, type); \ @@ -3866,7 +3866,7 @@ RZ_IPI RzCmdStatus rz_cmd_disassemble_recursively_no_function_handler(RzCore *co RZ_IPI RzCmdStatus rz_cmd_disassemble_summarize_n_bytes_handler(RzCore *core, int argc, const char **argv) { if (argc <= 1) { - RZ_LOG_ERROR("Invalid argument."); + RZ_LOG_ERROR("Invalid argument.\n"); return RZ_CMD_STATUS_ERROR; } @@ -5326,7 +5326,7 @@ static bool if_aop_match_hist_type(RzAnalysisOp *op, CoreAnalysisHistogramType t static ut8 *analysis_stats_histogram_data(RzCore *core, CoreBlockRange *brange) { ut8 *data = calloc(1, brange->nblocks); if (!data) { - RZ_LOG_ERROR("core: Failed to allocate memory"); + RZ_LOG_ERROR("core: Failed to allocate memory\n"); return NULL; } // FIXME: Should we just use the value from brange instead? @@ -5360,7 +5360,7 @@ static ut8 *analysis_histogram_data(RzCore *core, CoreBlockRange *brange, CoreAn size_t j, i = 0; ut8 *data = calloc(1, brange->nblocks); if (!data) { - RZ_LOG_ERROR("core: Failed to allocate memory"); + RZ_LOG_ERROR("core: Failed to allocate memory\n"); return NULL; } for (i = 0; i < brange->nblocks; i++) { @@ -5628,7 +5628,7 @@ static RzCmdStatus print_histogram_entropy(RzCore *core, int argc, const char ** ut8 *data = calloc(1, brange->nblocks); ut8 *tmp = malloc(brange->blocksize); if (!tmp) { - RZ_LOG_ERROR("core: failed to malloc memory"); + RZ_LOG_ERROR("core: failed to malloc memory\n"); free(data); free(brange); return RZ_CMD_STATUS_ERROR; @@ -5746,7 +5746,7 @@ static bool print_rising_and_falling_entropy_JSON(RzCore *core, RzCmdStateOutput static bool print_rising_and_falling_entropy_quiet(RzCore *core, CoreBlockRange *brange, ut8 *tmp, double fallingthreshold, double risingthreshold) { RzStrBuf *buf = rz_strbuf_new(""); if (!buf) { - RZ_LOG_ERROR("core: failed to malloc memory"); + RZ_LOG_ERROR("core: failed to malloc memory\n"); return false; } bool resetFlag = 1; @@ -5788,7 +5788,7 @@ static bool print_rising_and_falling_entropy_quiet(RzCore *core, CoreBlockRange static bool print_rising_and_falling_entropy_standard(RzCore *core, CoreBlockRange *brange, ut8 *tmp, double fallingthreshold, double risingthreshold) { RzStrBuf *buf = rz_strbuf_new(""); if (!buf) { - RZ_LOG_ERROR("core: failed to malloc memory"); + RZ_LOG_ERROR("core: failed to malloc memory\n"); return false; } bool resetFlag = 1; @@ -5830,7 +5830,7 @@ static bool print_rising_and_falling_entropy_standard(RzCore *core, CoreBlockRan static bool print_rising_and_falling_entropy_long(RzCore *core, CoreBlockRange *brange, ut8 *tmp, double fallingthreshold, double risingthreshold) { RzStrBuf *buf = rz_strbuf_new(""); if (!buf) { - RZ_LOG_ERROR("core: failed to malloc memory"); + RZ_LOG_ERROR("core: failed to malloc memory\n"); return false; } bool resetFlag = 1; @@ -5879,11 +5879,11 @@ static RzCmdStatus print_rising_and_falling_entropy(RzCore *core, int argc, cons fallingthreshold = rz_num_get_float(core->num, argv[2]); } if (fallingthreshold > risingthreshold) { - RZ_LOG_ERROR("falling threshold is greater than rising threshold"); + RZ_LOG_ERROR("falling threshold is greater than rising threshold\n"); return RZ_CMD_STATUS_ERROR; } if (risingthreshold > 1) { - RZ_LOG_ERROR("threshold can't be greater than 1"); + RZ_LOG_ERROR("threshold can't be greater than 1\n"); return RZ_CMD_STATUS_ERROR; } int nblocks = -1; @@ -5896,7 +5896,7 @@ static RzCmdStatus print_rising_and_falling_entropy(RzCore *core, int argc, cons } ut8 *tmp = malloc(brange->blocksize); if (!tmp) { - RZ_LOG_ERROR("core: failed to malloc memory"); + RZ_LOG_ERROR("core: failed to malloc memory\n"); free(brange); return RZ_CMD_STATUS_ERROR; } @@ -5973,7 +5973,7 @@ static RzCmdStatus print_histogram_marks(RzCore *core, int argc, const char **ar if (!tmp) { free(data); free(brange); - RZ_LOG_ERROR("core: failed to malloc memory"); + RZ_LOG_ERROR("core: failed to malloc memory\n"); return RZ_CMD_STATUS_ERROR; } for (size_t i = 0; i < brange->nblocks; i++) { @@ -6027,7 +6027,7 @@ static RzCmdStatus print_histogram_0x00(RzCore *core, int argc, const char **arg if (!tmp) { free(data); free(brange); - RZ_LOG_ERROR("core: failed to malloc memory"); + RZ_LOG_ERROR("core: failed to malloc memory\n"); return RZ_CMD_STATUS_ERROR; } for (size_t i = 0; i < brange->nblocks; i++) { @@ -6084,7 +6084,7 @@ static RzCmdStatus print_histogram_0xff(RzCore *core, int argc, const char **arg if (!tmp) { free(data); free(brange); - RZ_LOG_ERROR("core: failed to malloc memory"); + RZ_LOG_ERROR("core: failed to malloc memory\n"); return RZ_CMD_STATUS_ERROR; } for (size_t i = 0; i < brange->nblocks; i++) { @@ -6141,7 +6141,7 @@ static RzCmdStatus print_histogram_printable(RzCore *core, int argc, const char if (!tmp) { free(data); free(brange); - RZ_LOG_ERROR("core: failed to malloc memory"); + RZ_LOG_ERROR("core: failed to malloc memory\n"); return RZ_CMD_STATUS_ERROR; } for (size_t i = 0; i < brange->nblocks; i++) { @@ -6198,7 +6198,7 @@ static RzCmdStatus print_histogram_z(RzCore *core, int argc, const char **argv, if (!tmp) { free(data); free(brange); - RZ_LOG_ERROR("core: failed to malloc memory"); + RZ_LOG_ERROR("core: failed to malloc memory\n"); return RZ_CMD_STATUS_ERROR; } size_t len = 0; diff --git a/librz/core/cmd/cmd_resize.c b/librz/core/cmd/cmd_resize.c index 979c8a88908..dbda21943b7 100644 --- a/librz/core/cmd/cmd_resize.c +++ b/librz/core/cmd/cmd_resize.c @@ -44,7 +44,7 @@ RZ_IPI RzCmdStatus rz_resize_handler(RzCore *core, int argc, const char **argv, if (argc > 1) { ut64 newsize = rz_num_math(core->num, argv[1]); if (newsize == 0) { - RZ_LOG_ERROR("Invalid new file size"); + RZ_LOG_ERROR("Invalid new file size\n"); return RZ_CMD_STATUS_ERROR; } rz_core_file_resize(core, newsize); diff --git a/librz/core/cmd/cmd_type.c b/librz/core/cmd/cmd_type.c index 3623a672499..3ed1881bcdc 100644 --- a/librz/core/cmd/cmd_type.c +++ b/librz/core/cmd/cmd_type.c @@ -17,7 +17,7 @@ static void types_cc_print(RzCore *core, const char *cc, RzOutputMode mode) { rz_return_if_fail(cc); if (strchr(cc, '(')) { if (!rz_analysis_cc_set(core->analysis, cc)) { - RZ_LOG_ERROR("Invalid syntax in cc signature."); + RZ_LOG_ERROR("Invalid syntax in cc signature.\n"); } } else { const char *ccname = rz_str_trim_head_ro(cc); @@ -45,7 +45,7 @@ static RzCmdStatus types_enum_member_find(RzCore *core, const char *enum_name, c ut64 value = rz_num_math(core->num, enum_value); const char *enum_member = rz_type_db_enum_member_by_val(core->analysis->typedb, enum_name, value); if (!enum_member) { - RZ_LOG_ERROR("Cannot find matching enum member"); + RZ_LOG_ERROR("Cannot find matching enum member\n"); return RZ_CMD_STATUS_ERROR; } rz_cons_println(enum_member); @@ -57,7 +57,7 @@ static RzCmdStatus types_enum_member_find_all(RzCore *core, const char *enum_val ut64 value = rz_num_math(core->num, enum_value); RzList *matches = rz_type_db_find_enums_by_val(core->analysis->typedb, value); if (!matches || rz_list_empty(matches)) { - RZ_LOG_ERROR("Cannot find matching enum member"); + RZ_LOG_ERROR("Cannot find matching enum member\n"); return RZ_CMD_STATUS_ERROR; } RzListIter *iter; @@ -375,7 +375,7 @@ RZ_IPI RzCmdStatus rz_type_enum_bitfield_handler(RzCore *core, int argc, const c const char *enum_member = argc > 2 ? argv[2] : NULL; int value = rz_type_db_enum_member_by_name(core->analysis->typedb, enum_name, enum_member); if (value == -1) { - RZ_LOG_ERROR("Cannot find anything matching the specified bitfield"); + RZ_LOG_ERROR("Cannot find anything matching the specified bitfield\n"); return RZ_CMD_STATUS_ERROR; } rz_cons_printf("0x%x\n", value); diff --git a/librz/core/cmd/cmd_write.c b/librz/core/cmd/cmd_write.c index da1bf2d1da1..385b6614158 100644 --- a/librz/core/cmd/cmd_write.c +++ b/librz/core/cmd/cmd_write.c @@ -100,7 +100,7 @@ static void cmd_write_bits(RzCore *core, int set, ut64 val) { static RzCmdStatus common_write_value_handler(RzCore *core, const char *valstr, size_t sz) { ut64 value = rz_num_math(core->num, valstr); if (core->num->nc.errors) { - RZ_LOG_ERROR("Could not convert argument to number"); + RZ_LOG_ERROR("Could not convert argument to number\n"); return RZ_CMD_STATUS_ERROR; } @@ -312,7 +312,7 @@ RZ_IPI RzCmdStatus rz_write_zero_handler(RzCore *core, int argc, const char **ar ut64 len = rz_num_math(core->num, argv[1]); ut8 *buf = RZ_NEWS0(ut8, len); if (!buf) { - RZ_LOG_ERROR("Cannot allocate %" PFMT64d " bytes", len); + RZ_LOG_ERROR("Cannot allocate %" PFMT64d " bytes\n", len); return RZ_CMD_STATUS_ERROR; } diff --git a/librz/core/cmd/cmd_yank.c b/librz/core/cmd/cmd_yank.c index 76c89cde7e8..62bd645fc24 100644 --- a/librz/core/cmd/cmd_yank.c +++ b/librz/core/cmd/cmd_yank.c @@ -9,7 +9,7 @@ RZ_IPI RzCmdStatus rz_yank_handler(RzCore *core, int argc, const char **argv, Rz if (argc > 1) { st64 len = rz_num_math(core->num, argv[1]); if (len < 0) { - RZ_LOG_ERROR("Yank length cannot be negative"); + RZ_LOG_ERROR("Yank length cannot be negative\n"); return RZ_CMD_STATUS_ERROR; } rz_core_yank(core, core->offset, len); @@ -42,7 +42,7 @@ RZ_IPI RzCmdStatus rz_yank_editor_handler(RzCore *core, int argc, const char **a RZ_IPI RzCmdStatus rz_yank_file_handler(RzCore *core, int argc, const char **argv) { st64 len = rz_num_math(core->num, argv[1]); if (len < 0) { - RZ_LOG_ERROR("Yank length cannot be negative"); + RZ_LOG_ERROR("Yank length cannot be negative\n"); return RZ_CMD_STATUS_ERROR; } return rz_core_yank_file(core, len, core->offset, argv[2]); @@ -55,7 +55,7 @@ RZ_IPI RzCmdStatus rz_yank_whole_file_handler(RzCore *core, int argc, const char RZ_IPI RzCmdStatus rz_yank_print_handler(RzCore *core, int argc, const char **argv) { st64 len = argc > 1 ? rz_num_math(core->num, argv[1]) : 0; if (len < 0) { - RZ_LOG_ERROR("Yank length cannot be negative"); + RZ_LOG_ERROR("Yank length cannot be negative\n"); return RZ_CMD_STATUS_ERROR; } return bool2status(rz_core_yank_print(core, len)); @@ -64,7 +64,7 @@ RZ_IPI RzCmdStatus rz_yank_print_handler(RzCore *core, int argc, const char **ar RZ_IPI RzCmdStatus rz_yank_string_print_handler(RzCore *core, int argc, const char **argv) { st64 len = argc > 1 ? rz_num_math(core->num, argv[1]) : 0; if (len < 0) { - RZ_LOG_ERROR("Yank length cannot be negative"); + RZ_LOG_ERROR("Yank length cannot be negative\n"); return RZ_CMD_STATUS_ERROR; } return bool2status(rz_core_yank_print_string(core, len)); @@ -73,7 +73,7 @@ RZ_IPI RzCmdStatus rz_yank_string_print_handler(RzCore *core, int argc, const ch RZ_IPI RzCmdStatus rz_yank_hex_print_handler(RzCore *core, int argc, const char **argv) { st64 len = argc > 1 ? rz_num_math(core->num, argv[1]) : 0; if (len < 0) { - RZ_LOG_ERROR("Yank length cannot be negative"); + RZ_LOG_ERROR("Yank length cannot be negative\n"); return RZ_CMD_STATUS_ERROR; } return bool2status(rz_core_yank_print_hexdump(core, len)); @@ -82,7 +82,7 @@ RZ_IPI RzCmdStatus rz_yank_hex_print_handler(RzCore *core, int argc, const char RZ_IPI RzCmdStatus rz_yank_string_handler(RzCore *core, int argc, const char **argv) { st64 len = argc > 1 ? rz_num_math(core->num, argv[1]) : 0; if (len < 0) { - RZ_LOG_ERROR("Yank length cannot be negative"); + RZ_LOG_ERROR("Yank length cannot be negative\n"); return RZ_CMD_STATUS_ERROR; } return bool2status(rz_core_yank_string(core, core->offset, len)); @@ -91,7 +91,7 @@ RZ_IPI RzCmdStatus rz_yank_string_handler(RzCore *core, int argc, const char **a RZ_IPI RzCmdStatus rz_yank_to_handler(RzCore *core, int argc, const char **argv) { st64 len = rz_num_math(core->num, argv[1]); if (len < 0) { - RZ_LOG_ERROR("Yank length cannot be negative"); + RZ_LOG_ERROR("Yank length cannot be negative\n"); return RZ_CMD_STATUS_ERROR; } ut64 addr = rz_num_math(core->num, argv[2]); @@ -105,7 +105,7 @@ RZ_IPI RzCmdStatus rz_yank_hexpairs_handler(RzCore *core, int argc, const char * RZ_IPI RzCmdStatus rz_yank_paste_handler(RzCore *core, int argc, const char **argv) { st64 len = argc > 1 ? rz_num_math(core->num, argv[1]) : 0; if (len < 0) { - RZ_LOG_ERROR("Yank length cannot be negative"); + RZ_LOG_ERROR("Yank length cannot be negative\n"); return RZ_CMD_STATUS_ERROR; } return bool2status(rz_core_yank_paste(core, core->offset, len)); diff --git a/librz/core/core.c b/librz/core/core.c index 780753403f8..50c29d37fab 100644 --- a/librz/core/core.c +++ b/librz/core/core.c @@ -2014,7 +2014,7 @@ RZ_API bool rz_core_serve(RzCore *core, RzIODesc *file) { switch (cmd) { case RAP_PACKET_OPEN: rz_socket_read_block(c, &flg, 1); // flags - RZ_LOG_DEBUG("open (%d): ", cmd); + RZ_LOG_DEBUG("open (%d): \n", cmd); rz_socket_read_block(c, &cmd, 1); // len pipefd = -1; if (UT8_ADD_OVFCHK(cmd, 1)) { @@ -2259,7 +2259,7 @@ RZ_API RZ_OWN char *rz_core_editor(const RzCore *core, RZ_NULLABLE const char *f const char *editor = rz_config_get(core->config, "cfg.editor"); if (RZ_STR_ISEMPTY(editor)) { - RZ_LOG_ERROR("core: please set \"cfg.editor\" to run the editor"); + RZ_LOG_ERROR("core: please set \"cfg.editor\" to run the editor\n"); return NULL; } char *name = NULL, *ret = NULL; diff --git a/librz/core/cprint.c b/librz/core/cprint.c index e15f2b3f030..f416610e5a3 100644 --- a/librz/core/cprint.c +++ b/librz/core/cprint.c @@ -375,7 +375,7 @@ RZ_API RZ_OWN char *rz_core_print_hexdump_or_hexdiff_str(RZ_NONNULL RzCore *core string = rz_core_print_hexdump_diff_str(core, addr, addr + to - from, len); break; default: - RZ_LOG_ERROR("Hexdiff not supported in JSON"); + RZ_LOG_ERROR("Hexdiff not supported in JSON\n"); return NULL; } } @@ -601,7 +601,7 @@ RZ_IPI RZ_OWN char *rz_core_print_cons_disassembly(RzCore *core, ut64 addr, ut32 } if (rz_io_nread_at(core->io, addr, block, byte_len) == -1) { - RZ_LOG_ERROR("Fail to read from 0x%" PFMT64x ".", addr); + RZ_LOG_ERROR("Fail to read from 0x%" PFMT64x ".\n", addr); free(block); return NULL; } diff --git a/librz/core/disasm.c b/librz/core/disasm.c index c19bb6620b7..f22d742ff01 100644 --- a/librz/core/disasm.c +++ b/librz/core/disasm.c @@ -5659,12 +5659,12 @@ RZ_API int rz_core_print_disasm_instructions_with_buf(RzCore *core, ut64 address if (!buf) { buf = malloc(RZ_ABS(nb_bytes) + 1); if (!buf) { - RZ_LOG_ERROR("Fail to alloc memory."); + RZ_LOG_ERROR("Failed to alloc memory.\n"); ds_free(ds); return 0; } if (rz_io_nread_at(core->io, address, buf, RZ_ABS(nb_bytes) + 1) == -1) { - RZ_LOG_ERROR("Fail to read from 0x%" PFMT64x ".", address); + RZ_LOG_ERROR("Failed to read from 0x%" PFMT64x ".\n", address); ds_free(ds); free(buf); return 0; @@ -6157,12 +6157,12 @@ RZ_API int rz_core_disasm_pdi_with_buf(RzCore *core, ut64 address, ut8 *buf, ut3 if (!buf) { buf = malloc(RZ_ABS(nb_bytes) + 1); if (!buf) { - RZ_LOG_ERROR("Fail to alloc memory."); + RZ_LOG_ERROR("Failed to alloc memory.\n"); return 0; } if (rz_io_nread_at(core->io, address, buf, RZ_ABS(nb_bytes) + 1) == -1) { free(buf); - RZ_LOG_ERROR("Fail to read from 0x%" PFMT64x ".", address); + RZ_LOG_ERROR("Failed to read from 0x%" PFMT64x ".\n", address); return 0; } } diff --git a/librz/core/golang.c b/librz/core/golang.c index 0f0c9d5fe57..5a6094bdd67 100644 --- a/librz/core/golang.c +++ b/librz/core/golang.c @@ -705,7 +705,7 @@ static bool recover_string_at(GoStrRecover *ctx, ut64 str_addr, ut64 str_size) { char *flag = malloc(str_size + n_prefix + 1); char *raw = malloc(str_size + 1); if (!flag || !raw) { - RZ_LOG_ERROR("Cannot allocate buffer to read string."); + RZ_LOG_ERROR("Cannot allocate buffer to read string.\n"); free(flag); free(raw); return false; diff --git a/librz/core/linux_heap_glibc.c b/librz/core/linux_heap_glibc.c index a4f533a4661..76ce998419e 100644 --- a/librz/core/linux_heap_glibc.c +++ b/librz/core/linux_heap_glibc.c @@ -232,7 +232,7 @@ RZ_API double GH(rz_get_glibc_version)(RzCore *core, const char *libc_path, ut8 } version = strtod(version_str, NULL); if (version != 0) { - RZ_LOG_INFO("libc version %.2f identified from .rodata banner", version); + RZ_LOG_INFO("libc version %.2f identified from .rodata banner\n", version); } free(version_str); diff --git a/librz/core/linux_heap_jemalloc.c b/librz/core/linux_heap_jemalloc.c index 7cc2996e632..56ed9644638 100644 --- a/librz/core/linux_heap_jemalloc.c +++ b/librz/core/linux_heap_jemalloc.c @@ -134,7 +134,7 @@ static void GH(jemalloc_get_chunks)(RzCore *core, const char *input) { switch (input[0]) { case '\0': - RZ_LOG_ERROR("need an arena_t to associate chunks"); + RZ_LOG_ERROR("need an arena_t to associate chunks\n"); break; case ' ': { GHT arena = GHT_MAX; @@ -429,11 +429,11 @@ static void GH(jemalloc_get_runs)(RzCore *core, const char *input) { return; } if (!GH(rz_resolve_jemalloc)(core, "je_map_bias", &map_bias)) { - RZ_LOG_ERROR ("Cannot resolve je_map_bias"); + RZ_LOG_ERROR ("Cannot resolve je_map_bias\n"); return; } if (!GH(rz_resolve_jemalloc)(core, "je_map_misc_offset", &map_misc_offset)) { - RZ_LOG_ERROR ("Cannot resolve je_map_misc_offset"); + RZ_LOG_ERROR ("Cannot resolve je_map_misc_offset\n"); return; } diff --git a/librz/core/rtr.c b/librz/core/rtr.c index daba0bf68bb..0b60d613c9e 100644 --- a/librz/core/rtr.c +++ b/librz/core/rtr.c @@ -999,7 +999,7 @@ RZ_API void rz_core_rtr_cmds(RzCore *core, const char *port) { if (spr != RZ_STOP_PIPE_SOCKET_READY) { rz_cons_sleep_end(bed); if (spr == RZ_STOP_PIPE_ERROR) { - RZ_LOG_ERROR("Failed to select on stop pipe and listening socket"); + RZ_LOG_ERROR("Failed to select on stop pipe and listening socket\n"); } break; } @@ -1018,7 +1018,7 @@ RZ_API void rz_core_rtr_cmds(RzCore *core, const char *port) { if (spr != RZ_STOP_PIPE_SOCKET_READY) { rz_cons_sleep_end(bed); if (spr == RZ_STOP_PIPE_ERROR) { - RZ_LOG_ERROR("Failed to select on stop pipe and child socket"); + RZ_LOG_ERROR("Failed to select on stop pipe and child socket\n"); } rz_socket_close(ch); rz_socket_free(ch); @@ -1028,7 +1028,7 @@ RZ_API void rz_core_rtr_cmds(RzCore *core, const char *port) { if (ret <= 0) { buf_filled = 0; // If the peer has already closed or an error happened, no need to handle any command if (ret < 0) { - RZ_LOG_ERROR("Failed to read from socket"); + RZ_LOG_ERROR("Failed to read from socket\n"); } break; } diff --git a/librz/core/serialize_core.c b/librz/core/serialize_core.c index cc0e5293bcd..8abb2a7e07a 100644 --- a/librz/core/serialize_core.c +++ b/librz/core/serialize_core.c @@ -376,7 +376,7 @@ static bool seek_load_item(SeekLoadCtx *ctx, const char *k, const char *v) { } else { if (seek_item.is_current) { // Warn about this additional "current" seek - RZ_LOG_WARN("core: Seek history item \"%s\" marked as current, but current already found at \"%s\"!", k, ctx->current_key); + RZ_LOG_WARN("Seek history item \"%s\" marked as current, but current already found at \"%s\"!\n", k, ctx->current_key); } rz_vector_push(ctx->vec, &seek_item); } @@ -465,7 +465,7 @@ RZ_API bool rz_serialize_core_seek_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzCore *c } ut64 histsize = rz_config_get_i(core->config, "cfg.seek.histsize"); if (histsize != 0 && histsize < ulen + rlen) { - RZ_LOG_WARN("core: Loaded project seek history exceeds cfg.seek.histsize, increasing that limit."); + RZ_LOG_WARN("Loaded project seek history exceeds cfg.seek.histsize, increasing that limit.\n"); rz_config_set_i(core->config, "cfg.seek.histsize", ulen + rlen); } diff --git a/librz/core/tui/panels.c b/librz/core/tui/panels.c index d3640d1351e..61f59e6a5c4 100644 --- a/librz/core/tui/panels.c +++ b/librz/core/tui/panels.c @@ -3674,7 +3674,7 @@ int __writeValueCb(void *user) { if (res) { ut64 value = rz_num_math(core->num, res); if (core->num->nc.errors) { - RZ_LOG_ERROR("Could not convert argument to number"); + RZ_LOG_ERROR("Could not convert argument to number\n"); free(res); return -1; // error } diff --git a/librz/core/yank.c b/librz/core/yank.c index 90d7ddc36f0..daf1e740503 100644 --- a/librz/core/yank.c +++ b/librz/core/yank.c @@ -28,7 +28,7 @@ static int perform_mapped_file_yank(RzCore *core, ut64 offset, ut64 len, const c ut64 addr = rz_io_map_next_available(core->io, 0, yank_file_sz, load_align); RzIOMap *map = rz_io_map_new(core->io, yankdesc->fd, RZ_PERM_R, 0, addr, yank_file_sz); if (!map || map->itv.addr == -1) { - RZ_LOG_ERROR("core: Unable to map the opened file: %s", filename); + RZ_LOG_ERROR("Unable to map the opened file: %s\n", filename); rz_io_desc_close(yankdesc); yankdesc = NULL; } @@ -51,12 +51,12 @@ static int perform_mapped_file_yank(RzCore *core, ut64 offset, ut64 len, const c rz_io_read_at(core->io, addr, buf, actual_len); rz_core_yank_set(core, RZ_CORE_FOREIGN_ADDR, buf, len); } else if (res != addr) { - eprintf( - "ERROR: Unable to yank data from file: (loadaddr (0x%" PFMT64x ") (addr (0x%" PFMT64x ") > file_sz (0x%" PFMT64x ")\n", res, addr, + RZ_LOG_ERROR( + "Unable to yank data from file: (loadaddr (0x%" PFMT64x ") (addr (0x%" PFMT64x ") > file_sz (0x%" PFMT64x ")\n", res, addr, yank_file_sz); } else if (actual_len == 0) { - eprintf( - "ERROR: Unable to yank from file: addr+len (0x%" PFMT64x ") > file_sz (0x%" PFMT64x ")\n", addr + len, + RZ_LOG_ERROR( + "Unable to yank from file: addr+len (0x%" PFMT64x ") > file_sz (0x%" PFMT64x ")\n", addr + len, yank_file_sz); } rz_io_desc_close(yankdesc); diff --git a/librz/debug/p/native/windows/windows_debug.c b/librz/debug/p/native/windows/windows_debug.c index 0585fa09f44..f6ba6318f67 100644 --- a/librz/debug/p/native/windows/windows_debug.c +++ b/librz/debug/p/native/windows/windows_debug.c @@ -783,7 +783,7 @@ static void add_library(DWORD pid, LPVOID lpBaseOfDll, HANDLE hFile, char *dllna if (lib_list == NULL) { lib_list = rz_list_newf((RzListFree)libfree); if (!lib_list) { - RZ_LOG_ERROR("Failed to allocate memory"); + RZ_LOG_ERROR("Failed to allocate memory\n"); return; } } @@ -796,7 +796,7 @@ static void add_library(DWORD pid, LPVOID lpBaseOfDll, HANDLE hFile, char *dllna } lib = RZ_NEW0(LIB_ITEM); if (!lib) { - RZ_LOG_ERROR("Failed to allocate memory"); + RZ_LOG_ERROR("Failed to allocate memory\n"); return; } lib->pid = pid; diff --git a/librz/debug/p/native/xnu/xnu_debug.c b/librz/debug/p/native/xnu/xnu_debug.c index 05b224dd7df..be5373b4952 100644 --- a/librz/debug/p/native/xnu/xnu_debug.c +++ b/librz/debug/p/native/xnu/xnu_debug.c @@ -155,12 +155,12 @@ int xnu_attach(RzDebug *dbg, int pid) { ctx->cpu = xnu_get_cpu_type(pid); if (!ctx->cpu) { - RZ_LOG_ERROR("xnu_attach failed to determine cpu type of pid %d", pid); + RZ_LOG_ERROR("xnu_attach failed to determine cpu type of pid %d\n", pid); } // First start listening to exceptions, which will also deliver signals to us if (!xnu_create_exception_thread(dbg)) { - RZ_LOG_ERROR("Failed to start listening to mach exceptions"); + RZ_LOG_ERROR("Failed to start listening to mach exceptions\n"); return -1; } @@ -168,7 +168,7 @@ int xnu_attach(RzDebug *dbg, int pid) { int r = rz_debug_ptrace(dbg, PT_ATTACHEXC, pid, 0, 0); if (r < 0) { perror("ptrace(PT_ATTACHEXC)"); - RZ_LOG_ERROR("Failed to attach to process"); + RZ_LOG_ERROR("Failed to attach to process\n"); return -1; } @@ -176,7 +176,7 @@ int xnu_attach(RzDebug *dbg, int pid) { // Our signal handler will also suspend the task, so no need to call xnu_stop if successful RzDebugReasonType reas = xnu_wait_for_exception(dbg, pid, 1000, true); if (reas != RZ_DEBUG_REASON_SIGNAL || dbg->reason.signum != SIGSTOP) { - RZ_LOG_ERROR("SIGSTOP from PT_ATTACHEXC not observed"); + RZ_LOG_ERROR("SIGSTOP from PT_ATTACHEXC not observed\n"); xnu_stop(dbg, pid); } diff --git a/librz/debug/p/native/xnu/xnu_excthreads.c b/librz/debug/p/native/xnu/xnu_excthreads.c index 8191426c315..db23f6fac15 100644 --- a/librz/debug/p/native/xnu/xnu_excthreads.c +++ b/librz/debug/p/native/xnu/xnu_excthreads.c @@ -375,7 +375,7 @@ static int handle_exception_message(RzDebug *dbg, exc_msg *msg, int *ret_code, b // We want to stop and examine when getting signals kr = task_suspend(msg->task.name); if (kr != KERN_SUCCESS) { - RZ_LOG_ERROR("Failed to suspend after EXC_SOFTWARE"); + RZ_LOG_ERROR("Failed to suspend after EXC_SOFTWARE\n"); } break; case EXC_BREAKPOINT: diff --git a/librz/demangler/demangler.c b/librz/demangler/demangler.c index 0528fde1715..2fcaabfe199 100644 --- a/librz/demangler/demangler.c +++ b/librz/demangler/demangler.c @@ -107,7 +107,7 @@ RZ_API RZ_OWN RzDemangler *rz_demangler_new(void) { rz_warn_if_fail(p->demangle); if (!p->demangle || !rz_list_append(plugins, p)) { const char *lang = p->language ? p->language : ""; - RZ_LOG_WARN("rz_demangler: failed to add '%s' plugin at index %u", lang, i); + RZ_LOG_WARN("rz_demangler: failed to add '%s' plugin at index %u\n", lang, i); } } dem->plugins = plugins; diff --git a/librz/il/il_events.c b/librz/il/il_events.c index 7403cf31e00..df4271b2b7c 100644 --- a/librz/il/il_events.c +++ b/librz/il/il_events.c @@ -54,7 +54,7 @@ RZ_API RZ_OWN RzILEvent *rz_il_event_exception_new(RZ_NONNULL const char *except RzILEvent *evt = RZ_NEW(RzILEvent); if (!evt) { - RZ_LOG_ERROR("RzIL: cannot allocate exception RzILEvent"); + RZ_LOG_ERROR("RzIL: cannot allocate exception RzILEvent\n"); return NULL; } @@ -62,7 +62,7 @@ RZ_API RZ_OWN RzILEvent *rz_il_event_exception_new(RZ_NONNULL const char *except evt->data.exception = strdup(exception); if (!evt->data.exception) { rz_il_event_free(evt); - RZ_LOG_ERROR("RzIL: cannot allocate exception string"); + RZ_LOG_ERROR("RzIL: cannot allocate exception string\n"); return NULL; } return evt; diff --git a/librz/include/rz_il/rz_il_opbuilder_begin.h b/librz/include/rz_il/rz_il_opbuilder_begin.h index ebeae3d6f9f..c0bbc39c259 100644 --- a/librz/include/rz_il/rz_il_opbuilder_begin.h +++ b/librz/include/rz_il/rz_il_opbuilder_begin.h @@ -173,7 +173,7 @@ #define NOT_IMPLEMENTED \ do { \ - RZ_LOG_INFO("IL instruction not implemented."); \ + RZ_LOG_INFO("IL instruction not implemented.\n"); \ return NULL; \ } while (0) diff --git a/librz/io/p/io_shm.c b/librz/io/p/io_shm.c index 3dc8821a997..43f50681188 100644 --- a/librz/io/p/io_shm.c +++ b/librz/io/p/io_shm.c @@ -220,7 +220,7 @@ static RzIODesc *shm__open(RzIO *io, const char *uri, int rw, int mode) { #endif shm->buf = mmap(NULL, shm->size, (rw ? (PROT_READ | PROT_WRITE) : PROT_READ), MAP_SHARED, shm->fd, 0); if (shm->buf == MAP_FAILED) { - RZ_LOG_ERROR("Cannot mmap shared memory \"%s\"/%lu (0x%08x)", shm->name, (unsigned long)shm->size, shm->id); + RZ_LOG_ERROR("Cannot mmap shared memory \"%s\"/%lu (0x%08x)\n", shm->name, (unsigned long)shm->size, shm->id); close(shm->fd); free(shm->name); free(shm); diff --git a/librz/main/rizin.c b/librz/main/rizin.c index e6e14904480..62a8b150037 100644 --- a/librz/main/rizin.c +++ b/librz/main/rizin.c @@ -736,7 +736,7 @@ RZ_API int rz_main_rizin(int argc, const char **argv) { } if (noStderr) { if (-1 == close(2)) { - RZ_LOG_ERROR("Failed to close stderr"); + RZ_LOG_ERROR("Failed to close stderr\n"); LISTS_FREE(); RZ_FREE(debugbackend); return 1; @@ -744,20 +744,20 @@ RZ_API int rz_main_rizin(int argc, const char **argv) { const char nul[] = RZ_SYS_DEVNULL; int new_stderr = open(nul, O_RDWR); if (-1 == new_stderr) { - RZ_LOG_ERROR("Failed to open %s", nul); + RZ_LOG_ERROR("Failed to open %s\n", nul); LISTS_FREE(); RZ_FREE(debugbackend); return 1; } if (2 != new_stderr) { if (-1 == dup2(new_stderr, 2)) { - RZ_LOG_ERROR("Failed to dup2 stderr"); + RZ_LOG_ERROR("Failed to dup2 stderr\n"); LISTS_FREE(); RZ_FREE(debugbackend); return 1; } if (-1 == close(new_stderr)) { - RZ_LOG_ERROR("Failed to close %s", nul); + RZ_LOG_ERROR("Failed to close %s\n", nul); LISTS_FREE(); RZ_FREE(debugbackend); return 1; @@ -936,7 +936,7 @@ RZ_API int rz_main_rizin(int argc, const char **argv) { #if __WINDOWS__ int result = _setmode(_fileno(stdin), _O_BINARY); if (result == -1) { - RZ_LOG_ERROR("Cannot set stdin to binary mode"); + RZ_LOG_ERROR("Cannot set stdin to binary mode\n"); return 1; } #endif diff --git a/librz/main/rz-find.c b/librz/main/rz-find.c index f23ed8e28f9..067fb422ab3 100644 --- a/librz/main/rz-find.c +++ b/librz/main/rz-find.c @@ -146,7 +146,7 @@ static int hit(RzSearchKeyword *kw, void *user, ut64 addr) { char *command = rz_str_newf("%s %s", ro->exec_command, ro->curfile); int status = rz_sys_system(command); if (status == -1) { - RZ_LOG_ERROR("Failed to execute command: %s", command); + RZ_LOG_ERROR("Failed to execute command: %s\n", command); } free(command); return 1; diff --git a/librz/type/type.c b/librz/type/type.c index 0256e4de61d..a0fba848219 100644 --- a/librz/type/type.c +++ b/librz/type/type.c @@ -1110,7 +1110,7 @@ RZ_API RZ_OWN char *rz_type_as_pretty_string(const RzTypeDB *typedb, RZ_NONNULL } HtSP *used_types = ht_sp_new(HT_STR_DUP, NULL, NULL); // use a hash table to keep track of unfolded types if (!used_types) { - RZ_LOG_ERROR("Failed to create hashtable while pretty printing types") + RZ_LOG_ERROR("Failed to create hashtable while pretty printing types\n") return NULL; } char *pretty_type = type_as_pretty_string(typedb, type, identifier, used_types, opts, unfold_level, 0); diff --git a/librz/util/lang_byte_array.c b/librz/util/lang_byte_array.c index 85ed2340389..77b5eeb27af 100644 --- a/librz/util/lang_byte_array.c +++ b/librz/util/lang_byte_array.c @@ -229,7 +229,7 @@ RZ_API RZ_OWN char *rz_lang_byte_array(RZ_NONNULL const ut8 *buffer, size_t size rz_strbuf_init(&sb); if (size <= 0) { - RZ_LOG_ERROR("Length must be greater 0"); + RZ_LOG_ERROR("Length must be greater than 0\n"); return rz_strbuf_drain_nofree(&sb); } diff --git a/librz/util/regex.c b/librz/util/regex.c index c7bbb512685..0b9e25e11e4 100644 --- a/librz/util/regex.c +++ b/librz/util/regex.c @@ -49,7 +49,7 @@ RZ_API RZ_OWN RzRegex *rz_regex_new(RZ_NONNULL const char *pattern, RzRegexFlags ut32 supported = 0; pcre2_config(PCRE2_CONFIG_UNICODE, &supported); if (supported != 1) { - RZ_LOG_ERROR("Unicode not supported by PCRE2 library."); + RZ_LOG_ERROR("Unicode not supported by PCRE2 library.\n"); return NULL; } char *fixed_pat = NULL; diff --git a/librz/util/subprocess.c b/librz/util/subprocess.c index ff6dc3e9917..8b0da9f31e1 100644 --- a/librz/util/subprocess.c +++ b/librz/util/subprocess.c @@ -714,7 +714,7 @@ RZ_API void rz_subprocess_free(RzSubprocess *proc) { * \return RzPty* NULL pointer until it has been implemented */ RZ_API RZ_OWN RzPty *rz_subprocess_openpty(RZ_BORROW RZ_NULLABLE char *slave_name, RZ_NULLABLE void /* const struct termios */ *term_params, RZ_NULLABLE void /* const struct winsize */ *win_params) { - RZ_LOG_ERROR("openpty: Not implemented for Windows!"); + RZ_LOG_ERROR("openpty: Not implemented for Windows!\n"); return NULL; } @@ -724,7 +724,7 @@ RZ_API RZ_OWN RzPty *rz_subprocess_openpty(RZ_BORROW RZ_NULLABLE char *slave_nam * \return bool false */ RZ_API bool rz_subprocess_login_tty(RZ_BORROW RZ_NONNULL const RzPty *pty) { - RZ_LOG_ERROR("login_tty: Not implemented for Windows!"); + RZ_LOG_ERROR("login_tty: Not implemented for Windows!\n"); return false; }