core: add mm_port_subsys_to_name()

This commit is contained in:
Dan Williams
2011-01-24 00:05:08 -06:00
parent 476cc44bc1
commit 44c11adadc
2 changed files with 16 additions and 0 deletions
+14
View File
@@ -46,6 +46,20 @@ typedef struct {
/*****************************************************************************/
const char *
mm_port_subsys_to_name (MMPortSubsys psubsys)
{
switch (psubsys) {
case MM_PORT_SUBSYS_TTY:
return "tty";
case MM_PORT_SUBSYS_NET:
return "net";
default:
break;
}
return "(unknown)";
}
const char *
mm_port_type_to_name (MMPortType ptype)
{
+2
View File
@@ -78,5 +78,7 @@ void mm_port_set_connected (MMPort *self, gboolean connected);
const char * mm_port_type_to_name (MMPortType ptype);
const char * mm_port_subsys_to_name (MMPortSubsys psubsys);
#endif /* MM_PORT_H */