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