Header hygiene

This commit is contained in:
Marcus Holland-Moritz 2020-11-29 01:42:29 +01:00
parent acc8c0e25a
commit 9c3fb8b00f
49 changed files with 248 additions and 87 deletions

View File

@ -21,19 +21,20 @@
#pragma once #pragma once
#include <future> #include <cstddef>
#include <limits> #include <cstdint>
#include <memory>
#include <mutex>
#include "dwarfs/fstypes.h" #include <future>
#include "dwarfs/logger.h" #include <memory>
#include "dwarfs/block_compressor.h"
namespace dwarfs { namespace dwarfs {
struct block_cache_options; struct block_cache_options;
class cached_block; class block_range;
class logger;
class block_cache { class block_cache {
public: public:

View File

@ -21,7 +21,11 @@
#pragma once #pragma once
#include <cstdint>
#include <cstdio>
#include <memory> #include <memory>
#include <string>
#include <utility>
#include <vector> #include <vector>
namespace dwarfs { namespace dwarfs {

View File

@ -21,15 +21,15 @@
#pragma once #pragma once
#include <cstddef>
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "dwarfs/logger.h"
namespace dwarfs { namespace dwarfs {
class filesystem_writer; class filesystem_writer;
class inode; class inode;
class logger;
class os_access; class os_access;
class progress; class progress;

View File

@ -21,14 +21,18 @@
#pragma once #pragma once
#include <array> #include <atomic>
#include <ostream> #include <cstddef>
#include <iosfwd>
#include <mutex>
#include <string>
#include "dwarfs/logger.h" #include "dwarfs/logger.h"
#include "dwarfs/progress.h"
namespace dwarfs { namespace dwarfs {
class progress;
class console_writer : public logger { class console_writer : public logger {
public: public:
console_writer(std::ostream& os, bool is_terminal, size_t width, console_writer(std::ostream& os, bool is_terminal, size_t width,

View File

@ -22,7 +22,11 @@
#pragma once #pragma once
#include <array> #include <array>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <memory> #include <memory>
#include <string>
#include <string_view> #include <string_view>
#include <vector> #include <vector>
@ -30,10 +34,15 @@
#include "dwarfs/file_interface.h" #include "dwarfs/file_interface.h"
#include "dwarfs/gen-cpp2/metadata_types.h"
namespace dwarfs { namespace dwarfs {
namespace thrift::metadata {
class entry;
class metadata;
} // namespace thrift::metadata
class file; class file;
class link; class link;
class dir; class dir;

View File

@ -21,27 +21,33 @@
#pragma once #pragma once
#include <exception> #include <cstddef>
#include <cstdint>
#include <functional> #include <functional>
#include <iosfwd>
#include <memory> #include <memory>
#include <ostream> #include <optional>
#include <string> #include <string>
#include <string_view>
#include <utility>
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <sys/types.h> #include <sys/types.h>
#include "dwarfs/error.h" #include <folly/Expected.h>
#include "dwarfs/logger.h"
#include "dwarfs/metadata_v2.h" #include "dwarfs/metadata_types.h"
#include "dwarfs/mmif.h"
struct stat;
struct statvfs;
namespace dwarfs { namespace dwarfs {
struct iovec_read_buf;
struct block_cache_options; struct block_cache_options;
struct iovec_read_buf;
class filesystem_writer; class filesystem_writer;
class logger;
class mmif;
class progress; class progress;
class filesystem_v2 { class filesystem_v2 {

View File

@ -21,7 +21,11 @@
#pragma once #pragma once
#include <cstddef>
#include <cstdint>
#include <memory>
#include <ostream> #include <ostream>
#include <utility>
#include <vector> #include <vector>
#include "dwarfs/fstypes.h" #include "dwarfs/fstypes.h"
@ -32,6 +36,7 @@ namespace dwarfs {
class block_compressor; class block_compressor;
class logger; class logger;
class progress; class progress;
class worker_group;
class section { class section {
public: public:

View File

@ -21,12 +21,13 @@
#pragma once #pragma once
#include <cstddef>
#include <cstdint> #include <cstdint>
#include <iostream> #include <iosfwd>
#include <memory> #include <memory>
#include <stdexcept> #include <string>
#include <sys/uio.h> #include <bits/types/struct_iovec.h>
#include <folly/small_vector.h> #include <folly/small_vector.h>
@ -62,7 +63,7 @@ struct iovec_read_buf {
folly::small_vector<block_range, inline_storage> ranges; folly::small_vector<block_range, inline_storage> ranges;
}; };
constexpr uint8_t MAJOR_VERSION = 1; constexpr uint8_t MAJOR_VERSION = 2;
constexpr uint8_t MINOR_VERSION = 0; constexpr uint8_t MINOR_VERSION = 0;
enum class section_type : uint16_t { enum class section_type : uint16_t {

View File

@ -23,6 +23,7 @@
#include <cstdint> #include <cstdint>
#include <limits> #include <limits>
#include <string>
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>

View File

@ -19,7 +19,7 @@
* along with dwarfs. If not, see <https://www.gnu.org/licenses/>. * along with dwarfs. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include <ostream> #include <iosfwd>
#include <vector> #include <vector>
#include "dwarfs/fstypes.h" #include "dwarfs/fstypes.h"

View File

@ -21,15 +21,13 @@
#pragma once #pragma once
#include <cstddef>
#include <functional> #include <functional>
#include <memory> #include <memory>
#include <ostream>
#include "dwarfs/file_interface.h"
#include "dwarfs/inode.h"
namespace dwarfs { namespace dwarfs {
class inode;
class script; class script;
class inode_manager { class inode_manager {

View File

@ -21,15 +21,21 @@
#pragma once #pragma once
#include <cstddef>
#include <iosfwd>
#include <memory> #include <memory>
#include <string>
#include <sys/types.h>
#include "dwarfs/block_cache.h"
#include "dwarfs/fstypes.h"
#include "dwarfs/logger.h"
#include "dwarfs/metadata_types.h" #include "dwarfs/metadata_types.h"
namespace dwarfs { namespace dwarfs {
class block_cache;
class logger;
struct iovec_read_buf;
class inode_reader_v2 { class inode_reader_v2 {
public: public:
inode_reader_v2() = default; inode_reader_v2() = default;

View File

@ -21,15 +21,19 @@
#pragma once #pragma once
#include <array>
#include <atomic> #include <atomic>
#include <chrono> #include <chrono>
#include <cstddef>
#include <iostream> #include <iostream>
#include <memory> #include <memory>
#include <mutex> #include <mutex>
#include <sstream> #include <sstream>
#include <stdexcept>
#include <string> #include <string>
#include <tuple> #include <tuple>
#include <type_traits> #include <type_traits>
#include <utility>
#include "dwarfs/util.h" #include "dwarfs/util.h"

View File

@ -21,6 +21,7 @@
#pragma once #pragma once
#include <cstddef>
#include <cstdint> #include <cstdint>
#include <string_view> #include <string_view>

View File

@ -21,28 +21,35 @@
#pragma once #pragma once
#include <cstddef>
#include <cstdint> #include <cstdint>
#include <functional> #include <functional>
#include <iosfwd>
#include <memory> #include <memory>
#include <optional> #include <optional>
#include <string>
#include <string_view> #include <string_view>
#include <utility>
#include <vector> #include <vector>
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <sys/types.h> #include <sys/types.h>
#include <boost/iterator/iterator_facade.hpp>
#include <folly/Expected.h> #include <folly/Expected.h>
#include <folly/Range.h> #include <folly/Range.h>
#include "dwarfs/fstypes.h"
#include "dwarfs/logger.h"
#include "dwarfs/metadata_types.h" #include "dwarfs/metadata_types.h"
struct stat;
struct statvfs;
namespace dwarfs { namespace dwarfs {
class logger;
namespace thrift::metadata {
class metadata;
}
class metadata_v2 { class metadata_v2 {
public: public:
metadata_v2() = default; metadata_v2() = default;

View File

@ -21,6 +21,7 @@
#pragma once #pragma once
#include <cstddef>
#include <string> #include <string>
#include "dwarfs/mmif.h" #include "dwarfs/mmif.h"

View File

@ -21,7 +21,8 @@
#pragma once #pragma once
#include <ostream> #include <cstddef>
#include <iosfwd>
namespace dwarfs { namespace dwarfs {

View File

@ -26,10 +26,10 @@
#include <sys/stat.h> #include <sys/stat.h>
#include "dwarfs/mmif.h"
namespace dwarfs { namespace dwarfs {
class mmif;
class dir_reader { class dir_reader {
public: public:
virtual ~dir_reader() = default; virtual ~dir_reader() = default;

View File

@ -21,6 +21,7 @@
#pragma once #pragma once
#include <cstddef>
#include <memory> #include <memory>
#include <string> #include <string>
@ -28,6 +29,8 @@
namespace dwarfs { namespace dwarfs {
class mmif;
class os_access_posix : public os_access { class os_access_posix : public os_access {
public: public:
std::shared_ptr<dir_reader> opendir(const std::string& path) const override; std::shared_ptr<dir_reader> opendir(const std::string& path) const override;

View File

@ -23,9 +23,10 @@
#include <atomic> #include <atomic>
#include <condition_variable> #include <condition_variable>
#include <cstddef>
#include <cstdint> #include <cstdint>
#include <iosfwd>
#include <mutex> #include <mutex>
#include <ostream>
#include <thread> #include <thread>
#include <folly/Function.h> #include <folly/Function.h>

View File

@ -25,16 +25,18 @@
#include <string> #include <string>
#include "dwarfs/block_manager.h" #include "dwarfs/block_manager.h"
#include "dwarfs/worker_group.h"
namespace dwarfs { namespace dwarfs {
struct scanner_options;
class entry_factory; class entry_factory;
class filesystem_writer;
class logger; class logger;
class os_access; class os_access;
class progress; class progress;
struct scanner_options;
class script; class script;
class worker_group;
class scanner { class scanner {
public: public:

View File

@ -21,6 +21,7 @@
#pragma once #pragma once
#include <cstddef>
#include <cstdint> #include <cstdint>
namespace dwarfs { namespace dwarfs {

View File

@ -21,8 +21,7 @@
#pragma once #pragma once
#include <array> #include <cstddef>
#include <climits>
#include <string> #include <string>
namespace dwarfs { namespace dwarfs {
@ -31,4 +30,5 @@ std::string time_with_unit(double sec);
std::string size_with_unit(size_t size); std::string size_with_unit(size_t size);
size_t parse_size_with_unit(const std::string& str); size_t parse_size_with_unit(const std::string& str);
std::string get_program_path(); std::string get_program_path();
} // namespace dwarfs } // namespace dwarfs

View File

@ -21,8 +21,10 @@
#pragma once #pragma once
#include <cstddef>
#include <limits> #include <limits>
#include <memory> #include <memory>
#include <utility>
#include <folly/Function.h> #include <folly/Function.h>

View File

@ -32,7 +32,10 @@
#include <fuse3/fuse_lowlevel.h> #include <fuse3/fuse_lowlevel.h>
#include "dwarfs/error.h"
#include "dwarfs/filesystem_v2.h" #include "dwarfs/filesystem_v2.h"
#include "dwarfs/fstypes.h"
#include "dwarfs/logger.h"
#include "dwarfs/metadata_v2.h" #include "dwarfs/metadata_v2.h"
#include "dwarfs/mmap.h" #include "dwarfs/mmap.h"
#include "dwarfs/options.h" #include "dwarfs/options.h"

View File

@ -20,18 +20,24 @@
*/ */
#include <algorithm> #include <algorithm>
#include <atomic>
#include <cassert> #include <cassert>
#include <deque> #include <deque>
#include <exception> #include <exception>
#include <future> #include <future>
#include <map> #include <iterator>
#include <queue> #include <mutex>
#include <new>
#include <thread> #include <thread>
#include <unordered_map> #include <unordered_map>
#include <utility>
#include <vector>
#include <folly/container/EvictingCacheMap.h> #include <folly/container/EvictingCacheMap.h>
#include "dwarfs/block_cache.h" #include "dwarfs/block_cache.h"
#include "dwarfs/fstypes.h"
#include "dwarfs/logger.h"
#include "dwarfs/options.h" #include "dwarfs/options.h"
#include "dwarfs/worker_group.h" #include "dwarfs/worker_group.h"

View File

@ -21,16 +21,24 @@
#include <algorithm> #include <algorithm>
#include <array> #include <array>
#include <cassert>
#include <cstdint>
#include <cstring> #include <cstring>
#include <iostream> #include <iterator>
#include <memory> #include <memory>
#include <stdexcept> #include <stdexcept>
#include <unordered_map> #include <unordered_map>
#include <boost/algorithm/string.hpp> #include <sys/types.h>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/split.hpp>
#include <folly/Conv.h> #include <folly/Conv.h>
#include <fmt/format.h>
#ifdef DWARFS_HAVE_LIBLZ4 #ifdef DWARFS_HAVE_LIBLZ4
#include <lz4.h> #include <lz4.h>
#include <lz4hc.h> #include <lz4hc.h>
@ -685,8 +693,8 @@ size_t lzma_block_decompressor::get_uncompressed_size(const uint8_t* data,
lzma_ret ret = lzma_code(&s, LZMA_RUN); lzma_ret ret = lzma_code(&s, LZMA_RUN);
if (ret != LZMA_STREAM_END || s.avail_in != 0) { if (ret != LZMA_STREAM_END || s.avail_in != 0) {
std::cerr << ret << " - " << s.avail_in << std::endl; throw std::runtime_error(
throw std::runtime_error("lzma_code()"); fmt::format("lzma_code(): {} (avail_in={})", ret, s.avail_in));
} }
pos -= LZMA_STREAM_HEADER_SIZE; pos -= LZMA_STREAM_HEADER_SIZE;

View File

@ -19,21 +19,26 @@
* along with dwarfs. If not, see <https://www.gnu.org/licenses/>. * along with dwarfs. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include <condition_variable> #include <algorithm>
#include <map> #include <cstdint>
#include <mutex>
#include <cstring> #include <cstring>
#include <map>
#include <stdexcept>
#include <string>
#include <utility>
#include <fmt/format.h>
#include <sparsehash/dense_hash_map> #include <sparsehash/dense_hash_map>
#include <fmt/core.h>
#include "dwarfs/block_manager.h" #include "dwarfs/block_manager.h"
#include "dwarfs/cyclic_hash.h"
#include "dwarfs/file_interface.h" #include "dwarfs/file_interface.h"
#include "dwarfs/filesystem_writer.h" #include "dwarfs/filesystem_writer.h"
#include "dwarfs/inode.h" #include "dwarfs/inode.h"
#include "dwarfs/inode_hasher.h" #include "dwarfs/inode_hasher.h"
#include "dwarfs/logger.h"
#include "dwarfs/mmif.h"
#include "dwarfs/os_access.h" #include "dwarfs/os_access.h"
#include "dwarfs/progress.h" #include "dwarfs/progress.h"
#include "dwarfs/util.h" #include "dwarfs/util.h"

View File

@ -19,13 +19,17 @@
* along with dwarfs. If not, see <https://www.gnu.org/licenses/>. * along with dwarfs. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include <locale>
#include <sstream> #include <sstream>
#include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time.hpp>
#include "dwarfs/console_writer.h" #include "dwarfs/console_writer.h"
#include "dwarfs/entry.h" #include "dwarfs/entry.h"
#include "dwarfs/file_interface.h"
#include "dwarfs/inode.h" #include "dwarfs/inode.h"
#include "dwarfs/progress.h"
#include "dwarfs/util.h"
namespace dwarfs { namespace dwarfs {

View File

@ -21,21 +21,21 @@
#include <algorithm> #include <algorithm>
#include <cstring> #include <cstring>
#include <stdexcept>
#include <dirent.h> #include <utility>
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
#include <openssl/sha.h> #include <openssl/sha.h>
#include "dwarfs/entry.h" #include "dwarfs/entry.h"
#include "dwarfs/global_entry_data.h" #include "dwarfs/global_entry_data.h"
#include "dwarfs/inode.h" #include "dwarfs/inode.h"
#include "dwarfs/mmif.h"
#include "dwarfs/os_access.h" #include "dwarfs/os_access.h"
#include "dwarfs/progress.h" #include "dwarfs/progress.h"
#include "dwarfs/similarity.h" #include "dwarfs/similarity.h"
#include "dwarfs/gen-cpp2/metadata_types.h"
namespace dwarfs { namespace dwarfs {
entry::entry(const std::string& name, std::shared_ptr<entry> parent, entry::entry(const std::string& name, std::shared_ptr<entry> parent,

View File

@ -21,18 +21,27 @@
#include <cstddef> #include <cstddef>
#include <cstring> #include <cstring>
#include <optional> #include <optional>
#include <stdexcept>
#include <unordered_map> #include <unordered_map>
#include <vector>
#include <fmt/core.h> #include <sys/statvfs.h>
#include <folly/Range.h>
#include <fmt/format.h>
#include "dwarfs/block_cache.h" #include "dwarfs/block_cache.h"
#include "dwarfs/block_compressor.h"
#include "dwarfs/config.h" #include "dwarfs/config.h"
#include "dwarfs/filesystem_v2.h" #include "dwarfs/filesystem_v2.h"
#include "dwarfs/filesystem_writer.h" #include "dwarfs/filesystem_writer.h"
#include "dwarfs/fstypes.h" #include "dwarfs/fstypes.h"
#include "dwarfs/inode_reader_v2.h" #include "dwarfs/inode_reader_v2.h"
#include "dwarfs/logger.h"
#include "dwarfs/metadata_v2.h"
#include "dwarfs/mmif.h"
#include "dwarfs/options.h" #include "dwarfs/options.h"
#include "dwarfs/progress.h" #include "dwarfs/progress.h"

View File

@ -21,6 +21,7 @@
#include <atomic> #include <atomic>
#include <condition_variable> #include <condition_variable>
#include <cstdint>
#include <cstring> #include <cstring>
#include <deque> #include <deque>
#include <memory> #include <memory>
@ -31,9 +32,11 @@
#include "dwarfs/block_compressor.h" #include "dwarfs/block_compressor.h"
#include "dwarfs/filesystem_writer.h" #include "dwarfs/filesystem_writer.h"
#include "dwarfs/fstypes.h"
#include "dwarfs/logger.h" #include "dwarfs/logger.h"
#include "dwarfs/progress.h" #include "dwarfs/progress.h"
#include "dwarfs/util.h" #include "dwarfs/util.h"
#include "dwarfs/worker_group.h"
namespace dwarfs { namespace dwarfs {

View File

@ -20,11 +20,16 @@
*/ */
#include <algorithm> #include <algorithm>
#include <cstdint>
#include <limits>
#include <numeric> #include <numeric>
#include <stdexcept>
#include <string>
#include <vector> #include <vector>
#include "dwarfs/config.h"
#include "dwarfs/entry.h" #include "dwarfs/entry.h"
#include "dwarfs/file_interface.h"
#include "dwarfs/inode.h"
#include "dwarfs/inode_manager.h" #include "dwarfs/inode_manager.h"
#include "dwarfs/script.h" #include "dwarfs/script.h"

View File

@ -19,15 +19,22 @@
* along with dwarfs. If not, see <https://www.gnu.org/licenses/>. * along with dwarfs. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include <cerrno>
#include <cstdint>
#include <cstring> #include <cstring>
#include <future>
#include <mutex> #include <mutex>
#include <ostream>
#include <utility>
#include <vector>
#include <folly/container/Enumerate.h> #include <folly/container/Enumerate.h>
#include <folly/stats/Histogram.h> #include <folly/stats/Histogram.h>
#include "dwarfs/block_cache.h" #include "dwarfs/block_cache.h"
#include "dwarfs/config.h" #include "dwarfs/fstypes.h"
#include "dwarfs/inode_reader_v2.h" #include "dwarfs/inode_reader_v2.h"
#include "dwarfs/logger.h"
namespace dwarfs { namespace dwarfs {

View File

@ -19,6 +19,9 @@
* along with dwarfs. If not, see <https://www.gnu.org/licenses/>. * along with dwarfs. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include <cstdlib>
#include <iterator>
#include <locale>
#include <stdexcept> #include <stdexcept>
#include <cxxabi.h> #include <cxxabi.h>

View File

@ -22,9 +22,6 @@
#include "dwarfs/metadata_types.h" #include "dwarfs/metadata_types.h"
#include "dwarfs/gen-cpp2/metadata_types_custom_protocol.h" #include "dwarfs/gen-cpp2/metadata_types_custom_protocol.h"
#include <thrift/lib/cpp2/frozen/FrozenUtil.h>
#include <thrift/lib/cpp2/protocol/DebugProtocol.h>
#include <thrift/lib/thrift/gen-cpp2/frozen_types_custom_protocol.h>
namespace dwarfs { namespace dwarfs {

View File

@ -20,17 +20,26 @@
*/ */
#include <algorithm> #include <algorithm>
#include <cerrno>
#include <climits>
#include <cstring>
#include <ostream>
#include <cassert> #include <fcntl.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <time.h>
#include <unistd.h> #include <unistd.h>
#include "dwarfs/metadata_v2.h"
#include "dwarfs/gen-cpp2/metadata_types_custom_protocol.h"
#include <thrift/lib/cpp2/frozen/FrozenUtil.h> #include <thrift/lib/cpp2/frozen/FrozenUtil.h>
#include <thrift/lib/cpp2/protocol/DebugProtocol.h> #include <thrift/lib/cpp2/protocol/DebugProtocol.h>
#include <thrift/lib/thrift/gen-cpp2/frozen_types_custom_protocol.h> // #include <thrift/lib/thrift/gen-cpp2/frozen_types_custom_protocol.h>
#include "dwarfs/logger.h"
#include "dwarfs/metadata_v2.h"
#include "dwarfs/gen-cpp2/metadata_layouts.h"
#include "dwarfs/gen-cpp2/metadata_types_custom_protocol.h"
namespace dwarfs { namespace dwarfs {

View File

@ -19,10 +19,11 @@
* along with dwarfs. If not, see <https://www.gnu.org/licenses/>. * along with dwarfs. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include <cerrno>
#include <fcntl.h> #include <fcntl.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#include <boost/system/system_error.hpp> #include <boost/system/system_error.hpp>

View File

@ -19,6 +19,9 @@
* along with dwarfs. If not, see <https://www.gnu.org/licenses/>. * along with dwarfs. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include <ostream>
#include <string>
#include "dwarfs/options.h" #include "dwarfs/options.h"
namespace dwarfs { namespace dwarfs {

View File

@ -19,10 +19,12 @@
* along with dwarfs. If not, see <https://www.gnu.org/licenses/>. * along with dwarfs. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include <cerrno>
#include <stdexcept> #include <stdexcept>
#include <vector> #include <vector>
#include <dirent.h> #include <dirent.h>
#include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <boost/system/system_error.hpp> #include <boost/system/system_error.hpp>

View File

@ -19,10 +19,13 @@
* along with dwarfs. If not, see <https://www.gnu.org/licenses/>. * along with dwarfs. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include "dwarfs/progress.h" #include <chrono>
#include <utility>
#include <folly/system/ThreadName.h> #include <folly/system/ThreadName.h>
#include "dwarfs/progress.h"
namespace dwarfs { namespace dwarfs {
progress::progress(folly::Function<void(const progress&, bool)>&& func) progress::progress(folly::Function<void(const progress&, bool)>&& func)

View File

@ -19,21 +19,29 @@
* along with dwarfs. If not, see <https://www.gnu.org/licenses/>. * along with dwarfs. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include <algorithm>
#include <cstdint>
#include <cstring> #include <cstring>
#include <deque> #include <deque>
#include <functional> #include <iterator>
#include <stdexcept>
#include <string> #include <string>
#include <string_view>
#include <unordered_map> #include <unordered_map>
#include <utility>
#include <vector> #include <vector>
#include <unistd.h>
#include <boost/system/system_error.hpp> #include <boost/system/system_error.hpp>
#include "dwarfs/config.h" #include <folly/ExceptionString.h>
#include "dwarfs/entry.h" #include "dwarfs/entry.h"
#include "dwarfs/filesystem_writer.h" #include "dwarfs/filesystem_writer.h"
#include "dwarfs/fstypes.h"
#include "dwarfs/global_entry_data.h" #include "dwarfs/global_entry_data.h"
#include "dwarfs/hash_util.h" #include "dwarfs/hash_util.h"
#include "dwarfs/inode.h"
#include "dwarfs/inode_manager.h" #include "dwarfs/inode_manager.h"
#include "dwarfs/logger.h" #include "dwarfs/logger.h"
#include "dwarfs/metadata_v2.h" #include "dwarfs/metadata_v2.h"
@ -43,6 +51,9 @@
#include "dwarfs/scanner.h" #include "dwarfs/scanner.h"
#include "dwarfs/script.h" #include "dwarfs/script.h"
#include "dwarfs/util.h" #include "dwarfs/util.h"
#include "dwarfs/worker_group.h"
#include "dwarfs/gen-cpp2/metadata_types.h"
namespace dwarfs { namespace dwarfs {

View File

@ -21,6 +21,7 @@
#include <algorithm> #include <algorithm>
#include <array> #include <array>
#include <utility>
#include <folly/Hash.h> #include <folly/Hash.h>

View File

@ -19,7 +19,9 @@
* along with dwarfs. If not, see <https://www.gnu.org/licenses/>. * along with dwarfs. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include <iomanip> #include <array>
#include <climits>
#include <stdexcept>
#include <string> #include <string>
#include <unistd.h> #include <unistd.h>
@ -99,4 +101,5 @@ std::string get_program_path() {
return std::string(); return std::string();
} }
} // namespace dwarfs } // namespace dwarfs

View File

@ -21,9 +21,13 @@
#include <atomic> #include <atomic>
#include <condition_variable> #include <condition_variable>
#include <cstdint>
#include <mutex> #include <mutex>
#include <queue> #include <queue>
#include <stdexcept>
#include <string>
#include <thread> #include <thread>
#include <vector>
#include <sys/resource.h> #include <sys/resource.h>
#include <sys/time.h> #include <sys/time.h>

View File

@ -26,6 +26,7 @@
#include "dwarfs/filesystem_v2.h" #include "dwarfs/filesystem_v2.h"
#include "dwarfs/fstypes.h" #include "dwarfs/fstypes.h"
#include "dwarfs/logger.h"
#include "dwarfs/mmap.h" #include "dwarfs/mmap.h"
#include "dwarfs/options.h" #include "dwarfs/options.h"
#include "dwarfs/util.h" #include "dwarfs/util.h"

View File

@ -27,6 +27,7 @@
#include <folly/String.h> #include <folly/String.h>
#include "dwarfs/filesystem_v2.h" #include "dwarfs/filesystem_v2.h"
#include "dwarfs/logger.h"
#include "dwarfs/mmap.h" #include "dwarfs/mmap.h"
#include "dwarfs/options.h" #include "dwarfs/options.h"

View File

@ -20,24 +20,33 @@
*/ */
#include <algorithm> #include <algorithm>
#include <array>
#include <cstdio> #include <cstdio>
#include <cstring>
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
#include <iterator>
#include <map>
#include <memory>
#include <sstream> #include <sstream>
#include <stdexcept>
#include <string>
#include <thread> #include <thread>
#include <utility>
#include <vector> #include <vector>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <unistd.h> #include <unistd.h>
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <boost/any.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/program_options.hpp> #include <boost/program_options.hpp>
#include <folly/Conv.h> #include <folly/Conv.h>
#include <folly/gen/String.h> #include <folly/gen/String.h>
#include <fmt/core.h> #include <fmt/format.h>
#ifdef DWARFS_HAVE_LIBZSTD #ifdef DWARFS_HAVE_LIBZSTD
#include <zstd.h> #include <zstd.h>
@ -50,14 +59,18 @@
#include "dwarfs/filesystem_v2.h" #include "dwarfs/filesystem_v2.h"
#include "dwarfs/filesystem_writer.h" #include "dwarfs/filesystem_writer.h"
#include "dwarfs/logger.h" #include "dwarfs/logger.h"
#include "dwarfs/lua_script.h"
#include "dwarfs/mmap.h" #include "dwarfs/mmap.h"
#include "dwarfs/options.h" #include "dwarfs/options.h"
#include "dwarfs/os_access_posix.h" #include "dwarfs/os_access_posix.h"
#include "dwarfs/progress.h" #include "dwarfs/progress.h"
#include "dwarfs/scanner.h" #include "dwarfs/scanner.h"
#include "dwarfs/script.h"
#include "dwarfs/util.h" #include "dwarfs/util.h"
#ifdef DWARFS_HAVE_LUA
#include "dwarfs/lua_script.h"
#endif
namespace po = boost::program_options; namespace po = boost::program_options;
using namespace dwarfs; using namespace dwarfs;

View File

@ -29,6 +29,7 @@
#include "dwarfs/filesystem_v2.h" #include "dwarfs/filesystem_v2.h"
#include "dwarfs/filesystem_writer.h" #include "dwarfs/filesystem_writer.h"
#include "dwarfs/logger.h" #include "dwarfs/logger.h"
#include "dwarfs/mmif.h"
#include "dwarfs/options.h" #include "dwarfs/options.h"
#include "dwarfs/os_access.h" #include "dwarfs/os_access.h"
#include "dwarfs/progress.h" #include "dwarfs/progress.h"