summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-07-11 10:31:02 +0200
committerLennart Poettering <lennart@poettering.net>2024-07-19 11:41:43 +0200
commit53f0ab5151fd855c6b926a772c7329b0c00a7504 (patch)
tree8132d4522539b08cfca1008aae4842cbf76bdd50 /src/shared
parentterminal-util: when querying bg color, ensure input fd and output fd refer to... (diff)
downloadsystemd-53f0ab5151fd855c6b926a772c7329b0c00a7504.tar.xz
systemd-53f0ab5151fd855c6b926a772c7329b0c00a7504.zip
terminal-util: rename set_terminal_cursor_position() → terminal_set_cursor_position()
Let's prefix these functions with the subsystem name, and clean them up a bit. Specifically, drop the error logging, it's entirely duplicative, since every single caller does it anyway.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/qrcode-util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shared/qrcode-util.c b/src/shared/qrcode-util.c
index a63e6cac73..10ed542df2 100644
--- a/src/shared/qrcode-util.c
+++ b/src/shared/qrcode-util.c
@@ -52,7 +52,7 @@ static void print_border(FILE *output, unsigned width, unsigned row, unsigned co
if (fd < 0)
return (void)log_debug_errno(errno, "Failed to get file descriptor from the file stream: %m");
- r = set_terminal_cursor_position(fd, row, column);
+ r = terminal_set_cursor_position(fd, row, column);
if (r < 0)
log_warning_errno(r, "Failed to move terminal cursor position, ignoring: %m");
@@ -64,7 +64,7 @@ static void print_border(FILE *output, unsigned width, unsigned row, unsigned co
fputs(UNICODE_FULL_BLOCK, output);
fputs(ANSI_NORMAL "\n", output);
- r = set_terminal_cursor_position(fd, row + 1, column);
+ r = terminal_set_cursor_position(fd, row + 1, column);
if (r < 0)
log_warning_errno(r, "Failed to move terminal cursor position, ignoring: %m");
}
@@ -96,7 +96,7 @@ static void write_qrcode(FILE *output, QRcode *qr, unsigned int row, unsigned in
if (fd < 0)
return (void)log_debug_errno(errno, "Failed to get file descriptor from the file stream: %m");
- r = set_terminal_cursor_position(fd, row + move_down, column);
+ r = terminal_set_cursor_position(fd, row + move_down, column);
if (r < 0)
log_warning_errno(r, "Failed to move terminal cursor position, ignoring: %m");
@@ -127,7 +127,7 @@ static void write_qrcode(FILE *output, QRcode *qr, unsigned int row, unsigned in
for (unsigned x = 0; x < 4; x++)
fputs(UNICODE_FULL_BLOCK, output);
- r = set_terminal_cursor_position(fd, row + move_down, column);
+ r = terminal_set_cursor_position(fd, row + move_down, column);
if (r < 0)
log_warning_errno(r, "Failed to move terminal cursor position, ignoring: %m");
move_down += 1;
@@ -206,7 +206,7 @@ int print_qrcode_full(FILE *out, const char *header, const char *string, unsigne
row = tty_height - (qr_code_height / 2 ) - 1;
if (header) {
- r = set_terminal_cursor_position(fd, row - 2, tty_width - qr_code_width - 2);
+ r = terminal_set_cursor_position(fd, row - 2, tty_width - qr_code_width - 2);
if (r < 0)
log_warning_errno(r, "Failed to move terminal cursor position, ignoring: %m");