[PATCH v9 5/9] ell/term: Do not return -EPERM for 'putnstr' and 'vprint' if not running.
Grant Erickson <[email protected]> Sun, 6 Apr 2025 15:06:01 -0700
| Newsgroups | dev.linux.lists.ell |
|---|---|
| Message-ID | <a4ceba53f91fc4018127de406706ef9b743e97dd.1743976923.git.gerickson@nuovations.com> |
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 --git a/ell/term.c b/ell/term.c index 81df771ff07f..c867b240090c 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; -- 2.45.0