Changeset 2c21595 in mainline


Ignore:
Timestamp:
2026-04-24T12:42:40Z (16 hours ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
2866531
Parents:
e2b47b3c
git-author:
Jiri Svoboda <jiri@…> (2026-04-24 17:42:24)
git-committer:
Jiri Svoboda <jiri@…> (2026-04-24 12:42:40)
Message:

Do not overwrite configuration files during upgrade.

Location:
uspace/app/sysinst
Files:
2 edited

Legend:

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

    re2b47b3c r2c21595  
    423423{
    424424        sysinst_t *sysinst = (sysinst_t *)arg;
     425
    425426        (void)sysinst;
    426427        (void)exists->fname;
    427         // XXX Do not overwrite configuration files.
    428         return fmgt_exr_overwrite;
     428
     429        sysinst_action(sysinst, exists->fname);
     430
     431        /*
     432         * Before starting fmgt operation, the caller would specify
     433         * whether to overwrite existing files.
     434         */
     435        if (sysinst->overwrite)
     436                return fmgt_exr_overwrite;
     437        else
     438                return fmgt_exr_skip;
    429439}
    430440
     
    841851                goto error;
    842852
     853        /* Do not overwrite configuration files. */
     854        sysinst->overwrite = false;
    843855        rc = fmgt_copy(sysinst->fmgt, flist, CFG_FILES_DEST);
    844856        if (rc != EOK) {
     
    879891                goto error;
    880892
     893        /* Overwrite boot files with new ones during upgrade. */
     894        sysinst->overwrite = true;
    881895        rc = fmgt_copy(sysinst->fmgt, flist, MOUNT_POINT);
    882896        if (rc != EOK) {
  • uspace/app/sysinst/sysinst.h

    re2b47b3c r2c21595  
    8686        bool quit;
    8787        char errmsg[128];
     88        /** Allow overwriting files in current copy operation. */
     89        bool overwrite;
    8890} sysinst_t;
    8991
Note: See TracChangeset for help on using the changeset viewer.