Commit Graph

8 Commits

Author SHA1 Message Date
Xavier Deguillard
34598d4337 remove dependency on glog
Summary:
The EdenFS codebase uses folly/logging/xlog to log, but we were still relying
on glog for the various CHECK macros. Since xlog also contains equivalent CHECK
macros, let's just rely on them instead.

This is mostly codemodded + arc lint + various fixes to get it compile.

Reviewed By: chadaustin

Differential Revision: D24871174

fbshipit-source-id: 4d2a691df235d6dbd0fbd8f7c19d5a956e86b31c
2020-11-10 16:31:15 -08:00
Andres Suarez
fbdb46f5cb Tidy up license headers
Reviewed By: chadaustin

Differential Revision: D17872966

fbshipit-source-id: cd60a364a2146f0dadbeca693b1d4a5d7c97ff63
2019-10-11 05:28:23 -07:00
Adam Simpkins
aa5e6c7295 update license headers in C++ files
Summary:
Update the copyright & license headers in C++ files to reflect the
relicensing to GPLv2

Reviewed By: wez

Differential Revision: D15487078

fbshipit-source-id: 19f24c933a64ecad0d3a692d0f8d2a38b4194b1d
2019-06-19 17:02:45 -07:00
Adam Simpkins
163d92d617 add attachEventBase()/detachEventBase() to UnixSocket
Summary:
Add methods to UnixSocket and FutureUnixSocket to attach and detach from an
EventBase.  This makes it possible to construct a UnixSocket object without
having an EventBase yet and then attach it to an EventBase later.

Reviewed By: bolinfest

Differential Revision: D8053423

fbshipit-source-id: c4de00166dbc0e075b4e4cd81c3dd5b377ea9a52
2018-05-23 11:51:59 -07:00
Adam Simpkins
8e3c09a99a move folly/experimental/logging to folly/logging/
Summary:
Promote the folly logging code out of the experimental subdirectory.
We have been using this for several months in a few projects and are pretty
happy with it so far.

After moving it out of the experimental/ subdirectory I plan to update
folly::Init() to automatically support configuring it via a `--logging` command
line flag (similar to the initialization it already does today for glog).

Reviewed By: yfeldblum, chadaustin

Differential Revision: D7755455

fbshipit-source-id: 052db34c97f7516728f7cbb1a5ad959def2f6efb
2018-04-30 21:29:29 -07:00
Adam Simpkins
28426f4d29 throw all errno exceptions as std::generic_category
Summary:
Fix the code to generate exceptions based on an errno error using
std::generic_category rather than std::system_category.

Reviewed By: yfeldblum

Differential Revision: D7329997

fbshipit-source-id: 3fe257bbbc7a631c801f31120592c8bdbc25c8bf
2018-03-20 13:38:45 -07:00
Chad Austin
697eb8a6fd run clang-format across eden
Summary:
```
find . \( -iname '*.cpp' -o -iname '*.h' \) -exec arc lint --apply-patches {} +
```

Differential Revision: D6820436

fbshipit-source-id: 173c0e3b5c023c1c9276f34e17d732f1dd161892
2018-01-26 11:20:31 -08:00
Adam Simpkins
db1f93b2aa add new UnixSocket and UnixSocketFuture helper classes
Summary:
Add new classes that help send data, file descriptors, and credential
information over unix domain sockets.

UnixSocket provides a low-level, raw callback API, similar to that provided by
the classes in folly/io/async/.  UnixSocketFuture is a slightly higher-level
wrapper class that provides a Future-based API on top of this.  I expect that
most places in eden will probably use the UnixSocketFuture API, but callers
that repeatedly wait for new messages (like the privhelper server) may want to
use the raw callback API instead.

This will help simplify several places in eden that communicate over unix
domain sockets.  Both the privhelper code and the takeover code needs to send
file descriptors over unix domain sockets.  They currently each use their own
separate message handling logic for this.  We currently communicate with the
hg_import_helper.py script over a pipe, but this could easily be switched to
use this new UnixSocket class as well.

Reviewed By: wez

Differential Revision: D6494981

fbshipit-source-id: 80bd7f06e5b884fc4148162e1a8a3b478acce209
2018-01-05 13:35:46 -08:00