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

Commit 51fcf322 authored by Josh Gao's avatar Josh Gao
Browse files

adb: rename syncmsg::*::time to mtime.

Test: mma
Change-Id: Ia7d743d523f7fb45d8be7518b2db763614edcc85
parent 0fe1b4bd
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -357,7 +357,7 @@ class SyncConnection {
                            << msg.stat_v1.id;
            }

            if (msg.stat_v1.mode == 0 && msg.stat_v1.size == 0 && msg.stat_v1.time == 0) {
            if (msg.stat_v1.mode == 0 && msg.stat_v1.size == 0 && msg.stat_v1.mtime == 0) {
                // There's no way for us to know what the error was.
                errno = ENOPROTOOPT;
                return false;
@@ -365,8 +365,8 @@ class SyncConnection {

            st->st_mode = msg.stat_v1.mode;
            st->st_size = msg.stat_v1.size;
            st->st_ctime = msg.stat_v1.time;
            st->st_mtime = msg.stat_v1.time;
            st->st_ctime = msg.stat_v1.mtime;
            st->st_mtime = msg.stat_v1.mtime;
        }

        return true;
@@ -629,7 +629,7 @@ static bool sync_ls(SyncConnection& sc, const char* path,
        if (!ReadFdExactly(sc.fd, buf, len)) return false;
        buf[len] = 0;

        func(msg.dent.mode, msg.dent.size, msg.dent.time, buf);
        func(msg.dent.mode, msg.dent.size, msg.dent.mtime, buf);
    }
}

+3 −3
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ static bool do_lstat_v1(int s, const char* path) {
    lstat(path, &st);
    msg.stat_v1.mode = st.st_mode;
    msg.stat_v1.size = st.st_size;
    msg.stat_v1.time = st.st_mtime;
    msg.stat_v1.mtime = st.st_mtime;
    return WriteFdExactly(s, &msg.stat_v1, sizeof(msg.stat_v1));
}

@@ -191,7 +191,7 @@ static bool do_list(int s, const char* path) {
            size_t d_name_length = strlen(de->d_name);
            msg.dent.mode = st.st_mode;
            msg.dent.size = st.st_size;
            msg.dent.time = st.st_mtime;
            msg.dent.mtime = st.st_mtime;
            msg.dent.namelen = d_name_length;

            if (!WriteFdExactly(s, &msg.dent, sizeof(msg.dent)) ||
@@ -205,7 +205,7 @@ done:
    msg.dent.id = ID_DONE;
    msg.dent.mode = 0;
    msg.dent.size = 0;
    msg.dent.time = 0;
    msg.dent.mtime = 0;
    msg.dent.namelen = 0;
    return WriteFdExactly(s, &msg.dent, sizeof(msg.dent));
}
+2 −2
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ union syncmsg {
        uint32_t id;
        uint32_t mode;
        uint32_t size;
        uint32_t time;
        uint32_t mtime;
    } stat_v1;
    struct __attribute__((packed)) {
        uint32_t id;
@@ -62,7 +62,7 @@ union syncmsg {
        uint32_t id;
        uint32_t mode;
        uint32_t size;
        uint32_t time;
        uint32_t mtime;
        uint32_t namelen;
    } dent;
    struct __attribute__((packed)) {