summaryrefslogtreecommitdiff
path: root/test/test_udevcdrom.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-07-23 10:41:38 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-07-23 10:41:38 +0200
commit3e2d7cce4febc923d4b9bcb363717dd161cbb856 (patch)
tree69245f40f2623ccb7bb914aba06e17d009a9689a /test/test_udevcdrom.cc
parent47f1d6d23c344b4c592565cc1ea61b5456570a06 (diff)
parent76fe5db7153957f8fda437e3bd614312b076f19e (diff)
[ABI] merged the libudev-dlopen branch, this allows to pass
"apt-udev-auto" to Acquire::Cdrom::mount and the cdrom method will dynamically find/mount the cdrom device (if libhal is available)
Diffstat (limited to 'test/test_udevcdrom.cc')
-rw-r--r--test/test_udevcdrom.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/test_udevcdrom.cc b/test/test_udevcdrom.cc
new file mode 100644
index 000000000..e65c7a297
--- /dev/null
+++ b/test/test_udevcdrom.cc
@@ -0,0 +1,19 @@
+#include <apt-pkg/cdrom.h>
+#include <stdio.h>
+#include <assert.h>
+
+int main()
+{
+ int i;
+ pkgUdevCdromDevices c;
+ assert(c.Dlopen());
+
+ vector<CdromDevice> l;
+ l = c.Scan();
+ assert(l.size() > 0);
+ for (i=0;i<l.size();i++)
+ std::cerr << l[i].DeviceName << " "
+ << l[i].Mounted << " "
+ << l[i].MountPath << std::endl;
+
+}