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