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

Commit 024447c3 authored by Christopher Tate's avatar Christopher Tate
Browse files

Use the new 'bu' syntax for backup vs restore operation

Change-Id: Ib007705ee562a41869f8add3408101b3a53aa2d7
parent 35e6a003
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -55,7 +55,7 @@ int backup_service(char* args) {
        char** backup_args;
        char** backup_args;


        // child -- actually run the backup here
        // child -- actually run the backup here
        argc = 1; // room for the basic 'bu' argv[0]
        argc = 2; // room for the basic 'bu' argv[0] and 'backup' argv[1]
        for (p = (char*)args; p && *p; ) {
        for (p = (char*)args; p && *p; ) {
            argc++;
            argc++;
            while (*p && *p != ':') p++;
            while (*p && *p != ':') p++;
@@ -64,7 +64,8 @@ int backup_service(char* args) {


        backup_args = (char**) alloca(argc*sizeof(char*) + 1);
        backup_args = (char**) alloca(argc*sizeof(char*) + 1);
        backup_args[0] = "bu";
        backup_args[0] = "bu";
        argc = 1;   // run through again to build the argv array
        backup_args[1] = "backup";
        argc = 2;   // run through again to build the argv array
        for (p = (char*)args; *p; ) {
        for (p = (char*)args; *p; ) {
            backup_args[argc++] = p;
            backup_args[argc++] = p;
            while (*p && *p != ':') p++;
            while (*p && *p != ':') p++;