Index: uspace/lib/fmtutil/fmtutil.c
===================================================================
--- uspace/lib/fmtutil/fmtutil.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/fmtutil/fmtutil.c	(revision 58e4d85ce498861509fd56f58413b1cd38ab29f6)
@@ -38,5 +38,5 @@
 } printmode_t;
 
-int print_wrapped_console(const char *str, align_mode_t alignment)
+errno_t print_wrapped_console(const char *str, align_mode_t alignment)
 {
 	console_ctrl_t *console = console_init(stdin, stdout);
@@ -46,5 +46,5 @@
 	}
 	sysarg_t con_rows, con_cols, con_col, con_row;
-	int rc = console_get_size(console, &con_cols, &con_rows);
+	errno_t rc = console_get_size(console, &con_cols, &con_rows);
 	if (rc != EOK) {
 		return rc;
@@ -63,15 +63,15 @@
  *
  **/
-static int print_line(wchar_t *wstr, size_t chars, bool last, void *data)
+static errno_t print_line(wchar_t *wstr, size_t chars, bool last, void *data)
 {
 	printmode_t *pm = (printmode_t *) data;
 	wchar_t old_char = wstr[chars];
 	wstr[chars] = 0;
-	int rc = print_aligned_w(wstr, pm->width, last, pm->alignment);
+	errno_t rc = print_aligned_w(wstr, pm->width, last, pm->alignment);
 	wstr[chars] = old_char;
 	return rc;
 }
 
-int print_wrapped(const char *str, size_t width, align_mode_t mode)
+errno_t print_wrapped(const char *str, size_t width, align_mode_t mode)
 {
 	printmode_t pm;
@@ -83,10 +83,10 @@
 		return ENOMEM;
 	}
-	int rc = wrap(wstr, width, print_line, &pm);
+	errno_t rc = wrap(wstr, width, print_line, &pm);
 	free(wstr);
 	return rc;
 }
 
-int print_aligned_w(const wchar_t *wstr, size_t width, bool last,
+errno_t print_aligned_w(const wchar_t *wstr, size_t width, bool last,
     align_mode_t mode)
 {
@@ -169,5 +169,5 @@
 	return EOK;
 }
-int print_aligned(const char *str, size_t width, bool last, align_mode_t mode)
+errno_t print_aligned(const char *str, size_t width, bool last, align_mode_t mode)
 {
 	wchar_t *wstr = str_to_awstr(str);
@@ -175,10 +175,10 @@
 		return ENOMEM;
 	}
-	int rc = print_aligned_w(wstr, width, last, mode);
+	errno_t rc = print_aligned_w(wstr, width, last, mode);
 	free(wstr);
 	return rc;
 }
 
-int wrap(wchar_t *wstr, size_t width, line_consumer_fn consumer, void *data)
+errno_t wrap(wchar_t *wstr, size_t width, line_consumer_fn consumer, void *data)
 {
 	size_t word_start = 0;
Index: uspace/lib/fmtutil/fmtutil.h
===================================================================
--- uspace/lib/fmtutil/fmtutil.h	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/fmtutil/fmtutil.h	(revision 58e4d85ce498861509fd56f58413b1cd38ab29f6)
@@ -44,10 +44,10 @@
  * @returns EOK on success or an error code on failure
  */
-typedef int (*line_consumer_fn)(wchar_t *, size_t, bool, void *);
+typedef errno_t (*line_consumer_fn)(wchar_t *, size_t, bool, void *);
 
-extern int print_aligned_w(const wchar_t *, size_t, bool, align_mode_t);
-extern int print_aligned(const char *, size_t, bool, align_mode_t);
-extern int print_wrapped(const char *, size_t, align_mode_t);
-extern int print_wrapped_console(const char *, align_mode_t);
+extern errno_t print_aligned_w(const wchar_t *, size_t, bool, align_mode_t);
+extern errno_t print_aligned(const char *, size_t, bool, align_mode_t);
+extern errno_t print_wrapped(const char *, size_t, align_mode_t);
+extern errno_t print_wrapped_console(const char *, align_mode_t);
 
 /** Wrap characters in a wide string to the given length.
@@ -58,3 +58,3 @@
  * @param data user data to pass to the consumer function
  */
-extern int wrap(wchar_t *, size_t, line_consumer_fn, void *);
+extern errno_t wrap(wchar_t *, size_t, line_consumer_fn, void *);
