blob: 4e9054d620f3c3d2b61627fe7445024c1ead2ecc [file] [log] [blame]
#include "aos/scoped/scoped_fd.h"
#include <unistd.h>
#include <ostream>
#include "absl/log/check.h"
#include "absl/log/log.h"
namespace aos {
void ScopedFD::Close() {
if (fd_ != -1) {
if (close(fd_) == -1) {
PLOG(WARNING) << "close(" << fd_ << ") failed";
}
}
}
} // namespace aos