Closed larsbrinkhoff closed 8 months ago
I stole my own MLDEV code from https://github.com/larsbrinkhoff/mldev and then hacked it mercilessly with no hope of merging it back. No regrets.
I tried it:
eswenson@swenson:~/ITS$ mlftp es 'ejs;ejs login' ejs.login
Opened connection to es contact MLDEV
mldev_open: DSK :EJS ;EJS LOGIN
ROPENO
0 words, 0 7-bit bytes
Segmentation fault (core dumped)
eswenson@swenson:~/ITS$
gdb backtrace says:
(gdb) backtrace
#0 0x00007ffff7e151ac in _IO_new_file_fopen (fp=fp@entry=0x5555555e22a0, filename=filename@entry=0x7fffffffe4c3 "ejs.login",
mode=mode@entry=0x6f0 <error: Cannot access memory at address 0x6f0>, is32not64=is32not64@entry=1) at ./libio/fileops.c:224
#1 0x00007ffff7e086ae in __fopen_internal (is32=1, mode=0x6f0 <error: Cannot access memory at address 0x6f0>,
filename=0x7fffffffe4c3 "ejs.login") at ./libio/iofopen.c:75
#2 _IO_new_fopen (filename=0x7fffffffe4c3 "ejs.login", mode=0x6f0 <error: Cannot access memory at address 0x6f0>)
at ./libio/iofopen.c:86
#3 0x0000555555556afb in main (argc=4, argv=0x7fffffffe1b8) at mlftp.c:154
@.***:~/ITS$ mlftp es 'ejs;ejs login' ejs.login Segmentation fault (core dumped)
Thanks for testing! I believe this is because an -r (or -w) is missing. I will add a check for that.
Usage is:
mlftp -r|w [-W<word format>] <host> <ITS file> <local file>
To read a file from ITS, use -r; to write, use -w. ITS file uses the conventional free-form syntax. The device, directory, and second file name are all optional. They default to DSK, .TEMP., and >, respectively.