#include #include #include #include #include "../../util/debug.h" #include "../helpline.h" #include "../ui.h" #include "../libslang.h" char ui_helpline__last_msg[1024]; bool tui_helpline__set; static void tui_helpline__pop(void) { } static void tui_helpline__push(const char *msg) { const size_t sz = sizeof(ui_helpline__current); SLsmg_gotorc(SLtt_Screen_Rows - 1, 0); SLsmg_set_color(0); SLsmg_write_nstring((char *)msg, SLtt_Screen_Cols); SLsmg_refresh(); strncpy(ui_helpline__current, msg, sz)[sz - 1] = '\0'; } static int tui_helpline__show(const char *format, va_list ap) { int ret; static int backlog; pthread_mutex_lock(&ui__lock); ret = vscnprintf(ui_helpline__last_msg + backlog, sizeof(ui_helpline__last_msg) - backlog, format, ap); backlog += ret; tui_helpline__set = true; if (ui_helpline__last_msg[backlog - 1] == '\n') { ui_helpline__puts(ui_helpline__last_msg); SLsmg_refresh(); backlog = 0; } pthread_mutex_unlock(&ui__lock); return ret; } struct ui_helpline tui_helpline_fns = { .pop = tui_helpline__pop, .push = tui_helpline__push, .show = tui_helpline__show, }; void ui_helpline__init(void) { helpline_fns = &tui_helpline_fns; ui_helpline__puts(" "); } cket-loop-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-08-10 16:42:53 +0200
committerDan Williams <dan.j.williams@intel.com>2016-12-26 20:29:24 -0800
commite568df6b84ff05a22467503afc11bee7a6ba0700 (patch)
tree516a8c7d3eb87bcd07d97e3582964403cdd0f010 /include/dt-bindings/clock
parent7ce7d89f48834cefece7804d38fc5d85382edf77 (diff)
ext2: Return BH_New buffers for zeroed blocks
So far we did not return BH_New buffers from ext2_get_blocks() when we allocated and zeroed-out a block for DAX inode to avoid racy zeroing in DAX code. This zeroing is gone these days so we can remove the workaround. Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/dt-bindings/clock')