Hi, On Fri, Nov 16, 2018 at 09:43:13AM +0000, Frediano Ziglio wrote: > spice_debug already add a end of line. s/spice_debug/Spice log functions/ ? Just a suggestion, either way Acked-by: Victor Toso <victortoso@xxxxxxxxxx> > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> > --- > server/display-channel.c | 2 +- > server/lz4-encoder.c | 2 +- > server/memslot.c | 8 +++++--- > server/red-parse-qxl.c | 12 ++++++------ > server/red-record-qxl.c | 2 +- > server/red-replay-qxl.c | 4 ++-- > server/reds.c | 4 ++-- > 7 files changed, 18 insertions(+), 16 deletions(-) > > Changes since v1: > - add more occurrencies > > diff --git a/server/display-channel.c b/server/display-channel.c > index 17fa4409..118f795f 100644 > --- a/server/display-channel.c > +++ b/server/display-channel.c > @@ -2421,7 +2421,7 @@ gboolean display_channel_validate_surface(DisplayChannel *display, uint32_t surf > return FALSE; > } > if (!display->priv->surfaces[surface_id].context.canvas) { > - spice_warning("canvas address is %p for %d (and is NULL)\n", > + spice_warning("canvas address is %p for %d (and is NULL)", > &(display->priv->surfaces[surface_id].context.canvas), surface_id); > spice_warning("failed on %d", surface_id); > return FALSE; > diff --git a/server/lz4-encoder.c b/server/lz4-encoder.c > index bf8f36f5..84a9bcc1 100644 > --- a/server/lz4-encoder.c > +++ b/server/lz4-encoder.c > @@ -116,7 +116,7 @@ int lz4_encode(Lz4EncoderContext *lz4, int height, int stride, uint8_t *io_ptr, > > LZ4_freeStream(stream); > if (total_lines != height) { > - spice_error("too many lines\n"); > + spice_error("too many lines"); > out_size = 0; > } > > diff --git a/server/memslot.c b/server/memslot.c > index ede77e7a..c2931321 100644 > --- a/server/memslot.c > +++ b/server/memslot.c > @@ -61,7 +61,7 @@ int memslot_validate_virt(RedMemSlotInfo *info, unsigned long virt, int slot_id, > > if (virt < slot->virt_start_addr || (virt + add_size) > slot->virt_end_addr) { > print_memslots(info); > - spice_warning("virtual address out of range\n" > + spice_warning("virtual address out of range" > " virt=0x%lx+0x%x slot_id=%d group_id=%d\n" > " slot=0x%lx-0x%lx delta=0x%lx", > virt, add_size, slot_id, group_id, > @@ -114,8 +114,10 @@ void *memslot_get_virt(RedMemSlotInfo *info, QXLPHYSICAL addr, uint32_t add_size > generation = memslot_get_generation(info, addr); > if (generation != slot->generation) { > print_memslots(info); > - spice_critical("address generation is not valid, group_id %d, slot_id %d, gen %d, slot_gen %d\n", > - group_id, slot_id, generation, slot->generation); > + spice_critical("address generation is not valid, group_id %d, slot_id %d, " > + "gen %d, slot_gen %d", > + group_id, slot_id, > + generation, slot->generation); > return NULL; > } > > diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c > index dd840be1..86abe3ca 100644 > --- a/server/red-parse-qxl.c > +++ b/server/red-parse-qxl.c > @@ -137,7 +137,7 @@ static size_t red_get_data_chunks_ptr(RedMemSlotInfo *slots, int group_id, > * Or made a circular list of chunks > */ > if (++num_chunks >= MAX_CHUNKS) { > - spice_warning("data split in too many chunks, avoiding DoS\n"); > + spice_warning("data split in too many chunks, avoiding DoS"); > goto error; > } > > @@ -167,7 +167,7 @@ static size_t red_get_data_chunks_ptr(RedMemSlotInfo *slots, int group_id, > data_size += chunk_data_size; > /* this can happen if client is sending nested chunks */ > if (data_size > MAX_DATA_CHUNK) { > - spice_warning("too much data inside chunks, avoiding DoS\n"); > + spice_warning("too much data inside chunks, avoiding DoS"); > goto error; > } > if (!memslot_validate_virt(slots, (intptr_t)red->data, memslot_id, red->data_size, group_id)) > @@ -430,14 +430,14 @@ static bool bitmap_consistent(SpiceBitmap *bitmap) > unsigned int bpp; > > if (bitmap->format >= SPICE_N_ELEMENTS(MAP_BITMAP_FMT_TO_BITS_PER_PIXEL)) { > - spice_warning("wrong format specified for image\n"); > + spice_warning("wrong format specified for image"); > return false; > } > > bpp = MAP_BITMAP_FMT_TO_BITS_PER_PIXEL[bitmap->format]; > > if (bitmap->stride < (((uint64_t) bitmap->x * bpp + 7u) / 8u)) { > - spice_warning("image stride too small for width: %d < ((%d * %d + 7) / 8) (%s=%d)\n", > + spice_warning("image stride too small for width: %d < ((%d * %d + 7) / 8) (%s=%d)", > bitmap->stride, bitmap->x, bpp, > bitmap_format_to_string(bitmap->format), > bitmap->format); > @@ -486,12 +486,12 @@ static SpiceImage *red_get_image(RedMemSlotInfo *slots, int group_id, > red->u.bitmap.stride = qxl->bitmap.stride; > palette = qxl->bitmap.palette; > if (!bitmap_fmt_is_rgb(red->u.bitmap.format) && !palette && !is_mask) { > - spice_warning("guest error: missing palette on bitmap format=%d\n", > + spice_warning("guest error: missing palette on bitmap format=%d", > red->u.bitmap.format); > goto error; > } > if (red->u.bitmap.x == 0 || red->u.bitmap.y == 0) { > - spice_warning("guest error: zero area bitmap\n"); > + spice_warning("guest error: zero area bitmap"); > goto error; > } > qxl_flags = qxl->bitmap.flags; > diff --git a/server/red-record-qxl.c b/server/red-record-qxl.c > index d4fb5c56..30a3b0da 100644 > --- a/server/red-record-qxl.c > +++ b/server/red-record-qxl.c > @@ -840,7 +840,7 @@ RedRecord *red_record_new(const char *filename) > > f = fopen(filename, "w+"); > if (!f) { > - spice_error("failed to open recording file %s\n", filename); > + spice_error("failed to open recording file %s", filename); > } > > filter = getenv("SPICE_WORKER_RECORD_FILTER"); > diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c > index bd33b581..6958a495 100644 > --- a/server/red-replay-qxl.c > +++ b/server/red-replay-qxl.c > @@ -1289,7 +1289,7 @@ static void replay_handle_dev_input(QXLWorker *worker, SpiceReplay *replay, > // safe to ignore > break; > default: > - spice_debug("unhandled %d\n", message); > + spice_debug("unhandled %d", message); > } > } > > @@ -1321,7 +1321,7 @@ SPICE_GNUC_VISIBLE QXLCommandExt* spice_replay_next_cmd(SpiceReplay *replay, > cmd = replay_malloc0(replay, sizeof(QXLCommandExt)); > cmd->cmd.type = type; > cmd->group_id = 0; > - spice_debug("command %"SCNu64", %d\r", timestamp, cmd->cmd.type); > + spice_debug("command %"SCNu64", %d", timestamp, cmd->cmd.type); > switch (cmd->cmd.type) { > case QXL_CMD_DRAW: > cmd->flags = 0; > diff --git a/server/reds.c b/server/reds.c > index 1ea5897b..cdbb94cb 100644 > --- a/server/reds.c > +++ b/server/reds.c > @@ -542,7 +542,7 @@ void reds_client_disconnect(RedsState *reds, RedClient *client) > > if (reds->config->exit_on_disconnect) > { > - spice_debug("Exiting server because of client disconnect.\n"); > + spice_debug("Exiting server because of client disconnect."); > exit(0); > } > > @@ -4355,7 +4355,7 @@ static void reds_client_monitors_config(RedsState *reds, VDAgentMonitorsConfig * > FOREACH_QXL_INSTANCE(reds, qxl) { > if (!red_qxl_client_monitors_config(qxl, monitors_config)) { > /* this is a normal condition, some qemu devices might not implement it */ > - spice_debug("QXLInterface::client_monitors_config failed\n"); > + spice_debug("QXLInterface::client_monitors_config failed"); > } > } > } > -- > 2.17.2 > > _______________________________________________ > Spice-devel mailing list > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/spice-devel
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel