Changeset c111da2 in mainline for uspace/lib/fmgt/include


Ignore:
Timestamp:
2025-10-09T15:44:52Z (3 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
cfd04c4
Parents:
1a96db9
Message:

Create non-zero size file in Navigator, new newfile utility.

Location:
uspace/lib/fmgt/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/fmgt/include/fmgt.h

    r1a96db9 rc111da2  
    3939
    4040#include <errno.h>
     41#include <stdbool.h>
    4142#include <stddef.h>
     43#include <stdint.h>
    4244#include "types/fmgt.h"
    4345
     
    4547extern void fmgt_set_cb(fmgt_t *, fmgt_cb_t *, void *);
    4648extern void fmgt_destroy(fmgt_t *);
     49extern void fmgt_set_init_update(fmgt_t *, bool);
    4750extern errno_t fmgt_new_file_suggest(char **);
     51extern errno_t fmgt_new_file(fmgt_t *, const char *, uint64_t);
    4852
    4953#endif
  • uspace/lib/fmgt/include/types/fmgt.h

    r1a96db9 rc111da2  
    3838#define TYPES_FMGT_H
    3939
     40#include <capa.h>
     41#include <fibril_synch.h>
     42
     43/** File management progress update */
     44typedef struct {
     45        /** Current file processed bytes */
     46        char curf_procb[CAPA_BLOCKS_BUFSIZE];
     47        /** Total bytes to process for current file */
     48        char curf_totalb[CAPA_BLOCKS_BUFSIZE];
     49        /** Percent of current file processed */
     50        char curf_percent[5];
     51} fmgt_progress_t;
     52
    4053/** File management callbacks */
    4154typedef struct {
     55        void (*progress)(void *, fmgt_progress_t *);
    4256} fmgt_cb_t;
    4357
    4458typedef struct {
     59        /** Lock */
     60        fibril_mutex_t lock;
     61        /** Progress update timer */
     62        fibril_timer_t *timer;
    4563        /** Callback functions */
    4664        fmgt_cb_t *cb;
    4765        /** Argument to callback functions */
    4866        void *cb_arg;
     67        /** Bytes processed from current file */
     68        uint64_t curf_procb;
     69        /** Total size of current file */
     70        uint64_t curf_totalb;
     71        /** Progress was displayed for current file */
     72        bool curf_progr;
     73        /** Post an immediate initial progress update */
     74        bool do_init_update;
    4975} fmgt_t;
    5076
Note: See TracChangeset for help on using the changeset viewer.