/**************************************************************************** * apps/system/zmodem/sz_main.c * * 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 #include #include #include #include #include #include #include #include #include #include #include "system/zmodem.h" #include "zm.h" /**************************************************************************** * Private Functions ****************************************************************************/ static void show_usage(FAR const char *progname, int errcode) { fprintf(stderr, "USAGE: %s [OPTIONS] [ [ ...]]\n", progname); fprintf(stderr, "\nWhere:\n"); fprintf(stderr, "\t is the local file name\n"); fprintf(stderr, "\nand OPTIONS include the following:\n"); fprintf(stderr, "\t-d : Communication device to use. Default: %s\n", CONFIG_SYSTEM_ZMODEM_DEVNAME); fprintf(stderr, "\t-r : Remote file name. Default \n"); fprintf(stderr, "\t-x : Transfer type\n"); fprintf(stderr, "\t\t0: Normal file (default)\n"); fprintf(stderr, "\t\t1: Binary file\n"); fprintf(stderr, "\t\t2: Convert \\n to local EOF convention\n"); fprintf(stderr, "\t\t3: Resume or append to existing file\n"); fprintf(stderr, "\t-o