Skip to content

Commit

Permalink
Move `instances/{instance_lock,lock_file}.{cpp,h}
Browse files Browse the repository at this point in the history
... to a new subdirectory.

This is one step to making the filesystem organization match the build
system.

Bug: b/392949844
Test: bazel test '//...'
  • Loading branch information
Databean committed Jan 29, 2025
1 parent 5aadbd2 commit c1273a9
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 32 deletions.
2 changes: 1 addition & 1 deletion base/cvd/cuttlefish/host/commands/cvd/acloud/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ cc_library(
"//cuttlefish/host/commands/cvd/cli/selector:parser",
"//cuttlefish/host/commands/cvd/cli:types",
"//cuttlefish/host/commands/cvd/cli:utils",
"//cuttlefish/host/commands/cvd/instances/lock",
"//cuttlefish/host/commands/cvd/instances:instance_database_utils",
"//cuttlefish/host/commands/cvd/instances:lock",
"//cuttlefish/host/commands/cvd/utils",
"//cuttlefish/host/libs/config",
"//libbase",
Expand Down
2 changes: 1 addition & 1 deletion base/cvd/cuttlefish/host/commands/cvd/acloud/converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "host/commands/cvd/acloud/config.h"
#include "host/commands/cvd/acloud/create_converter_parser.h"
#include "host/commands/cvd/utils/common.h"
#include "host/commands/cvd/instances/lock_file.h"
#include "host/commands/cvd/instances/lock/lock_file.h"
#include "host/commands/cvd/instances/instance_database_utils.h"
#include "host/commands/cvd/cli/selector/selector_constants.h"
#include "host/commands/cvd/cli/command_request.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ cc_library(
"//cuttlefish/common/libs/utils",
"//cuttlefish/common/libs/utils:result",
"//cuttlefish/host/commands/cvd/cli:types",
"//cuttlefish/host/commands/cvd/instances/lock",
"//cuttlefish/host/commands/cvd/instances:cvd_persistent_data",
"//cuttlefish/host/commands/cvd/instances:instance_database_utils",
"//cuttlefish/host/commands/cvd/instances:lock",
"//cuttlefish/host/commands/cvd/utils",
"//cuttlefish/host/libs/config",
"//libbase",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "common/libs/utils/result.h"
#include "common/libs/utils/unique_resource_allocator.h"
#include "cuttlefish/host/commands/cvd/instances/cvd_persistent_data.pb.h"
#include "host/commands/cvd/instances/instance_lock.h"
#include "host/commands/cvd/instances/lock/instance_lock.h"
#include "host/commands/cvd/cli/selector/start_selector_parser.h"

namespace cuttlefish {
Expand Down
25 changes: 1 addition & 24 deletions base/cvd/cuttlefish/host/commands/cvd/instances/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,6 @@ cc_proto_library(
deps = [":cvd_persistent_data_proto"],
)

cc_library(
name = "lock",
srcs = [
"instance_lock.cpp",
"lock_file.cpp",
],
hdrs = [
"instance_lock.h",
"lock_file.h",
],
copts = [
"-Werror=sign-compare",
"-std=c++17",
],
strip_include_prefix = "//cuttlefish",
deps = [
"//cuttlefish/common/libs/fs",
"//cuttlefish/common/libs/utils",
"//cuttlefish/common/libs/utils:result",
"//libbase",
],
)

cc_library(
name = "instances",
srcs = [
Expand Down Expand Up @@ -63,7 +40,6 @@ cc_library(
deps = [
":cvd_persistent_data",
":instance_database_utils",
":lock",
"//cuttlefish/common/libs/fs",
"//cuttlefish/common/libs/utils",
"//cuttlefish/common/libs/utils:result",
Expand All @@ -72,6 +48,7 @@ cc_library(
"//cuttlefish/host/commands/cvd/cli:command_request",
"//cuttlefish/host/commands/cvd/cli:types",
"//cuttlefish/host/commands/cvd/cli:utils",
"//cuttlefish/host/commands/cvd/instances/lock",
"//cuttlefish/host/commands/cvd/legacy:cvd_server_cc_proto",
"//cuttlefish/host/commands/cvd/utils",
"//cuttlefish/host/libs/config",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#include "host/commands/cvd/cli/selector/creation_analyzer.h"
#include "host/commands/cvd/instances/instance_database.h"
#include "host/commands/cvd/instances/instance_group_record.h"
#include "host/commands/cvd/instances/instance_lock.h"
#include "host/commands/cvd/instances/instance_record.h"
#include "host/commands/cvd/instances/lock/instance_lock.h"

namespace cuttlefish {

Expand Down
26 changes: 26 additions & 0 deletions base/cvd/cuttlefish/host/commands/cvd/instances/lock/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package(
default_visibility = ["//:android_cuttlefish"],
)

cc_library(
name = "lock",
srcs = [
"instance_lock.cpp",
"lock_file.cpp",
],
hdrs = [
"instance_lock.h",
"lock_file.h",
],
copts = [
"-Werror=sign-compare",
"-std=c++17",
],
strip_include_prefix = "//cuttlefish",
deps = [
"//cuttlefish/common/libs/fs",
"//cuttlefish/common/libs/utils",
"//cuttlefish/common/libs/utils:result",
"//libbase",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "host/commands/cvd/instances/instance_lock.h"
#include "host/commands/cvd/instances/lock/instance_lock.h"

#include <sys/file.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <set>
#include <string>

#include "host/commands/cvd/instances/lock_file.h"
#include "host/commands/cvd/instances/lock/lock_file.h"

namespace cuttlefish {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "host/commands/cvd/instances/lock_file.h"
#include "host/commands/cvd/instances/lock/lock_file.h"

#include <sys/file.h>

Expand Down

0 comments on commit c1273a9

Please sign in to comment.