Commit ea7f6b6c authored by Miguel Gómez Sexto's avatar Miguel Gómez Sexto

Fix debug messages

Signed-off-by: Miguel Gómez Sexto's avatarMiguel Gomez <magomez@igalia.com>
parent 0300cf4a
...@@ -14,7 +14,7 @@ int main(int argc, char **argv) ...@@ -14,7 +14,7 @@ int main(int argc, char **argv)
b = tdc_open(1); b = tdc_open(1);
if (!b) { if (!b) {
printf("Unable to open device with lun 1"); printf("Unable to open device with lun 1\n");
exit(1); exit(1);
} }
...@@ -119,9 +119,9 @@ int main(int argc, char **argv) ...@@ -119,9 +119,9 @@ int main(int argc, char **argv)
printf("Error setting active channels\n"); printf("Error setting active channels\n");
res = tdc_read(b, 6, t, 10, O_NONBLOCK); res = tdc_read(b, 6, t, 10, O_NONBLOCK);
if (res == -1 && errno == EINVAL) if (res == -1 && errno == EINVAL)
printf("Read from invalid chan OK"); printf("Read from invalid chan OK\n");
else else
printf("Reda from invalid chan wrong"); printf("Read from invalid chan wrong\n");
/* read from disabled chan */ /* read from disabled chan */
tdc_activate_all_channels(b); tdc_activate_all_channels(b);
...@@ -130,9 +130,9 @@ int main(int argc, char **argv) ...@@ -130,9 +130,9 @@ int main(int argc, char **argv)
printf("Error setting active channels\n"); printf("Error setting active channels\n");
res = tdc_read(b, 1, t, 10, O_NONBLOCK); res = tdc_read(b, 1, t, 10, O_NONBLOCK);
if (res == -1 && errno == EINVAL) if (res == -1 && errno == EINVAL)
printf("Read from disabled chan OK"); printf("Read from disabled chan OK\n");
else else
printf("Read from disabled chan wrong"); printf("Read from disabled chan wrong\n");
/* read with all chans disabled */ /* read with all chans disabled */
tdc_deactivate_all_channels(b); tdc_deactivate_all_channels(b);
...@@ -141,9 +141,9 @@ int main(int argc, char **argv) ...@@ -141,9 +141,9 @@ int main(int argc, char **argv)
printf("Error setting active channels\n"); printf("Error setting active channels\n");
res = tdc_read(b, 0, t, 10, O_NONBLOCK); res = tdc_read(b, 0, t, 10, O_NONBLOCK);
if (res == -1 && errno == EINVAL) if (res == -1 && errno == EINVAL)
printf("Read with disabled chans OK"); printf("Read with disabled chans OK\n");
else else
printf("Read with disabled chans wrong"); printf("Read with disabled chans wrong\n");
tdc_close(b); tdc_close(b);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment