linux/lib/uuid.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Unified UUID/GUID definition
 *
 * Copyright (C) 2009, 2016 Intel Corp.
 *	Huang Ying <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/ctype.h>
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/uuid.h>
#include <linux/random.h>

const guid_t guid_null;
EXPORT_SYMBOL();
const uuid_t uuid_null;
EXPORT_SYMBOL();

const u8 guid_index[16] =;
const u8 uuid_index[16] =;

/**
 * generate_random_uuid - generate a random UUID
 * @uuid: where to put the generated UUID
 *
 * Random UUID interface
 *
 * Used to create a Boot ID or a filesystem UUID/GUID, but can be
 * useful for other kernel drivers.
 */
void generate_random_uuid(unsigned char uuid[16])
{}
EXPORT_SYMBOL();

void generate_random_guid(unsigned char guid[16])
{}
EXPORT_SYMBOL();

static void __uuid_gen_common(__u8 b[16])
{}

void guid_gen(guid_t *lu)
{}
EXPORT_SYMBOL_GPL();

void uuid_gen(uuid_t *bu)
{}
EXPORT_SYMBOL_GPL();

/**
 * uuid_is_valid - checks if a UUID string is valid
 * @uuid:	UUID string to check
 *
 * Description:
 * It checks if the UUID string is following the format:
 *	xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
 *
 * where x is a hex digit.
 *
 * Return: true if input is valid UUID string.
 */
bool uuid_is_valid(const char *uuid)
{}
EXPORT_SYMBOL();

static int __uuid_parse(const char *uuid, __u8 b[16], const u8 ei[16])
{}

int guid_parse(const char *uuid, guid_t *u)
{}
EXPORT_SYMBOL();

int uuid_parse(const char *uuid, uuid_t *u)
{}
EXPORT_SYMBOL();