Add board-internal to get serial number 69/259769/4 accepted/tizen/unified/20210621.123245 submit/tizen/20210618.075427
authorYoungjae Cho <y0.cho@samsung.com>
Mon, 14 Jun 2021 02:46:12 +0000 (11:46 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Fri, 18 Jun 2021 05:03:33 +0000 (14:03 +0900)
Change-Id: I97e25f8fabc30fd5b4e26ec371b16430c57107d9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
include/board-internal.h [new file with mode: 0644]
src/board-internal.c [new file with mode: 0644]

diff --git a/include/board-internal.h b/include/board-internal.h
new file mode 100644 (file)
index 0000000..7b7a061
--- /dev/null
@@ -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 (file)
index 0000000..df99850
--- /dev/null
@@ -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 <hal/device/hal-board.h>
+
+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;
+}