Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9190954 authored by Steve Kondik's avatar Steve Kondik
Browse files

sr: Remove dialog usage from backup service

Change-Id: I392c255e24080287a4c9ce8368e3064b15ec20ce
parent 9cccf8f1
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -19,8 +19,6 @@

#include "bu.h"

#include "messagesocket.h"

#include "voldclient.h"

#define PATHNAME_RC "/tmp/burc"
@@ -43,8 +41,6 @@ size_t hash_datalen;
SHA_CTX sha_ctx;
MD5_CTX md5_ctx;

static MessageSocket ms;

void
ui_print(const char* format, ...) {
    char buffer[256];
@@ -178,7 +174,7 @@ int update_progress(uint64_t off)
        if (now != last_time && pct != last_pct) {
            char msg[256];
            sprintf(msg, "%s: %d%% complete", curpart->name, pct);
            ms.Show(msg);
            ui_print(msg);
            last_time = now;
            last_pct = pct;
        }
@@ -362,14 +358,12 @@ int main(int argc, char **argv)
    vdc = new VoldClient();
    vdc->start();

    ms.ClientInit();

    if (!strcmp(opname, "backup")) {
        ms.Show("Backup in progress...");
        ui_print("Backup in progress...");
        rc = do_backup(argc-optidx, &argv[optidx]);
    }
    else if (!strcmp(opname, "restore")) {
        ms.Show("Restore in progress...");
        ui_print("Restore in progress...");
        rc = do_restore(argc-optidx, &argv[optidx]);
    }
    else {
@@ -377,8 +371,6 @@ int main(int argc, char **argv)
        rc = 1;
    }

    ms.Dismiss();

    xcomp_enable_set(xcomp_enable);

    close(adb_ofd);