Guest User

Untitled

a guest
May 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. Burn.DriveInfo[] info = ImageBurner._drive_scan();
  2. stdout.printf("len=%u\n", info.length);
  3.  
  4. for(uint i = 0; i < info.length; i++) {
  5. unowned Burn.DriveInfo cur = info[i];
  6. stdout.printf("Vendor: %s\n", (string)cur.vendor);
  7. }
  8.  
  9. -----------
  10.  
  11. (gdb) print di
  12. $2 = (struct burn_drive_info *) 0x61a890
  13. (gdb) print di[1]
  14. $4 = {vendor = "HL-DT-ST", product = "BDDVDRW GGC-H20L", revision = "1.02", location = "/dev/sr1\000\000\000\000\000\000\000\000",
  15. read_dvdram = 1, read_dvdr = 1, read_dvdrom = 1, read_cdr = 1, read_cdrw = 1, write_dvdram = 1, write_dvdr = 1, write_cdr = 1,
  16. write_cdrw = 1, write_simulate = 1, c2_errors = 1, buffer_size = 2048, tao_block_types = 257, sao_block_types = 16384,
  17. raw_block_types = 0, packet_block_types = 0, drive = 0x7ffff519bd58}
  18. (gdb) print di[2]
  19. $5 = {vendor = "\000\000\000\000\000\000\000\000", product = '\000' <repeats 16 times>, revision = "\000\000\000\000",
  20. location = '\000' <repeats 16 times>, read_dvdram = 0, read_dvdr = 0, read_dvdrom = 0, read_cdr = 0, read_cdrw = 0,
  21. write_dvdram = 0, write_dvdr = 0, write_cdr = 0, write_cdrw = 0, write_simulate = 0, c2_errors = 0, buffer_size = 0,
  22. tao_block_types = 0, sao_block_types = 0, raw_block_types = 0, packet_block_types = 0, drive = 0x0}
  23. (gdb)
Add Comment
Please, Sign In to add comment