Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2011
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. bool copy_bootrom(void) {
  2. int line = 0;
  3. const int size 8*1024
  4. int i;
  5. unsigned char buf[size];
  6. int fd, w;
  7. memset(buf2, 0, size);
  8.  
  9. fd = creat("/bootrom.bin", 0666);
  10.  
  11. if (fd < 0) {
  12. return false;
  13. }
  14. else {
  15.  
  16. w = write(fd, buf, size);
  17.  
  18. if (w < 0)
  19. return false;
  20. close(fd);
  21. }
  22. return true;
  23. }
  24.  
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement