#include "log.h"
#ifdef DVDOMATIC_POSIX
#include <unistd.h>
+#include <mntent.h>
#endif
#ifdef DVDOMATIC_WINDOWS
#include <windows.h>
#endif
using std::pair;
+using std::list;
using std::ifstream;
using std::string;
+using std::make_pair;
using boost::shared_ptr;
void
system (ffprobe.c_str ());
#endif
}
+
+list<pair<string, string> >
+mount_info ()
+{
+ list<pair<string, string> > m;
+
+#ifdef DVDOMATIC_POSIX
+ FILE* f = setmntent ("/etc/mtab", "r");
+ if (!f) {
+ return m;
+ }
+
+ while (1) {
+ struct mntent* mnt = getmntent (f);
+ if (!mnt) {
+ break;
+ }
+
+ m.push_back (make_pair (mnt->mnt_dir, mnt->mnt_type));
+ }
+
+ endmntent (f);
+#endif
+
+ return m;
+}
#define WEXITSTATUS(w) (w)
#endif
-void dvdomatic_sleep (int);
+extern void dvdomatic_sleep (int);
extern std::pair<std::string, int> cpu_info ();
extern void run_ffprobe (boost::filesystem::path, boost::filesystem::path, boost::shared_ptr<Log>);
+extern std::list<std::pair<std::string, std::string> > mount_info ();
using std::min;
using std::make_pair;
using std::endl;
+using std::list;
using boost::shared_ptr;
using boost::lexical_cast;
using boost::to_upper_copy;
#endif
pair<string, int> const c = cpu_info ();
log()->log (String::compose ("CPU: %1, %2 processors", c.first, c.second));
+ list<pair<string, string> > const m = mount_info ();
+ for (list<pair<string, string> >::const_iterator i = m.begin(); i != m.end(); ++i) {
+ log()->log (String::compose ("Mount: %1 %2", i->first, i->second));
+ }
if (format() == 0) {
throw MissingSettingError (_("format"));