Remove unused FileDescriptor::Reset().
The Reset() method was not directly used anywhere.
Bug: 34284069
Test: Ran unittests. grep for 'Reset()' in update_engine.
Change-Id: I8db0f17c43a36b03acbc22cdfa35a3e6042c3e75
diff --git a/payload_consumer/file_descriptor.cc b/payload_consumer/file_descriptor.cc
index 8a23dea..ebe4428 100644
--- a/payload_consumer/file_descriptor.cc
+++ b/payload_consumer/file_descriptor.cc
@@ -127,12 +127,8 @@
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
diff --git a/payload_consumer/file_descriptor.h b/payload_consumer/file_descriptor.h
index 7bb2974..c8a5b15 100644
--- a/payload_consumer/file_descriptor.h
+++ b/payload_consumer/file_descriptor.h
@@ -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 {
@@ -98,10 +92,6 @@
// 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;
@@ -129,7 +119,6 @@
uint64_t length,
int* result) override;
bool Close() override;
- void Reset() override;
bool IsSettingErrno() override {
return true;
}