diff mbox series

[RFC,v6] ell/term: Do not return -EPERM for 'putnstr' and 'vprint' if not running.

Message ID 20240403172216.3254805-6-gerickson@nuovations.com (mailing list archive)
State New
Headers show
Series [RFC,v6] ell/term: Do not return -EPERM for 'putnstr' and 'vprint' if not running. | expand

Checks

Context Check Description
tedd_an/pre-ci_am fail error: ell/term.c: does not exist in index hint: Use 'git am --show-current-patch' to see the failed patch

Commit Message

Grant Erickson April 3, 2024, 5:22 p.m. UTC
If the 'is_running' flag is not asserted there is no need to return
-EPERM since it is still valid to write to the terminal when it is not
running.
---
 ell/term.c | 6 ------
 1 file changed, 6 deletions(-)
diff mbox series

Patch

diff --git a/ell/term.c b/ell/term.c
index 65ddbcbb7600..4c31c0761a79 100644
--- a/ell/term.c
+++ b/ell/term.c
@@ -391,9 +391,6 @@  LIB_EXPORT int l_term_putnstr(struct l_term *term, const char *str, size_t n)
 	if (!term)
 		return -EINVAL;
 
-	if (!term->is_running)
-		return -EPERM;
-
 	res = write(term->out_fd, str, n);
 	if (res < 0)
 		return -errno;
@@ -435,9 +432,6 @@  LIB_EXPORT int l_term_vprint(struct l_term *term, const char *str, va_list ap)
 	if (!term || !str)
 		return -EINVAL;
 
-	if (!term->is_running)
-		return -EPERM;
-
 	if (vdprintf(term->out_fd, str, ap) < 0)
 		return -errno;