Skip to content

Commit

Permalink
Remove unused FileDescriptor::Reset(). am: 4a53c76
Browse files Browse the repository at this point in the history
am: ac95cd5

Change-Id: Iee5e85da9a5c3a8aa0597409480c999bfb91602b
  • Loading branch information
deymo authored and android-build-merger committed Aug 21, 2017
2 parents 007c104 + ac95cd5 commit a50bd2c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
6 changes: 1 addition & 5 deletions payload_consumer/file_descriptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,8 @@ bool EintrSafeFileDescriptor::Close() {
CHECK_GE(fd_, 0);
if (IGNORE_EINTR(close(fd_)))
return false;
Reset();
return true;
}

void EintrSafeFileDescriptor::Reset() {
fd_ = -1;
return true;
}

} // namespace chromeos_update_engine
11 changes: 0 additions & 11 deletions payload_consumer/file_descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@
// * Write() returns the number of bytes written: this appears to be more useful
// for clients, who may wish to retry or otherwise do something useful with
// the remaining data that was not written.
//
// * Provides a Reset() method, which will force to abandon a currently open
// file descriptor and allow opening another file, without necessarily
// properly closing the old one. This may be useful in cases where a "closer"
// class does not care whether Close() was successful, but may need to reuse
// the same file descriptor again.

namespace chromeos_update_engine {

Expand Down Expand Up @@ -98,10 +92,6 @@ class FileDescriptor {
// errno accordingly.
virtual bool Close() = 0;

// Resets the file descriptor, abandoning a currently open file and returning
// the descriptor to the closed state.
virtual void Reset() = 0;

// Indicates whether or not an implementation sets meaningful errno.
virtual bool IsSettingErrno() = 0;

Expand Down Expand Up @@ -129,7 +119,6 @@ class EintrSafeFileDescriptor : public FileDescriptor {
uint64_t length,
int* result) override;
bool Close() override;
void Reset() override;
bool IsSettingErrno() override {
return true;
}
Expand Down

0 comments on commit a50bd2c

Please sign in to comment.