@@ -54,6 +54,8 @@ static const char *ssdir_name;
54
54
/* List head for storage mapping, elements added at init, and never removed */
55
55
static struct storage_mapping_node * storage_mapping_head ;
56
56
57
+ #ifdef VENDOR_FS_READY_PROPERTY
58
+
57
59
/*
58
60
* Properties set to 1 after we have opened a file under ssdir_name. The backing
59
61
* files for both TD and TDP are currently located under /data/vendor/ss and can
@@ -75,16 +77,6 @@ static struct storage_mapping_node* storage_mapping_head;
75
77
static bool fs_ready_set = false;
76
78
static bool fs_ready_rw_set = false;
77
79
78
- static enum sync_state fs_state ;
79
- static enum sync_state fd_state [FD_TBL_SIZE ];
80
-
81
- static bool alternate_mode ;
82
-
83
- static struct {
84
- struct storage_file_read_resp hdr ;
85
- uint8_t data [MAX_READ_SIZE ];
86
- } read_rsp ;
87
-
88
80
static bool property_set_helper (const char * prop ) {
89
81
int rc = property_set (prop , "1" );
90
82
if (rc == 0 ) {
@@ -96,6 +88,18 @@ static bool property_set_helper(const char* prop) {
96
88
return rc == 0 ;
97
89
}
98
90
91
+ #endif // #ifdef VENDOR_FS_READY_PROPERTY
92
+
93
+ static enum sync_state fs_state ;
94
+ static enum sync_state fd_state [FD_TBL_SIZE ];
95
+
96
+ static bool alternate_mode ;
97
+
98
+ static struct {
99
+ struct storage_file_read_resp hdr ;
100
+ uint8_t data [MAX_READ_SIZE ];
101
+ } read_rsp ;
102
+
99
103
static uint32_t insert_fd (int open_flags , int fd , struct storage_mapping_node * node ) {
100
104
uint32_t handle = fd ;
101
105
@@ -535,6 +539,7 @@ int storage_file_open(struct storage_msg* msg, const void* r, size_t req_len,
535
539
free (path );
536
540
path = NULL ;
537
541
542
+ #ifdef VENDOR_FS_READY_PROPERTY
538
543
/* a backing file has been opened, notify any waiting init steps */
539
544
if (!fs_ready_set || !fs_ready_rw_set ) {
540
545
bool is_checkpoint_active = false;
@@ -552,6 +557,7 @@ int storage_file_open(struct storage_msg* msg, const void* r, size_t req_len,
552
557
}
553
558
}
554
559
}
560
+ #endif // #ifdef VENDOR_FS_READY_PROPERTY
555
561
556
562
return ipc_respond (msg , & resp , sizeof (resp ));
557
563
0 commit comments