summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/uterm_vt.c12
-rw-r--r--src/uterm_vt.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/src/uterm_vt.c b/src/uterm_vt.c
index d0f18ea..af377f5 100644
--- a/src/uterm_vt.c
+++ b/src/uterm_vt.c
@@ -986,6 +986,18 @@ unsigned int uterm_vt_get_type(struct uterm_vt *vt)
}
SHL_EXPORT
+unsigned int uterm_vt_get_num(struct uterm_vt *vt)
+{
+ if (!vt)
+ return 0;
+
+ if (vt->mode == UTERM_VT_REAL)
+ return vt->real_num;
+
+ return 0;
+}
+
+SHL_EXPORT
int uterm_vt_master_new(struct uterm_vt_master **out,
struct ev_eloop *eloop)
{
diff --git a/src/uterm_vt.h b/src/uterm_vt.h
index 0362bbe..1370c12 100644
--- a/src/uterm_vt.h
+++ b/src/uterm_vt.h
@@ -85,5 +85,6 @@ int uterm_vt_activate(struct uterm_vt *vt);
int uterm_vt_deactivate(struct uterm_vt *vt);
void uterm_vt_retry(struct uterm_vt *vt);
unsigned int uterm_vt_get_type(struct uterm_vt *vt);
+unsigned int uterm_vt_get_num(struct uterm_vt *vt);
#endif /* UTERM_UTERM_VT_H */