You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
434 B

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