mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-17 03:07:24 -05:00
EDACS: Tweak Regroup Message Verbosity; Tweak Patch Verbosity;
This commit is contained in:
188
src/edacs-fme.c
188
src/edacs-fme.c
@@ -721,68 +721,72 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||||||
fprintf (stderr, "%s", KYEL);
|
fprintf (stderr, "%s", KYEL);
|
||||||
fprintf (stderr, " System Dynamic Regroup Plan Bitmap");
|
fprintf (stderr, " System Dynamic Regroup Plan Bitmap");
|
||||||
|
|
||||||
// Deduplicate some code with a for (foreach would have been great here)
|
//this message gets EXTREMELY LONG, so lets hide it behind the payload verbosity
|
||||||
for (int i = 0; i < 2; i++)
|
if (opts->payload == 1)
|
||||||
{
|
{
|
||||||
int bank;
|
// Deduplicate some code with a for (foreach would have been great here)
|
||||||
int resident;
|
for (int i = 0; i < 2; i++)
|
||||||
int active;
|
{
|
||||||
|
int bank;
|
||||||
|
int resident;
|
||||||
|
int active;
|
||||||
|
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0:
|
case 0:
|
||||||
bank = bank_1;
|
bank = bank_1;
|
||||||
resident = resident_1;
|
resident = resident_1;
|
||||||
active = active_1;
|
active = active_1;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
bank = bank_2;
|
bank = bank_2;
|
||||||
resident = resident_2;
|
resident = resident_2;
|
||||||
active = active_2;
|
active = active_2;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
fprintf (stderr, " :: Plan Bank [%1d] Resident [", bank);
|
|
||||||
|
|
||||||
int plan = bank * 8;
|
|
||||||
int first = 1;
|
|
||||||
while (resident != 0) {
|
|
||||||
if (resident & 0x1 == 1) {
|
|
||||||
if (first == 1)
|
|
||||||
{
|
|
||||||
first = 0;
|
|
||||||
fprintf (stderr, "%d", plan);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fprintf (stderr, ", %d", plan);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
resident >>= 1;
|
|
||||||
plan++;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf (stderr, "] Active [");
|
fprintf (stderr, " :: Plan Bank [%1d] Resident [", bank);
|
||||||
|
|
||||||
plan = bank * 8;
|
int plan = bank * 8;
|
||||||
first = 1;
|
int first = 1;
|
||||||
while (active != 0) {
|
while (resident != 0) {
|
||||||
if (active & 0x1 == 1) {
|
if (resident & 0x1 == 1) {
|
||||||
if (first == 1)
|
if (first == 1)
|
||||||
{
|
{
|
||||||
first = 0;
|
first = 0;
|
||||||
fprintf (stderr, "%d", plan);
|
fprintf (stderr, "%d", plan);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf (stderr, ", %d", plan);
|
fprintf (stderr, ", %d", plan);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
resident >>= 1;
|
||||||
|
plan++;
|
||||||
}
|
}
|
||||||
active >>= 1;
|
|
||||||
plan++;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf (stderr, "]");
|
fprintf (stderr, "] Active [");
|
||||||
}
|
|
||||||
|
plan = bank * 8;
|
||||||
|
first = 1;
|
||||||
|
while (active != 0) {
|
||||||
|
if (active & 0x1 == 1) {
|
||||||
|
if (first == 1)
|
||||||
|
{
|
||||||
|
first = 0;
|
||||||
|
fprintf (stderr, "%d", plan);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fprintf (stderr, ", %d", plan);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
active >>= 1;
|
||||||
|
plan++;
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf (stderr, "]");
|
||||||
|
}
|
||||||
|
} //end payload
|
||||||
|
|
||||||
fprintf (stderr, "%s", KNRM);
|
fprintf (stderr, "%s", KNRM);
|
||||||
}
|
}
|
||||||
@@ -799,8 +803,8 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||||||
|
|
||||||
fprintf (stderr, "%s", KMAG); //just make it stick out for now
|
fprintf (stderr, "%s", KMAG); //just make it stick out for now
|
||||||
fprintf (stderr, " Patch :: SSN: %03d; SGID: %05d; Target: %07d;", ssn, sgid, target);
|
fprintf (stderr, " Patch :: SSN: %03d; SGID: %05d; Target: %07d;", ssn, sgid, target);
|
||||||
fprintf (stderr, " UNK1: %X;", unk1); //this value seems to always be zero
|
if (unk1) fprintf (stderr, " UNK1: %X;", unk1); //this value seems to always be zero
|
||||||
fprintf (stderr, " UNK2: %X;", unk2); //this value seems to always be zero
|
if (unk2) fprintf (stderr, " UNK2: %X;", unk2); //this value seems to always be zero
|
||||||
fprintf (stderr, "%s", KNRM);
|
fprintf (stderr, "%s", KNRM);
|
||||||
}
|
}
|
||||||
//Serial Number Request (not seen in the wild, see US patent 20030190923, Figure 2b)
|
//Serial Number Request (not seen in the wild, see US patent 20030190923, Figure 2b)
|
||||||
@@ -1723,47 +1727,53 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||||||
int active = (msg_1 & 0xFF);
|
int active = (msg_1 & 0xFF);
|
||||||
|
|
||||||
fprintf (stderr, "%s", KYEL);
|
fprintf (stderr, "%s", KYEL);
|
||||||
fprintf (stderr, " System Dynamic Regroup Plan Bitmap :: Plan Bank [%1d] Resident [", bank);
|
fprintf (stderr, " System Dynamic Regroup Plan Bitmap");
|
||||||
|
|
||||||
int plan = bank * 8;
|
//this message gets EXTREMELY LONG, so lets hide it behind the payload verbosity
|
||||||
int first = 1;
|
if (opts->payload == 1)
|
||||||
while (resident != 0) {
|
{
|
||||||
if (resident & 0x1 == 1) {
|
fprintf (stderr, " :: Plan Bank [%1d] Resident [", bank);
|
||||||
if (first == 1)
|
int plan = bank * 8;
|
||||||
{
|
int first = 1;
|
||||||
first = 0;
|
while (resident != 0) {
|
||||||
fprintf (stderr, "%d", plan);
|
if (resident & 0x1 == 1) {
|
||||||
}
|
if (first == 1)
|
||||||
else
|
{
|
||||||
{
|
first = 0;
|
||||||
fprintf (stderr, ", %d", plan);
|
fprintf (stderr, "%d", plan);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fprintf (stderr, ", %d", plan);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
resident >>= 1;
|
||||||
|
plan++;
|
||||||
}
|
}
|
||||||
resident >>= 1;
|
|
||||||
plan++;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf (stderr, "] Active [");
|
fprintf (stderr, "] Active [");
|
||||||
|
|
||||||
plan = bank * 8;
|
plan = bank * 8;
|
||||||
first = 1;
|
first = 1;
|
||||||
while (active != 0) {
|
while (active != 0) {
|
||||||
if (active & 0x1 == 1) {
|
if (active & 0x1 == 1) {
|
||||||
if (first == 1)
|
if (first == 1)
|
||||||
{
|
{
|
||||||
first = 0;
|
first = 0;
|
||||||
fprintf (stderr, "%d", plan);
|
fprintf (stderr, "%d", plan);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf (stderr, ", %d", plan);
|
fprintf (stderr, ", %d", plan);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
active >>= 1;
|
||||||
|
plan++;
|
||||||
}
|
}
|
||||||
active >>= 1;
|
|
||||||
plan++;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf (stderr, "]");
|
fprintf (stderr, "]");
|
||||||
|
} //end payload
|
||||||
|
|
||||||
fprintf (stderr, "%s", KNRM);
|
fprintf (stderr, "%s", KNRM);
|
||||||
}
|
}
|
||||||
//Assignment to Auxiliary Control Channel (6.2.4.15)
|
//Assignment to Auxiliary Control Channel (6.2.4.15)
|
||||||
|
|||||||
Reference in New Issue
Block a user