Page MenuHomeFreeBSD

nanobsd: Normalize style in common functions
Needs ReviewPublic

Authored by senguptaangshuman17_gmail.com on Tue, Aug 18, 10:37 PM.
Tags
None
Referenced Files
F168681466: D58931.id184592.diff
Sat, Aug 29, 2:40 PM
F168659870: D58931.diff
Sat, Aug 29, 11:57 AM
F168650115: D58931.id184559.diff
Sat, Aug 29, 10:47 AM
F168609150: D58931.id184284.diff
Sat, Aug 29, 6:23 AM
F168607983: D58931.id.diff
Sat, Aug 29, 6:14 AM
F168596213: D58931.id184446.diff
Sat, Aug 29, 4:57 AM
F168567984: D58931.id184558.diff
Sat, Aug 29, 1:44 AM
Unknown Object (File)
Fri, Aug 28, 11:32 PM
Subscribers

Details

Summary

Prefer $(...) over backticks, drop the space before ";" in
conditionals, and normalize sentence-ending punctuation and line
wrapping in comments.

Use printf %s for metalog entries built from path variables so
backslash sequences in paths are printed verbatim.

Collapse the remaining split for loops onto one line to match the
style already used elsewhere in defaults.sh.

Replace sort | uniq with sort -u in setup_nanobsd() and cust_pkgng().

No functional change.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75881
Build 72764: arc lint + arc unit

Event Timeline

tools/tools/nanobsd/defaults.sh
56

I'm no tat all sure that I like this style. Some sentences have a full stop (period) at the end while others do not. It seems needlessly churny for no good benefit.

188

Preferring $() is a great change.

273

But two spaces after a period is something I can get behind.

289

This always should have been printf.

322

I like moving the 'do' up too.

736

shouldn't we indent the cpio more than the find?

Include style cleanups for FlashDevice.sub

Include style cleanups for FlashDevice.sub

Address review comments: style normalization, FlashDevice.sub fixes, and comment cleanups

The full stack of commits can be found here coderangshu/freebsd-src

Thank you! It is easier for me to track these changes directly from git.
I would remind consumers of this branch, that it gets interactively rebased on top of the main branch on a weekly basis.

Style and comment formatting fixups in defaults.sh