[xen master] xen/arm: vpl011: Add a new console_cleanup function in xenconsole

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen master] xen/arm: vpl011: Add a new console_cleanup function in xenconsole

patchbot
commit 1ef1267981fb9714f9488a4432a9f16ce03137ad
Author:     Bhupinder Thakur <[hidden email]>
AuthorDate: Wed Sep 27 11:43:27 2017 +0530
Commit:     Stefano Stabellini <[hidden email]>
CommitDate: Tue Oct 3 15:23:37 2017 -0700

    xen/arm: vpl011: Add a new console_cleanup function in xenconsole
   
    This patch introduces a new console_cleanup function. This function
    frees up the console resources.
   
    Signed-off-by: Bhupinder Thakur <[hidden email]>
    Reviewed-by: Stefano Stabellini <[hidden email]>
    Acked-by: Wei Liu <[hidden email]>
---
 tools/console/daemon/io.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
index 5c6da31..ff69e52 100644
--- a/tools/console/daemon/io.c
+++ b/tools/console/daemon/io.c
@@ -768,12 +768,8 @@ static void remove_domain(struct domain *dom)
  }
 }
 
-static void cleanup_domain(struct domain *d)
+static void console_cleanup(struct console *con)
 {
- struct console *con = &d->console;
-
- console_close_tty(con);
-
  if (con->log_fd != -1) {
  close(con->log_fd);
  con->log_fd = -1;
@@ -784,6 +780,15 @@ static void cleanup_domain(struct domain *d)
 
  free(con->xspath);
  con->xspath = NULL;
+}
+
+static void cleanup_domain(struct domain *d)
+{
+ struct console *con = &d->console;
+
+ console_close_tty(con);
+
+ console_cleanup(con);
 
  remove_domain(d);
 }
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog