]>
Commit | Line | Data |
---|---|---|
1 | #include <apt-pkg/cdrom.h> | |
2 | #include <stdio.h> | |
3 | #include <assert.h> | |
4 | ||
5 | #include <vector> | |
6 | #include <iostream> | |
7 | ||
8 | int main() | |
9 | { | |
10 | pkgUdevCdromDevices c; | |
11 | assert(c.Dlopen()); | |
12 | ||
13 | std::vector<CdromDevice> l; | |
14 | l = c.Scan(); | |
15 | assert(l.empty() == false); | |
16 | for (size_t i = 0; i < l.size(); ++i) | |
17 | std::cerr << l[i].DeviceName << " " | |
18 | << l[i].Mounted << " " | |
19 | << l[i].MountPath << std::endl; | |
20 | ||
21 | } |