Changeset 79b77ce in mainline for uspace/app/copy/copy.c


Ignore:
Timestamp:
2025-12-17T00:00:01Z (2 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
81805e0
Parents:
2309891
Message:

Allow retrying failed file/dir creation and file open.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/copy/copy.c

    r2309891 r79b77ce  
    133133        cons_event_t event;
    134134        kbd_event_t *ev;
     135        const char *opstr = NULL;
    135136        errno_t rc;
    136137
     
    143144                putchar('\n');
    144145
    145         fprintf(stderr, "I/O error %s file '%s' (%s).\n",
    146             err->optype == fmgt_io_write ? "writing" : "reading",
    147             err->fname, str_error(err->rc));
     146        switch (err->optype) {
     147        case fmgt_io_read:
     148                opstr = "reading";
     149                break;
     150        case fmgt_io_write:
     151                opstr = "writing";
     152                break;
     153        case fmgt_io_create:
     154                opstr = "creating";
     155                break;
     156        case fmgt_io_open:
     157                opstr = "opening";
     158                break;
     159        }
     160
     161        fprintf(stderr, "I/O error %s file '%s' (%s).\n", opstr, err->fname,
     162            str_error(err->rc));
    148163        fprintf(stderr, "[A]bort or [R]etry?\n");
    149164
Note: See TracChangeset for help on using the changeset viewer.