Page MenuHomeFreeBSD

crossbuild: make mkioctls script work on Linux and MacOS
ClosedPublic

Authored by arichardson on Feb 7 2018, 4:59 PM.
Tags
None
Referenced Files
F170046028: D14246.id39010.diff
Thu, Sep 3, 8:45 AM
F169930031: D14246.diff
Thu, Sep 3, 12:22 AM
Unknown Object (File)
Wed, Sep 2, 2:08 PM
Unknown Object (File)
Wed, Sep 2, 12:56 PM
Unknown Object (File)
Tue, Sep 1, 10:23 PM
Unknown Object (File)
Tue, Sep 1, 1:55 PM
Unknown Object (File)
Tue, Sep 1, 11:16 AM
Unknown Object (File)
Mon, Aug 31, 10:47 PM
Subscribers
None

Details

Summary

Using find -s will not work with the Linux or MacOS find command. We pipe
to sort instead since the only real requirement here is that the order
stays the same. While I am touching this file I also fixed a == construct
which is not supported by POSIX sh but appears to work on FreeBSD.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Feb 7 2018, 5:03 PM
lib/libsysdecode/mkioctls
22 ↗(On Diff #39010)

Perhaps grep -q is portable?

22 ↗(On Diff #39010)

Interesting, I wonder how this snuck in here.

jhb added inline comments.
lib/libsysdecode/mkioctls
21 ↗(On Diff #39010)

Minor nit: Since the comments are sentences, capitalize the first word and add punctuation.

30 ↗(On Diff #39010)

Punctuation here as well.

  • use grep -q
  • make it actually work with pipefail by excluding dangling symlinks. Those would cause egrep to return non-zero and with pipefail fail the whole subshell.
This revision now requires review to proceed.Feb 11 2018, 10:35 AM

One last nit, and then I think we're good to go.

lib/libsysdecode/mkioctls
30 ↗(On Diff #39010)

'env ' can be eliminated here. It's not needed.

remove unnecessary env command

This revision was not accepted when it landed; it landed in state Needs Review.Aug 20 2018, 10:39 AM
This revision was automatically updated to reflect the committed changes.