Welcome, Guest. Please login or register.

Author Topic: lha return codes  (Read 4373 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline orangeTopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 2796
    • Show only replies by orange
lha return codes
« on: February 07, 2015, 03:05:47 AM »
what does "lha failed returncode 20" and similar mean?
Better sorry than worry.
 

Offline Oldsmobile_Mike

Re: lha return codes
« Reply #1 on: February 07, 2015, 03:35:24 AM »
Does it do it on every archive?   Using the right version for your processor?
Amiga 500: 2MB Chip|16MB Fast|30MHz 68030+68882|3.9|Indivision ECS|GVP A500HD+|Mechware card reader + 8GB CF|Cocolino|SCSI DVD-RAM
Amiga 2000: 2MB Chip|136MB Fast|50MHz 68060|3.9|Indivision ECS + GVP Spectrum|Mechware card reader + 8GB CF|AD516|X-Surf 100|RapidRoad|Cocolino|SCSI CD-RW
 Amiga videos and other misc. stuff at https://www.youtube.com/CompTechMike/videos
 

Offline Tenacious

  • Hero Member
  • *****
  • Join Date: Jul 2002
  • Posts: 1362
    • Show only replies by Tenacious
Re: lha return codes
« Reply #2 on: February 07, 2015, 03:37:28 AM »
In AmigaDos, a return code of 20 means a command failed and was aborted.  4-3 of "AmigaDOS" manual.

Are you working from a cli or shell?

Jeepers, Mike never sleeps!  ;)
 

Offline Oldsmobile_Mike

Re: lha return codes
« Reply #3 on: February 07, 2015, 03:45:11 AM »
Quote from: Tenacious;783233
Jeepers, Mike never sleeps!  ;)

Lucky me, just got home from work.  Before midnight for once!  No big roller derby party this weekend, it's NASA documentaries and amiga.org for me, this exciting Friday night, instead.  ;)

Now on to the guy's problem, I'd ask the usual questions.  Did lha work previously (and just now stopped working), or is this the first time using it?  What sequence of commands is he putting into it?  Does it work if he copies it to ram:, etc.  There's so many ways to troubleshoot this, but without more information it's kind of hard.  ;)
Amiga 500: 2MB Chip|16MB Fast|30MHz 68030+68882|3.9|Indivision ECS|GVP A500HD+|Mechware card reader + 8GB CF|Cocolino|SCSI DVD-RAM
Amiga 2000: 2MB Chip|136MB Fast|50MHz 68060|3.9|Indivision ECS + GVP Spectrum|Mechware card reader + 8GB CF|AD516|X-Surf 100|RapidRoad|Cocolino|SCSI CD-RW
 Amiga videos and other misc. stuff at https://www.youtube.com/CompTechMike/videos
 

Offline orangeTopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 2796
    • Show only replies by orange
Re: lha return codes
« Reply #4 on: February 07, 2015, 03:58:08 AM »
lha fails on some archives only, executing script, with code 10 or 20.
seems that 20 happens when filename contains nonstandard-ASCII char. but what is 10?
strangely, with error 10, it fails only in script.
thanks.
Better sorry than worry.
 

Offline Tenacious

  • Hero Member
  • *****
  • Join Date: Jul 2002
  • Posts: 1362
    • Show only replies by Tenacious
Re: lha return codes
« Reply #5 on: February 07, 2015, 04:15:59 AM »
Quote from: orange;783236
lha fails on some archives only, executing script, with code 10 or 20.
seems that 20 happens when filename contains nonstandard-ASCII char. but what is 10?
strangely, with error 10, it fails only in script.
thanks.


10 is a script failure.  The codes are not clearly defined in the manual.  Do you have a manual?  Can you list the script here?
 

Offline orangeTopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 2796
    • Show only replies by orange
Re: lha return codes
« Reply #6 on: February 07, 2015, 04:43:11 AM »
Quote from: Tenacious;783237
10 is a script failure.  The codes are not clearly defined in the manual.  Do you have a manual?  Can you list the script here?


its very simple, albeit long, script:
"

makedir RAM:lhat
lha x -a -r -e -x -M -m -n -q  "PC:lha/dir1/archive1.LHA" RAM:lhat/
lha a -a -r -e -x -M -n -q -z  "PC:lha_out/dir1/archive1.LHA" RAM:lhat/
delete  RAM:#? ALL FORCE QUIET

...
"
er, didn't know there was difference between cli and shell, think this is from cli.

edit: it seems there's a problem in filename. it says "Unable to open output file". is there a way to use utf-8 in cli?
« Last Edit: February 07, 2015, 04:54:16 AM by orange »
Better sorry than worry.
 

Offline Tenacious

  • Hero Member
  • *****
  • Join Date: Jul 2002
  • Posts: 1362
    • Show only replies by Tenacious
