19 #ifndef SBUILD_MNTSTREAM_H 20 #define SBUILD_MNTSTREAM_H 22 #include <sbuild/sbuild-custom-error.h> 29 #include <sys/types.h> 76 mntentry (
struct mntent
const& entry);
173 void read (
int quantity=1);
An entry in a mntstream.
Definition: sbuild-mntstream.h:65
mntentry()
The constructor.
Definition: sbuild-mntstream.h:68
virtual ~mntstream()
The destructor.
Definition: sbuild-mntstream.cc:76
Access mounts.
Definition: sbuild-mntstream.h:46
FILE * mntfile
The underlying FILE stream.
Definition: sbuild-mntstream.h:179
Debian source builder components.
Definition: sbuild-auth-null.h:24
std::deque< mntentry > data
A list of mntentries represents the mount file stream as a LIFO stack.
Definition: sbuild-mntstream.h:185
std::string type
Mount type.
Definition: sbuild-mntstream.h:83
error_code
Error codes.
Definition: sbuild-mntstream.h:50
std::string filesystem_name
Name of mounted filesystem.
Definition: sbuild-mntstream.h:79
Failed to read mount file.
Definition: sbuild-mntstream.h:53
friend mntstream & operator>>(mntstream &stream, mntentry &entry)
The overloaded extraction operator.
bool eof() const
Check for End Of File.
Definition: sbuild-mntstream.cc:144
bool bad() const
Check for errors.
Definition: sbuild-mntstream.cc:150
void open(std::string const &file)
Open a mount file for reading.
Definition: sbuild-mntstream.cc:82
void read(int quantity=1)
Read mntents from the underlying FILE stream into the data deque.
Definition: sbuild-mntstream.cc:99
std::string file
The file name.
Definition: sbuild-mntstream.h:176
int dump_frequency
Dump frequency (days).
Definition: sbuild-mntstream.h:87
bool error_status
Error status.
Definition: sbuild-mntstream.h:188
std::string options
Mount options.
Definition: sbuild-mntstream.h:85
Custom error.
Definition: sbuild-custom-error.h:32
Failed to open mount file.
Definition: sbuild-mntstream.h:52
void close()
Close the mount file.
Definition: sbuild-mntstream.cc:129
int fsck_pass
Parallel fsck pass number.
Definition: sbuild-mntstream.h:89
std::string directory
File system path prefix.
Definition: sbuild-mntstream.h:81
mntstream(std::string const &file)
The constructor.
Definition: sbuild-mntstream.cc:65
bool operator!()
Check if the mntstream status is bad.
Definition: sbuild-mntstream.cc:161
bool eof_status
End of File status.
Definition: sbuild-mntstream.h:191
sbuild::custom_error< error_code > error
Exception type.
Definition: sbuild-mntstream.h:57