1
0
Fork 0
apt/test/interactive-helper/test_udevcdrom.cc
Daniel Baumann 6810ba718b
Adding upstream version 3.0.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-20 21:10:43 +02:00

23 lines
432 B
C++

#include <config.h>
#include <apt-pkg/cdrom.h>
#include <cassert>
#include <cstddef>
#include <iostream>
#include <string>
#include <vector>
int main()
{
pkgUdevCdromDevices c;
assert(c.Dlopen());
std::vector<CdromDevice> l;
l = c.Scan();
assert(l.empty() == false);
for (size_t i = 0; i < l.size(); ++i)
std::cerr << l[i].DeviceName << " "
<< l[i].Mounted << " "
<< l[i].MountPath << std::endl;
}