Improve -S parameter by allowing longer path

Adam Lackorzynski adam at os.inf.tu-dresden.de
Sun Dec 8 10:52:00 UTC 2013


Hi,

On Sat Dec 07, 2013 at 16:50:45 -0800, krzysztof.m.sywula at linux.intel.com wrote:
> sending a patch to make -S parameter able to take 256 characters long path
> instead of original 33

Thanks, it's in. The reason it was 33 is probably that it fits into the
on-screen window, so I have adapted that as well.
 
> diff --git i/src/minicom.c w/src/minicom.c
> index e1a557b..f043c30 100644
> --- i/src/minicom.c
> +++ w/src/minicom.c
> @@ -1255,7 +1255,7 @@ int main(int argc, char **argv)
>            vt_set(addlf, -1, docap, -1, -1, -1, -1, -1, addcr);
>            break;
>          case 'S': /* start Script */
> -          strncpy(scr_name, optarg, 33);
> +          strncpy(scr_name, optarg, 256);
>            break;
>          case '7': /* 7bit fallback mode */
>           screen_ibmpc = screen_iso = 0;
> diff --git i/src/minicom.h w/src/minicom.h
> index 129e826..2c96aef 100644
> --- i/src/minicom.h
> +++ w/src/minicom.h
> @@ -100,7 +100,7 @@ EXTERN int alt_override;/* -m option */
>  EXTERN char parfile[256]; /* Global parameter file */
>  EXTERN char pparfile[256]; /* Personal parameter file */
> 
> -EXTERN char scr_name[33];   /* Name of last script */
> +EXTERN char scr_name[256];   /* Name of last script */
>  EXTERN char scr_user[33];   /* Login name to use with script */
>  EXTERN char scr_passwd[33]; /* Password to use with script */
> 
> Thanks,
> Krzysztof Sywula
> 
> -- 
> minicom-devel mailing list <minicom-devel at lists.alioth.debian.org>
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/minicom-devel

Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/



More information about the minicom-devel mailing list