Loading fastboot/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,7 @@ cc_defaults { "-Wextra", "-Werror", "-Wvla", "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION", ], rtti: true, Loading fastboot/device/commands.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -392,13 +392,13 @@ static bool EnterRecovery() { struct sockaddr_un addr = {.sun_family = AF_UNIX}; strncpy(addr.sun_path, "/dev/socket/recovery", sizeof(addr.sun_path) - 1); if (connect(sock, (struct sockaddr*)&addr, sizeof(addr)) < 0) { if (connect(sock.get(), (struct sockaddr*)&addr, sizeof(addr)) < 0) { PLOG(ERROR) << "Couldn't connect to recovery"; return false; } // Switch to recovery will not update the boot reason since it does not // require a reboot. auto ret = write(sock, &msg_switch_to_recovery, sizeof(msg_switch_to_recovery)); auto ret = write(sock.get(), &msg_switch_to_recovery, sizeof(msg_switch_to_recovery)); if (ret != sizeof(msg_switch_to_recovery)) { PLOG(ERROR) << "Couldn't write message to switch to recovery"; return false; Loading fastboot/device/usb.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ static int usb_ffs_write(usb_handle* h, const void* data, int len) { int orig_len = len; while (len > 0) { int write_len = std::min(USB_FFS_BULK_SIZE, len); int n = write(h->bulk_in, buf, write_len); int n = write(h->bulk_in.get(), buf, write_len); if (n < 0) { D("ERROR: fd = %d, n = %d: %s", h->bulk_in.get(), n, strerror(errno)); return -1; Loading @@ -103,7 +103,7 @@ static int usb_ffs_read(usb_handle* h, void* data, int len, bool allow_partial) unsigned count = 0; while (len > 0) { int read_len = std::min(USB_FFS_BULK_SIZE, len); int n = read(h->bulk_out, buf, read_len); int n = read(h->bulk_out.get(), buf, read_len); if (n < 0) { D("ERROR: fd = %d, n = %d: %s", h->bulk_out.get(), n, strerror(errno)); return -1; Loading fs_mgr/libfiemap/include/libfiemap/image_manager.h +1 −1 Original line number Diff line number Diff line Loading @@ -198,7 +198,7 @@ class MappedDevice final { ~MappedDevice(); int fd() const { return fd_; } int fd() const { return fd_.get(); } const std::string& path() const { return path_; } protected: Loading Loading
fastboot/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,7 @@ cc_defaults { "-Wextra", "-Werror", "-Wvla", "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION", ], rtti: true, Loading
fastboot/device/commands.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -392,13 +392,13 @@ static bool EnterRecovery() { struct sockaddr_un addr = {.sun_family = AF_UNIX}; strncpy(addr.sun_path, "/dev/socket/recovery", sizeof(addr.sun_path) - 1); if (connect(sock, (struct sockaddr*)&addr, sizeof(addr)) < 0) { if (connect(sock.get(), (struct sockaddr*)&addr, sizeof(addr)) < 0) { PLOG(ERROR) << "Couldn't connect to recovery"; return false; } // Switch to recovery will not update the boot reason since it does not // require a reboot. auto ret = write(sock, &msg_switch_to_recovery, sizeof(msg_switch_to_recovery)); auto ret = write(sock.get(), &msg_switch_to_recovery, sizeof(msg_switch_to_recovery)); if (ret != sizeof(msg_switch_to_recovery)) { PLOG(ERROR) << "Couldn't write message to switch to recovery"; return false; Loading
fastboot/device/usb.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ static int usb_ffs_write(usb_handle* h, const void* data, int len) { int orig_len = len; while (len > 0) { int write_len = std::min(USB_FFS_BULK_SIZE, len); int n = write(h->bulk_in, buf, write_len); int n = write(h->bulk_in.get(), buf, write_len); if (n < 0) { D("ERROR: fd = %d, n = %d: %s", h->bulk_in.get(), n, strerror(errno)); return -1; Loading @@ -103,7 +103,7 @@ static int usb_ffs_read(usb_handle* h, void* data, int len, bool allow_partial) unsigned count = 0; while (len > 0) { int read_len = std::min(USB_FFS_BULK_SIZE, len); int n = read(h->bulk_out, buf, read_len); int n = read(h->bulk_out.get(), buf, read_len); if (n < 0) { D("ERROR: fd = %d, n = %d: %s", h->bulk_out.get(), n, strerror(errno)); return -1; Loading
fs_mgr/libfiemap/include/libfiemap/image_manager.h +1 −1 Original line number Diff line number Diff line Loading @@ -198,7 +198,7 @@ class MappedDevice final { ~MappedDevice(); int fd() const { return fd_; } int fd() const { return fd_.get(); } const std::string& path() const { return path_; } protected: Loading