summaryrefslogtreecommitdiff
path: root/src/basic/util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-07-22 21:18:41 -0400
committerGitHub <noreply@github.com>2016-07-22 21:18:41 -0400
commit31b14fdb6f2f018a9d67c9303aac9903b4227dbd (patch)
treeb44e75dc5b0fff27ad008fbea11d7bdcc994bd12 /src/basic/util.c
parentc907cba919a1e9840859296f192f3a55345ff29c (diff)
parent487ddeb8bc1a05816802adb2d5a9dc4416b386fe (diff)
Merge pull request #3777 from poettering/id128-rework
uuid/id128 code rework
Diffstat (limited to 'src/basic/util.c')
-rw-r--r--src/basic/util.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/basic/util.c b/src/basic/util.c
index c4b6fc2925..9d66d28eb7 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -581,47 +581,6 @@ int on_ac_power(void) {
return found_online || !found_offline;
}
-bool id128_is_valid(const char *s) {
- size_t i, l;
-
- l = strlen(s);
- if (l == 32) {
-
- /* Simple formatted 128bit hex string */
-
- for (i = 0; i < l; i++) {
- char c = s[i];
-
- if (!(c >= '0' && c <= '9') &&
- !(c >= 'a' && c <= 'z') &&
- !(c >= 'A' && c <= 'Z'))
- return false;
- }
-
- } else if (l == 36) {
-
- /* Formatted UUID */
-
- for (i = 0; i < l; i++) {
- char c = s[i];
-
- if ((i == 8 || i == 13 || i == 18 || i == 23)) {
- if (c != '-')
- return false;
- } else {
- if (!(c >= '0' && c <= '9') &&
- !(c >= 'a' && c <= 'z') &&
- !(c >= 'A' && c <= 'Z'))
- return false;
- }
- }
-
- } else
- return false;
-
- return true;
-}
-
int container_get_leader(const char *machine, pid_t *pid) {
_cleanup_free_ char *s = NULL, *class = NULL;
const char *p;