Lines Matching refs:st
33 void print_stat(struct stat64 *st) in print_stat() argument
36 printf("dev [%d:%d]\n", major(st->st_dev), minor(st->st_dev)); in print_stat()
38 st->st_ino, st->st_ino); in print_stat()
39 printf("mode [0x%8x : %d]\n", st->st_mode, st->st_mode); in print_stat()
40 printf("nlink [0x%8lx : %ld]\n", st->st_nlink, st->st_nlink); in print_stat()
41 printf("uid [0x%8x : %d]\n", st->st_uid, st->st_uid); in print_stat()
42 printf("gid [0x%8x : %d]\n", st->st_gid, st->st_gid); in print_stat()
44 st->st_size, st->st_size); in print_stat()
45 printf("blksize [0x%8lx : %ld]\n", st->st_blksize, st->st_blksize); in print_stat()
47 st->st_blocks, st->st_blocks); in print_stat()
51 void stat_bdev(struct stat64 *st, unsigned int *start_lba) in stat_bdev() argument
59 sprintf(devname, "/dev/block/%d:%d", major(st->st_dev), minor(st->st_dev)); in stat_bdev()
92 struct stat64 st; in main() local
114 if (fstat64(fd, &st) < 0) { in main()
120 stat_bdev(&st, &start_lba); in main()
122 total_blks = (st.st_size + st.st_blksize - 1) / st.st_blksize; in main()
126 print_stat(&st); in main()
154 ext.f_pos = i * st.st_blksize; in main()