mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-23 17:55:01 +00:00
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>
27 lines
723 B
C
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_ */
|