Changeset c3db721 in mainline for uspace/lib
- Timestamp:
- 2025-10-10T20:35:05Z (3 months ago)
- Branches:
- master
- Children:
- c1383cd
- Parents:
- 0cf3d5f
- Location:
- uspace/lib/fmgt
- Files:
-
- 2 edited
-
include/types/fmgt.h (modified) (2 diffs)
-
src/fmgt.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/fmgt/include/types/fmgt.h
r0cf3d5f rc3db721 40 40 #include <capa.h> 41 41 #include <fibril_synch.h> 42 #include <stdbool.h> 42 43 43 44 /** File management progress update */ … … 53 54 /** File management callbacks */ 54 55 typedef struct { 56 bool (*abort_query)(void *); 55 57 void (*progress)(void *, fmgt_progress_t *); 56 58 } fmgt_cb_t; -
uspace/lib/fmgt/src/fmgt.c
r0cf3d5f rc3db721 221 221 } 222 222 223 /** Query caller whether operation should be aborted. 224 * 225 * @param fmgt File management object 226 * @return @c true iff operation should be aborted 227 */ 228 static bool fmgt_abort_query(fmgt_t *fmgt) 229 { 230 if (fmgt->cb != NULL && fmgt->cb->abort_query!= NULL) 231 return fmgt->cb->abort_query(fmgt->cb_arg); 232 else 233 return false; 234 } 235 223 236 /** Create new file. 224 237 * … … 276 289 277 290 fmgt->curf_procb += nw; 291 292 /* User requested abort? */ 293 if (fmgt_abort_query(fmgt)) { 294 free(buffer); 295 vfs_put(fd); 296 fmgt_final_progress_update(fmgt); 297 return EINTR; 298 } 278 299 } 279 300
Note:
See TracChangeset
for help on using the changeset viewer.
