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:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user