Loading init/devices.cpp +5 −12 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ #include <sys/time.h> #include <sys/wait.h> #include <android-base/file.h> #include <cutils/list.h> #include <cutils/uevent.h> Loading Loading @@ -769,21 +770,13 @@ static int load_firmware(int fw_fd, int loading_fd, int data_fd) ret = -1; break; } len_to_copy -= nr; while (nr > 0) { ssize_t nw = 0; nw = write(data_fd, buf + nw, nr); if(nw <= 0) { if (!android::base::WriteFully(data_fd, buf, nr)) { ret = -1; goto out; } nr -= nw; break; } len_to_copy -= nr; } out: if(!ret) write(loading_fd, "0", 1); /* successful end of transfer */ else Loading Loading
init/devices.cpp +5 −12 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ #include <sys/time.h> #include <sys/wait.h> #include <android-base/file.h> #include <cutils/list.h> #include <cutils/uevent.h> Loading Loading @@ -769,21 +770,13 @@ static int load_firmware(int fw_fd, int loading_fd, int data_fd) ret = -1; break; } len_to_copy -= nr; while (nr > 0) { ssize_t nw = 0; nw = write(data_fd, buf + nw, nr); if(nw <= 0) { if (!android::base::WriteFully(data_fd, buf, nr)) { ret = -1; goto out; } nr -= nw; break; } len_to_copy -= nr; } out: if(!ret) write(loading_fd, "0", 1); /* successful end of transfer */ else Loading