]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
terminal: add new get_name() method
authorRay Strode <rstrode@redhat.com>
Sun, 1 Dec 2013 01:34:24 +0000 (20:34 -0500)
committerRay Strode <rstrode@redhat.com>
Tue, 3 Dec 2013 15:51:32 +0000 (10:51 -0500)
The name is passed in at construct time, but it gets canonicalized.

This commit adds api to get the final name. The api is also useful,
since it prevents callers that need the mapping from having to maintain
it separately, which will be good for a future clean up.

src/libply-splash-core/ply-terminal.c
src/libply-splash-core/ply-terminal.h

index 2e95dc8c92cd008dffc94a7f52b53c0db0b8303b..992dd3f3d82f13d18e424233ad2397d8655ffd52 100644 (file)
@@ -876,6 +876,12 @@ ply_terminal_free (ply_terminal_t *terminal)
   free (terminal);
 }
 
+const char *
+ply_terminal_get_name (ply_terminal_t *terminal)
+{
+  return terminal->name;
+}
+
 int
 ply_terminal_get_vt_number (ply_terminal_t *terminal)
 {
index 8b4b0177e3866455bda141c93c65fb358e19c014..48b4f77f1d34c7f3408d555e1d826633393bc84c 100644 (file)
@@ -91,6 +91,7 @@ void ply_terminal_set_mode (ply_terminal_t     *terminal,
 void ply_terminal_ignore_mode_changes (ply_terminal_t *terminal,
                                        bool            should_ignore);
 
+const char *ply_terminal_get_name (ply_terminal_t *terminal);
 int ply_terminal_get_vt_number (ply_terminal_t *terminal);
 bool ply_terminal_activate_vt (ply_terminal_t *terminal);
 bool ply_terminal_deactivate_vt (ply_terminal_t *terminal);