Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- int main()
- {
- fstream ofile;
- ofile.open("/root/pxadev/rootfs_full/home/root/pxa27x_gpio.ko", ios_base::out | ios_base::in | ios_base::binary);
- if(!ofile.is_open())
- {
- cerr<<" Could not open file!\n";
- }
- char ch= '0x5';
- ofile.read(reinterpret_cast<char *>(&ch), sizeof(ch));
- ofile.write(reinterpret_cast<char *>(&ch), sizeof(ch));
- ofile.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment