Guest User

Untitled

a guest
Oct 18th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. struct partition *sp;
  2.  
  3. char buf[512];
  4.  
  5. fd = open(floppyimage, 0, 0_RDONLY);
  6.  
  7. read(fd, buf, 512);
  8.  
  9. sp = (struct partition *)&buf[0x1BE];
  10.  
  11. prinf("sys_type=%x\n", sp->sys_type);
  12.  
  13. printf("start_sector=%d nr_sectors=%d\n", sp->start_sector, sp->nr_sectors);
Add Comment
Please, Sign In to add comment