diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-07-09 17:16:05 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-07-09 17:16:05 +0200 |
commit | cbc9bed8ae85af36ad8579476ab91e89c3cd310e (patch) | |
tree | 2a070c03426a8d110428a41388b090bd4b339427 /test/test_udevcdrom.cc | |
parent | 8e372e79de1277f3508c20c2eb486165402e5afc (diff) | |
download | apt-cbc9bed8ae85af36ad8579476ab91e89c3cd310e.tar.gz |
move libudev based code into libapt cdrom.cc class
Diffstat (limited to 'test/test_udevcdrom.cc')
-rw-r--r-- | test/test_udevcdrom.cc | 19 |
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; + +} |