Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 3rd, 2011  |  syntax: None  |  size: 0.38 KB  |  views: 43  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.