#3078 use the ERROR and PRINT macros consistently
Closed: Fixed 5 years ago by pbrezina. Opened 8 years ago by jhrozek.

we have macros like ERROR and PRINT in the tools code but sometimes also just call printf or fprintf. We should choose one or the other and stick with it.


Fields changed

milestone: NEEDS_TRIAGE => SSSD Deferred

Fields changed

rhbz: => 0

Metadata Update from @jhrozek:
- Issue set to the milestone: SSSD Patches welcome

8 years ago
  • master
    • f24e5ab - Added ERROR and PRINT macros to the tools

Metadata Update from @pbrezina:
- Custom field design_review reset (from 0)
- Custom field mark reset (from 0)
- Custom field patch reset (from 0)
- Custom field review reset (from 0)
- Custom field sensitive reset (from 0)
- Custom field testsupdated reset (from 0)

5 years ago

Metadata Update from @mzidek:
- Custom field design_review adjusted to on (was: false)
- Custom field mark adjusted to on (was: false)
- Custom field patch adjusted to on (was: false)
- Custom field review adjusted to on (was: false)
- Custom field sensitive adjusted to on (was: false)
- Custom field testsupdated adjusted to on (was: false)
- Issue status updated to: Open (was: Closed)

5 years ago

I am reopening this because there still are printf and fprintf used in SSSD where PRINT and ERROR could be used.

Sorry I did not check the issue associated with the PR and though it was only about the sss_tools.c

So this needs one or few more patches still.

Ahg... those are not strings we translate. Closing again. Sorry for the spam :D

Metadata Update from @mzidek:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

5 years ago

What about sssctl_domains.c:

puts(_("None so far.\n"));

?

There is also:

sssctl/sssctl_cert.c:            puts(name);
sssctl/sssctl_cert.c:        puts(" - no mapped users found -");
sssctl/sssctl_domains.c:        puts(name);

but those are not wrapped in _() so not so sure...

Metadata Update from @atikhonov:
- Issue status updated to: Open (was: Closed)

5 years ago

This can be changed to PRINT

puts(_("None so far.\n"));

This cannot be changed to PRINT:

sssctl/sssctl_cert.c:            puts(name);
sssctl/sssctl_domains.c:        puts(name);

This can be changed to PRINT if we want to translate the string (makes sense IMO):

sssctl/sssctl_cert.c:        puts(" - no mapped users found -");

@mzidek I can make those changes if you want.

@mzidek I can make those changes if you want.

Ok, if you send patches, we will review them. Thanks.

Metadata Update from @atikhonov:
- Issue tagged with: PR

5 years ago
  • master
    • 258e9a5 - Added PRINT macro in the sssctl tool

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/4111

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Log in to comment on this ticket.

Metadata