Files
OpenCellular/host/lib21/include/host_misc2.h
Bill Richardson 36bc59140c vb21: Rename struct vb2_guid to struct vb2_id
Since the ID structure isn't a true GUID anymore, let's call it
something else.

BUG=none
BRANCH=none
TEST=make runtests

Change-Id: I96f511bd5587a94d2cc20764e26d7ef0096de04c
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/256182
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2015-03-10 23:46:07 +00:00

27 lines
723 B
C

/* Copyright 2015 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef VBOOT_REFERENCE_HOST_MISC2_H_
#define VBOOT_REFERENCE_HOST_MISC2_H_
#include <stdint.h>
#include <stdio.h>
#include "2id.h"
/* Length of string representation, including trailing '\0' */
#define VB2_ID_MIN_STRLEN (2 * VB2_ID_NUM_BYTES + 1)
/**
* Convert hex string to struct vb2_id.
*
* @param str Example: "01ABef000042"
* @param id Destination for binary representation
* @return VB2_SUCCESS, or non-zero if error.
*/
int vb2_str_to_id(const char *str, struct vb2_id *id);
#endif /* VBOOT_REFERENCE_HOST_MISC2_H_ */