From: Youngjae Cho Date: Mon, 14 Jun 2021 02:46:12 +0000 (+0900) Subject: Add board-internal to get serial number X-Git-Tag: accepted/tizen/unified/20210621.123245^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=559b9433ea6be7fa3fe3e42360d08be1b73b3183;p=platform%2Fcore%2Fapi%2Fdevice.git Add board-internal to get serial number Change-Id: I97e25f8fabc30fd5b4e26ec371b16430c57107d9 Signed-off-by: Youngjae Cho --- 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; +}