Re: lha return codes
« Reply #7 on: February 07, 2015, 05:16:27 AM »
Quote from: orange;783239
"
er, didn't know there was difference between cli and shell, think this is from cli.

edit: it seems there's a problem in filename. it says "Unable to open output file". is there a way to use utf-8 in cli?

WOW! That's definitely more sophisticated than the way I unarchive stuff (I simply use a menu button in my favorite dir utilities).  Clearly, I'm out of my depth, but interested.  Did you write this script, and if so, what is the intent behind the intricacy?  How do you substitute the name of the archive you are extracting?  It's great to see how others do things.  ;)

I asked about the cli or shell to find out if you were fat-fingering a command each time.
 

Offline Tenacious

  • Hero Member
  • *****
  • Join Date: Jul 2002
  • Posts: 1362
    • Show only replies by Tenacious
Re: lha return codes
« Reply #8 on: February 07, 2015, 05:22:48 AM »
IIRC, my 'button' unarchives a selected file.lha to my RAM DISK: and gives it a name (output file) and directory structure that the archive dictates.
 I probably don't understand what you're doing.
« Last Edit: February 07, 2015, 05:26:30 AM by Tenacious »
 

Offline Oldsmobile_Mike

Re: lha return codes
« Reply #9 on: February 07, 2015, 05:30:50 AM »
Quote from: orange;783239
lha x -a -r -e -x -M -m -n -q  "PC:lha/dir1/archive1.LHA" RAM:lhat/
lha a -a -r -e -x -M -n -q -z  "PC:lha_out/dir1/archive1.LHA" RAM:lhat/

I just looked up about half of those options, and definitely... wow!

+1 curious as to what you're trying to do?
Amiga 500: 2MB Chip|16MB Fast|30MHz 68030+68882|3.9|Indivision ECS|GVP A500HD+|Mechware card reader + 8GB CF|Cocolino|SCSI DVD-RAM
Amiga 2000: 2MB Chip|136MB Fast|50MHz 68060|3.9|Indivision ECS + GVP Spectrum|Mechware card reader + 8GB CF|AD516|X-Surf 100|RapidRoad|Cocolino|SCSI CD-RW
 Amiga videos and other misc. stuff at https://www.youtube.com/CompTechMike/videos
 

Offline orangeTopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 2796
    • Show only replies by orange
Re: lha return codes
« Reply #10 on: February 07, 2015, 04:43:33 PM »
I'm trying to unarchive each .lha and then repack it in .lha but with zero compression. Later I can pack them all again with 7z, for eg., to achieve (much) higher compression ratio. I've written a perl script that creates this script for every .lha. Because some archives are inside archives, I've done this recursively to second level. But there's a lot of filenames with nonASCII.
Better sorry than worry.
 

Offline motrucker

Re: lha return codes
« Reply #11 on: February 07, 2015, 04:53:40 PM »
I can be very little help here, as I too cheat - using DiskMaster 2 and just mashing the button to un-arc the archive. Thee programs can make us quite lazy, can't they..... (but they're fast)
But, Orange, if you don't have the manual - you can grab a copy at Bombjack.org in PDF format.
« Last Edit: February 07, 2015, 04:56:13 PM by motrucker »
A2000 GVP 40MHz \'030, 21Mb RAM SD/FF, 2 floppies, internal CD-ROM drive, micromys v3 w/laser mouse
A1000 Microbotics Starboard II w/2Mb 1080, & external floppy (AIRdrive)
C-128 w/1571, 1750, & Final Cartridge III+
 

Offline Tenacious

  • Hero Member
  • *****
  • Join Date: Jul 2002
  • Posts: 1362
    • Show only replies by Tenacious
Re: lha return codes
« Reply #12 on: February 07, 2015, 04:57:47 PM »
Like many here, you're operating beyond my simple user status.  :)

@ motrucker  Thanks for the link.  I'll check it out, too.
« Last Edit: February 07, 2015, 05:00:27 PM by Tenacious »
 

Offline Tenacious

  • Hero Member
  • *****
  • Join Date: Jul 2002
  • Posts: 1362
    • Show only replies by Tenacious
Re: lha return codes
« Reply #13 on: February 07, 2015, 05:29:55 PM »
That's a very impressive repository, even Rob Peck's "The Amiga Companion" is there!
 

Offline Thomas

Re: lha return codes
« Reply #14 on: February 07, 2015, 10:03:21 PM »
Quote from: orange;783236
lha fails on some archives only, executing script, with code 10 or 20.
seems that 20 happens when filename contains nonstandard-ASCII char. but what is 10?
strangely, with error 10, it fails only in script.
thanks.



10 and 20 mean nothing. They are just standard AmigaDOS return codes for error resp. failure. You have to read the error messages Lha prints out. Don't use >nil: or similar to hide the messages if you need them.