Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char line[128];
- int io;
- FILE *fp = fopen("/proc/diskstats", "r");
- while(fgets(line, sizeof line, fp)) {
- fputs(line, stdout);
- if(dev_t_conversion(line) == get_file_devid("/")) {
- sscanf(line, "%*dt%d", &io);
- printf("%dn", io);
- fclose(fp);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement