Page MenuHomeFreeBSD

savecore: Complete libxo transition.
ClosedPublic

Authored by bses30074_gmail.com on Aug 9 2023, 12:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 12, 5:02 AM
Unknown Object (File)
Fri, May 3, 10:53 AM
Unknown Object (File)
Sat, Apr 27, 6:00 PM
Unknown Object (File)
Fri, Apr 26, 1:24 AM
Unknown Object (File)
Apr 3 2024, 9:28 PM
Unknown Object (File)
Apr 3 2024, 6:22 PM
Unknown Object (File)
Jan 18 2024, 5:25 PM
Unknown Object (File)
Dec 23 2023, 1:25 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 53027
Build 49918: arc lint + arc unit

Event Timeline

sbin/savecore/savecore.c
1571
sbin/savecore/savecore.c
1554

strange, why not logmsg() here? are there other instances?

sbin/savecore/savecore.c
1554

I scan the code quickly. It seems if the 'checkfor' flag is true, it uses the printf function instead of logmsg function. The checkfor flag is set if -C is set. The man page of savecore says "display a brief message to indicate the status". So maybe the brief message means using the simple printf function to show the message.

Update with exit(EXIT_SUCCESS) to replace return (0)

sbin/savecore/savecore.c
1571

Ask about this code. Should I always using exit function instead of return in main function.

des added inline comments.
sbin/savecore/savecore.c
1571

It's a matter of taste. The result is the same but calling exit() makes it clearer what's going on. It's especially relevant in programs that have multiple exit points, as is the case here.

This revision is now accepted and ready to land.Aug 10 2023, 7:36 PM
This revision was automatically updated to reflect the committed changes.