| 1 | ?ipc_m_connect_me_to ;
|
|---|
| 2 | (
|
|---|
| 3 | ?register {
|
|---|
| 4 | ?ipc_m_data_write /* fs name */ ;
|
|---|
| 5 | tentative {
|
|---|
| 6 | /* callback connection */
|
|---|
| 7 | ?ipc_m_connect_to_me ;
|
|---|
| 8 | ?ipc_m_share_in
|
|---|
| 9 | }
|
|---|
| 10 | } +
|
|---|
| 11 |
|
|---|
| 12 | ?mount {
|
|---|
| 13 | ?ipc_m_data_write /* mount point */ ;
|
|---|
| 14 | tentative {
|
|---|
| 15 | ?ipc_m_data_write /* mount options */ ;
|
|---|
| 16 | tentative {
|
|---|
| 17 | ?ipc_m_data_write /* fs name */ ;
|
|---|
| 18 | tentative {
|
|---|
| 19 | ?ipc_m_ping ;
|
|---|
| 20 | tentative {
|
|---|
| 21 | (
|
|---|
| 22 | /* root fs */
|
|---|
| 23 | alternative fs tmpfs fat devfs {
|
|---|
| 24 | !fs.mounted ;
|
|---|
| 25 | !fs.ipc_m_data_write /* mount options */
|
|---|
| 26 | }
|
|---|
| 27 | ) +
|
|---|
| 28 | (
|
|---|
| 29 | /* non-root fs */
|
|---|
| 30 | tentative {
|
|---|
| 31 | alternative fs tmpfs fat devfs {
|
|---|
| 32 | [fnc.vfs_lookup_internal] ;
|
|---|
| 33 | tentative {
|
|---|
| 34 | [fnc.vfs_grab_phone] ;
|
|---|
| 35 | [fnc.vfs_grab_phone] ;
|
|---|
| 36 | !fs.mount ;
|
|---|
| 37 | !fs.ipc_m_connection_clone ;
|
|---|
| 38 | [fnc.vfs_release_phone] ;
|
|---|
| 39 | tentative {
|
|---|
| 40 | !fs.vfs_m_data_write /* mount options */
|
|---|
| 41 | } ;
|
|---|
| 42 | [fnc.vfs_release_phone]
|
|---|
| 43 | }
|
|---|
| 44 | }
|
|---|
| 45 | }
|
|---|
| 46 | )
|
|---|
| 47 | }
|
|---|
| 48 | }
|
|---|
| 49 | }
|
|---|
| 50 | }
|
|---|
| 51 | } +
|
|---|
| 52 |
|
|---|
| 53 | ?open {
|
|---|
| 54 | tentative {
|
|---|
| 55 | ?ipc_m_data_write /* path */ ;
|
|---|
| 56 | tentative {
|
|---|
| 57 | alternative fs tmpfs fat devfs {
|
|---|
| 58 | [fnc.vfs_lookup_internal] ;
|
|---|
| 59 | tentative {
|
|---|
| 60 | [fnc.vfs_grab_phone] ;
|
|---|
| 61 | !fs.truncate ;
|
|---|
| 62 | [fnc.vfs_release_phone]
|
|---|
| 63 | }
|
|---|
| 64 | }
|
|---|
| 65 | }
|
|---|
| 66 | }
|
|---|
| 67 | } +
|
|---|
| 68 |
|
|---|
| 69 | ?open_node {
|
|---|
| 70 | alternative fs tmpfs fat devfs {
|
|---|
| 71 | [fnc.vfs_open_node_internal] ;
|
|---|
| 72 | tentative {
|
|---|
| 73 | [fnc.vfs_grab_phone] ;
|
|---|
| 74 | !fs.truncate ;
|
|---|
| 75 | [fnc.vfs_release_phone]
|
|---|
| 76 | }
|
|---|
| 77 | }
|
|---|
| 78 | } +
|
|---|
| 79 |
|
|---|
| 80 | ?close {
|
|---|
| 81 | tentative {
|
|---|
| 82 | alternative fs tmpfs fat devfs {
|
|---|
| 83 | [fnc.vfs_grab_phone] ;
|
|---|
| 84 | !fs.close ;
|
|---|
| 85 | [fnc.vfs_release_phone]
|
|---|
| 86 | }
|
|---|
| 87 | }
|
|---|
| 88 | } +
|
|---|
| 89 |
|
|---|
| 90 | ?read {
|
|---|
| 91 | tentative {
|
|---|
| 92 | ?ipc_m_data_read {
|
|---|
| 93 | alternative fs tmpfs fat devfs {
|
|---|
| 94 | [fnc.vfs_grab_phone] ;
|
|---|
| 95 | !fs.read ;
|
|---|
| 96 | !fs.ipc_m_data_read /* forward payload */ ;
|
|---|
| 97 | [fnc.vfs_release_phone]
|
|---|
| 98 | }
|
|---|
| 99 | }
|
|---|
| 100 | }
|
|---|
| 101 | } +
|
|---|
| 102 |
|
|---|
| 103 | ?write {
|
|---|
| 104 | tentative {
|
|---|
| 105 | ?ipc_m_data_write {
|
|---|
| 106 | alternative fs tmpfs fat devfs {
|
|---|
| 107 | [fnc.vfs_grab_phone] ;
|
|---|
| 108 | !fs.write ;
|
|---|
| 109 | !fs.ipc_m_data_write /* forward payload */ ;
|
|---|
| 110 | [fnc.vfs_release_phone]
|
|---|
| 111 | }
|
|---|
| 112 | }
|
|---|
| 113 | }
|
|---|
| 114 | } +
|
|---|
| 115 |
|
|---|
| 116 | ?truncate {
|
|---|
| 117 | tentative {
|
|---|
| 118 | alternative fs tmpfs fat devfs {
|
|---|
| 119 | [fnc.vfs_grab_phone] ;
|
|---|
| 120 | !fs.truncate ;
|
|---|
| 121 | [fnc.vfs_release_phone]
|
|---|
| 122 | }
|
|---|
| 123 | }
|
|---|
| 124 | } +
|
|---|
| 125 |
|
|---|
| 126 | ?fstat {
|
|---|
| 127 | tentative {
|
|---|
| 128 | ?ipc_m_data_read /* struct stat */ {
|
|---|
| 129 | alternative fs tmpfs fat devfs {
|
|---|
| 130 | [fnc.vfs_grab_phone] ;
|
|---|
| 131 | !fs.stat ;
|
|---|
| 132 | !fs.ipc_m_data_read /* forward struct stat */ ;
|
|---|
| 133 | [fnc.vfs_release_phone]
|
|---|
| 134 | }
|
|---|
| 135 | }
|
|---|
| 136 | }
|
|---|
| 137 | } +
|
|---|
| 138 |
|
|---|
| 139 | ?stat {
|
|---|
| 140 | ?ipc_m_data_write /* path */ ;
|
|---|
| 141 | tentative {
|
|---|
| 142 | ?ipc_m_data_read /* struct stat */ {
|
|---|
| 143 | alternative fs tmpfs fat devfs {
|
|---|
| 144 | [fnc.vfs_lookup_internal] ;
|
|---|
| 145 | tentative {
|
|---|
| 146 | !fs.stat ;
|
|---|
| 147 | !fs.ipc_m_data_read /* forward struct stat */
|
|---|
| 148 | }
|
|---|
| 149 | }
|
|---|
| 150 | }
|
|---|
| 151 | }
|
|---|
| 152 | } +
|
|---|
| 153 |
|
|---|
| 154 | ?mkdir {
|
|---|
| 155 | ?ipc_m_data_write /* path */ ;
|
|---|
| 156 | tentative {
|
|---|
| 157 | alternative fs tmpfs fat devfs {
|
|---|
| 158 | [fnc.vfs_lookup_internal]
|
|---|
| 159 | }
|
|---|
| 160 | }
|
|---|
| 161 | } +
|
|---|
| 162 |
|
|---|
| 163 | ?unlink {
|
|---|
| 164 | ?ipc_m_data_write /* path */ ;
|
|---|
| 165 | tentative {
|
|---|
| 166 | alternative fs tmpfs fat devfs {
|
|---|
| 167 | [fnc.vfs_lookup_internal]
|
|---|
| 168 | }
|
|---|
| 169 | }
|
|---|
| 170 | } +
|
|---|
| 171 |
|
|---|
| 172 | ?rename {
|
|---|
| 173 | ?ipc_m_data_write /* old path */ ;
|
|---|
| 174 | tentative {
|
|---|
| 175 | ?ipc_m_data_write /* new path */ ;
|
|---|
| 176 | tentative {
|
|---|
| 177 | alternative fs tmpfs fat devfs {
|
|---|
| 178 | [fnc.vfs_lookup_internal] /* lookup old path */ ;
|
|---|
| 179 | tentative {
|
|---|
| 180 | [fnc.vfs_lookup_internal] /* lookup parent of new path */ ;
|
|---|
| 181 | tentative {
|
|---|
| 182 | [fnc.vfs_lookup_internal] /* destroy old link for the new path */ ;
|
|---|
| 183 | tentative {
|
|---|
| 184 | [fnc.vfs_lookup_internal] /* create new link for the new path */ ;
|
|---|
| 185 | tentative {
|
|---|
| 186 | [fnc.vfs_lookup_internal] /* destroy link for the old path */
|
|---|
| 187 | }
|
|---|
| 188 | }
|
|---|
| 189 | }
|
|---|
| 190 | }
|
|---|
| 191 | }
|
|---|
| 192 | }
|
|---|
| 193 | }
|
|---|
| 194 | } +
|
|---|
| 195 |
|
|---|
| 196 | ?sync {
|
|---|
| 197 | tentative {
|
|---|
| 198 | alternative fs tmpfs fat devfs {
|
|---|
| 199 | !fs.sync
|
|---|
| 200 | }
|
|---|
| 201 | }
|
|---|
| 202 | } +
|
|---|
| 203 |
|
|---|
| 204 | ?seek
|
|---|
| 205 |
|
|---|
| 206 | )* ;
|
|---|
| 207 | ?ipc_m_phne_hungup
|
|---|