feat: CLI-only version (without GTK)
Modify the build system and the source files to support building a CLI-only version with only glib2 as a dependency. Use CLI_ONLY=1 ./configure, then make clean all.
This commit is contained in:
@@ -476,7 +476,7 @@ static int simple_lec(RawBuffer *rb, unsigned char *frame, char *msg)
|
||||
|
||||
if(q_failures || p_failures || q_corrected || p_corrected)
|
||||
{
|
||||
PrintCLIorLabel(Closure->status,
|
||||
PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld L-EC P/Q results: %d/%d failures, %d/%d corrected (%s).\n",
|
||||
rb->lba, p_failures, q_failures, p_corrected, q_corrected, msg);
|
||||
return 1;
|
||||
@@ -558,7 +558,7 @@ int ValidateRawSector(RawBuffer *rb, unsigned char *frame, char *msg)
|
||||
/* Tell user that L-EC succeeded */
|
||||
|
||||
if(lec_did_sth)
|
||||
PrintCLIorLabel(Closure->status,
|
||||
PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by L-EC.\n",
|
||||
rb->lba);
|
||||
|
||||
@@ -891,7 +891,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{
|
||||
PrintCLIorLabel(Closure->status,
|
||||
PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Good. Data section passes EDC test.\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
@@ -907,7 +907,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{
|
||||
PrintCLIorLabel(Closure->status,
|
||||
PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader after correcting sync pattern.\n",
|
||||
rb->lba);
|
||||
|
||||
@@ -924,7 +924,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{
|
||||
PrintCLIorLabel(Closure->status,
|
||||
PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by iterative L-EC.\n",
|
||||
rb->lba);
|
||||
|
||||
@@ -947,7 +947,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(Closure->status,
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by smart L-EC.\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
@@ -959,7 +959,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(Closure->status,
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by plausible sector search (0).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
@@ -970,7 +970,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(Closure->status,
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by brute force plausible sector search (0).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
@@ -981,7 +981,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(Closure->status,
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by mutual ack heuristic (0).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
@@ -992,7 +992,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(Closure->status,
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by heuristic L-EC (0).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
@@ -1003,7 +1003,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(Closure->status,
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by plausible sector search (1).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
@@ -1014,7 +1014,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(Closure->status,
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by brute force plausible sector search (1).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
@@ -1025,7 +1025,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(Closure->status,
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by mutual ack heuristic (1).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
@@ -1036,7 +1036,7 @@ int TryCDFrameRecovery(RawBuffer *rb, unsigned char *outbuf)
|
||||
|
||||
if(CheckEDC(rb->recovered, rb->xaMode)
|
||||
&& CheckMSF(rb->recovered, rb->lba, STRICT_MSF_CHECK))
|
||||
{ PrintCLIorLabel(Closure->status,
|
||||
{ PrintCLIorLabel(STATUS_LABEL_OR_NULL,
|
||||
"Sector %lld: Recovered in raw reader by heuristic L-EC (1).\n",
|
||||
rb->lba);
|
||||
memcpy(outbuf, rb->recovered+rb->dataOffset, 2048);
|
||||
|
||||
Reference in New Issue
Block a user