xiaoxiang781216 commented on code in PR #3170: URL: https://github.com/apache/nuttx-apps/pull/3170#discussion_r2312564485
########## examples/shv-nxboot-updater/shv_nxboot_updater.c: ########## @@ -0,0 +1,424 @@ +/**************************************************************************** + * apps/examples/shv-nxboot-updater/shv_nxboot_updater.c + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include <shv/tree/shv_tree.h> +#include <shv/tree/shv_file_node.h> +#include <shv/tree/shv_connection.h> +#include <shv/tree/shv_methods.h> +#include <shv/tree/shv_clayer_posix.h> +#include <shv/tree/shv_dotdevice_node.h> + +#include <stdio.h> +#include <signal.h> +#include <time.h> +#include <unistd.h> +#include <stdlib.h> +#include <fcntl.h> +#include <sys/ioctl.h> +#include <semaphore.h> + +#ifdef __NuttX__ +#include <nxboot.h> +#include <nuttx/mtd/mtd.h> +#include <sys/boardctl.h> +#endif + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static int shv_nxboot_opener(shv_file_node_t *item); +static int shv_root_device_type(shv_con_ctx_t * shv_ctx, shv_node_t *item, Review Comment: ```suggestion static int shv_root_device_type(shv_con_ctx_t *shv_ctx, shv_node_t *item, ``` ########## netutils/libshvc/Makefile: ########## @@ -0,0 +1,60 @@ +############################################################################# +# apps/netutils/libshvc/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you 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 $(APPDIR)/Make.defs + +SHVDIR = shv-libs4c + +# Where to look for the extra object files +EXTOBJS = $(wildcard ./$(SHVDIR)/_build/user/libs4c/libshvtree/*.o) +EXTOBJS += $(wildcard ./$(SHVDIR)/_build/user/libs4c/libshvchainpack/*.o) +EXTOBJS += $(wildcard ./$(SHVDIR)/_build/user/submodule/ulut/ulut/*.o) + +$(SHVDIR): + $(call CLONE, https://github.com/silicon-heaven/shv-libs4c, $(SHVDIR), ) + +# Compile the library. Also pass all the NuttX Makefile variables. +compile-libshv: $(SHVDIR) + - $(Q) ( cd $(SHVDIR) && git fetch origin dev-zdebanos ) > /dev/null 2>&1 Review Comment: why add - ########## examples/shv-nxboot-updater/shv_nxboot_updater.c: ########## @@ -0,0 +1,424 @@ +/**************************************************************************** + * apps/examples/shv-nxboot-updater/shv_nxboot_updater.c + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include <shv/tree/shv_tree.h> +#include <shv/tree/shv_file_node.h> +#include <shv/tree/shv_connection.h> +#include <shv/tree/shv_methods.h> +#include <shv/tree/shv_clayer_posix.h> +#include <shv/tree/shv_dotdevice_node.h> + +#include <stdio.h> +#include <signal.h> +#include <time.h> +#include <unistd.h> +#include <stdlib.h> +#include <fcntl.h> +#include <sys/ioctl.h> +#include <semaphore.h> + +#ifdef __NuttX__ Review Comment: why need -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
