From 559b9433ea6be7fa3fe3e42360d08be1b73b3183 Mon Sep 17 00:00:00 2001 From: Youngjae Cho Date: Mon, 14 Jun 2021 11:46:12 +0900 Subject: [PATCH] Add board-internal to get serial number Change-Id: I97e25f8fabc30fd5b4e26ec371b16430c57107d9 Signed-off-by: Youngjae Cho --- include/board-internal.h | 7 +++++++ src/board-internal.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 include/board-internal.h create mode 100644 src/board-internal.c diff --git a/include/board-internal.h b/include/board-internal.h new file mode 100644 index 0000000..7b7a061 --- /dev/null +++ b/include/board-internal.h @@ -0,0 +1,7 @@ +#ifndef __BOARD_INTERNAL_H__ +#define __BOARD_INTERNAL_H__ + +int device_board_get_serial_number(char *buffer, int buffer_max); + +#endif + diff --git a/src/board-internal.c b/src/board-internal.c new file mode 100644 index 0000000..df99850 --- /dev/null +++ b/src/board-internal.c @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +int device_board_get_serial_number(char *buffer, int buffer_max) +{ + int ret; + + if (!buffer) + return -1; + + ret = hal_device_board_get_device_serial_number(buffer, buffer_max); + if (ret < 0) + return ret; + + return 0; +} -- 2.7.4