Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b23b2a3 authored by Akilesh Kailash's avatar Akilesh Kailash Committed by Gerrit Code Review
Browse files

Merge "snapuserd: Refactor code to a seperate directory"

parents f2049868 36aeeb3f
Loading
Loading
Loading
Loading
+0 −112
Original line number Diff line number Diff line
@@ -182,38 +182,6 @@ cc_library_static {
    vendor_ramdisk_available: true,
}

cc_defaults {
    name: "libsnapshot_snapuserd_defaults",
    defaults: [
        "fs_mgr_defaults",
    ],
    cflags: [
        "-D_FILE_OFFSET_BITS=64",
        "-Wall",
        "-Werror",
    ],
    export_include_dirs: ["include"],
    srcs: [
        "snapuserd_client.cpp",
    ],
}

cc_library_static {
    name: "libsnapshot_snapuserd",
    defaults: [
        "libsnapshot_snapuserd_defaults",
    ],
    recovery_available: true,
    static_libs: [
        "libcutils_sockets",
    ],
    shared_libs: [
        "libbase",
        "liblog",
    ],
    ramdisk_available: true,
}

cc_library_static {
    name: "libsnapshot_test_helpers",
    defaults: ["libsnapshot_defaults"],
@@ -412,49 +380,6 @@ cc_test {
    require_root: true,
}

cc_defaults {
    name: "snapuserd_defaults",
    defaults: [
        "fs_mgr_defaults",
    ],
    srcs: [
        "snapuserd_server.cpp",
        "snapuserd.cpp",
        "snapuserd_daemon.cpp",
        "snapuserd_worker.cpp",
        "snapuserd_readahead.cpp",
    ],

    cflags: [
        "-Wall",
        "-Werror"
    ],

    static_libs: [
        "libbase",
        "libbrotli",
        "libcutils_sockets",
        "libdm",
        "libgflags",
        "liblog",
        "libsnapshot_cow",
        "libz",
    ],
}

cc_binary {
    name: "snapuserd",
    defaults: ["snapuserd_defaults"],
    init_rc: [
        "snapuserd.rc",
    ],
    static_executable: true,
    system_shared_libs: [],
    ramdisk_available: true,
    vendor_ramdisk_available: true,
    recovery_available: true,
}

cc_test {
    name: "cow_api_test",
    defaults: [
@@ -556,43 +481,6 @@ cc_binary {
    },
}

cc_test {
    name: "cow_snapuserd_test",
    defaults: [
        "fs_mgr_defaults",
    ],
    srcs: [
        "cow_snapuserd_test.cpp",
        "snapuserd.cpp",
        "snapuserd_worker.cpp",
    ],
    cflags: [
        "-Wall",
        "-Werror",
    ],
    shared_libs: [
        "libbase",
        "liblog",
    ],
    static_libs: [
        "libbrotli",
        "libgtest",
        "libsnapshot_cow",
        "libsnapshot_snapuserd",
        "libcutils_sockets",
        "libz",
        "libfs_mgr",
        "libdm",
    ],
    header_libs: [
        "libstorage_literals_headers",
        "libfiemap_headers",
    ],
    test_min_api_level: 30,
    auto_gen_config: true,
    require_root: false,
}

cc_binary {
    name: "inspect_cow",
    host_supported: true,
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@
#include <libsnapshot/auto_device.h>
#include <libsnapshot/return.h>
#include <libsnapshot/snapshot_writer.h>
#include <libsnapshot/snapuserd_client.h>
#include <snapuserd/snapuserd_client.h>

#ifndef FRIEND_TEST
#define FRIEND_TEST(test_set_name, individual_test) \
+131 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

cc_defaults {
    name: "libsnapshot_snapuserd_defaults",
    defaults: [
        "fs_mgr_defaults",
    ],
    cflags: [
        "-D_FILE_OFFSET_BITS=64",
        "-Wall",
        "-Werror",
    ],
    export_include_dirs: ["include"],
    srcs: [
        "snapuserd_client.cpp",
    ],
}

cc_library_static {
    name: "libsnapshot_snapuserd",
    defaults: [
        "libsnapshot_snapuserd_defaults",
    ],
    recovery_available: true,
    static_libs: [
        "libcutils_sockets",
    ],
    shared_libs: [
        "libbase",
        "liblog",
    ],
    ramdisk_available: true,
}

cc_defaults {
    name: "snapuserd_defaults",
    defaults: [
        "fs_mgr_defaults",
    ],
    srcs: [
        "snapuserd_server.cpp",
        "snapuserd.cpp",
        "snapuserd_daemon.cpp",
        "snapuserd_worker.cpp",
        "snapuserd_readahead.cpp",
    ],

    cflags: [
        "-Wall",
        "-Werror"
    ],

    static_libs: [
        "libbase",
        "libbrotli",
        "libcutils_sockets",
        "libdm",
        "libgflags",
        "liblog",
        "libsnapshot_cow",
        "libz",
    ],
}

cc_binary {
    name: "snapuserd",
    defaults: ["snapuserd_defaults"],
    init_rc: [
        "snapuserd.rc",
    ],
    static_executable: true,
    system_shared_libs: [],
    ramdisk_available: true,
    vendor_ramdisk_available: true,
    recovery_available: true,
}

cc_test {
    name: "cow_snapuserd_test",
    defaults: [
        "fs_mgr_defaults",
    ],
    srcs: [
        "cow_snapuserd_test.cpp",
        "snapuserd.cpp",
        "snapuserd_worker.cpp",
    ],
    cflags: [
        "-Wall",
        "-Werror",
    ],
    shared_libs: [
        "libbase",
        "liblog",
    ],
    static_libs: [
        "libbrotli",
        "libgtest",
        "libsnapshot_cow",
        "libsnapshot_snapuserd",
        "libcutils_sockets",
        "libz",
        "libfs_mgr",
        "libdm",
    ],
    header_libs: [
        "libstorage_literals_headers",
        "libfiemap_headers",
    ],
    test_min_api_level: 30,
    auto_gen_config: true,
    require_root: false,
}
+3 −0
Original line number Diff line number Diff line
akailash@google.com
dvander@google.com
drosen@google.com
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@
#include <libdm/dm.h>
#include <libdm/loop_control.h>
#include <libsnapshot/cow_writer.h>
#include <libsnapshot/snapuserd_client.h>
#include <snapuserd/snapuserd_client.h>
#include <storage_literals/storage_literals.h>

#include "snapuserd.h"
Loading