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.
 
 
 
 
 
 

20 lines
345 B

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