libnm-util: move nm_utils_is_uuid() here

This is useful outside the daemon too, so move it into libnm-utils.
This commit is contained in:
Dan Winship
2012-09-19 10:36:07 -04:00
parent 77c90d3f36
commit 74b6b9c768
6 changed files with 30 additions and 38 deletions

View File

@@ -799,23 +799,6 @@ nm_utils_complete_generic (NMConnection *connection,
}
}
gboolean
nm_utils_is_uuid (const char *str)
{
const char *p = str;
int num_dashes = 0;
while (*p) {
if (*p == '-')
num_dashes++;
else if (!isxdigit (*p))
return FALSE;
p++;
}
return (num_dashes == 4) && (p - str == 36);
}
char *
nm_utils_new_vlan_name (const char *parent_iface, guint32 vlan_id)
{