Return Codes

Post here if you have questions about how to use the program
LHammonds
Posts: 3
Joined: Mon Oct 22, 2012 6:54 pm

Return Codes

Postby LHammonds » Mon Oct 22, 2012 7:16 pm

Is there any documentation on the various return codes when errors occur?

I capture the exit code whenever I run the program as follows:

Code: Select all

#!/bin/bash
fsarchiver ** parameters here **
ReturnCode=$?
if [ ${ReturnCode} != 0 ]; then
  echo "fsarchive error. Return Code = ${ReturnCode}"
fi


Thanks,
LHammonds

LHammonds
Posts: 3
Joined: Mon Oct 22, 2012 6:54 pm

Re: Return Codes

Postby LHammonds » Fri Apr 14, 2017 2:29 pm

Dang it, did a google search looking for return codes for fsarchiver and got my own thread again.

EDIT:

I did some digging in the source code to see if I could catch a glimpse of something that looked like return codes and I found this:

Source = https://github.com/fdupoux/fsarchiver/b ... archiver.h

Code: Select all

// -------------------------------- fsarchiver errors ---------------------------------------------
enum {FSAERR_SUCCESS=0,           // success
      FSAERR_UNKNOWN=-1,          // uknown error (default code that means error)
      FSAERR_ENOMEM=-2,           // out of memory error
      FSAERR_EINVAL=-3,           // invalid parameter
      FSAERR_ENOENT=-4,           // entry not found
      FSAERR_ENDOFFILE=-5,        // end of file/queue
      FSAERR_WRONGTYPE=-6,        // wrong type of data
      FSAERR_NOTOPEN=-7,          // resource has been closed
      FSAERR_ENOSPC=-8,           // no space left on device
      FSAERR_SEEK=-9,             // lseek64 error
      FSAERR_READ=-10,            // read error
      FSAERR_WRITE=-11            // write error
};


Return to “How to use FSArchiver”

Who is online

Users browsing this forum: No registered users and 1 guest