1 /* (C)2001,2002 by LGB (Gábor Lénárt), lgb@lgb.hu
2 Part of MPlayer project, this source is copyrighted according to GNU/GPL. */
10 #include <sys/types.h>
11 #include <sys/ioctl.h>
18 int main ( int argc
, char ** argv
)
22 fprintf(stderr
,"Bad usage.\n");
25 if ((fd
= open(argv
[1], O_RDONLY
)) == -1) {
26 fprintf(stderr
,"Cannot open file %s: %s\n",
27 argv
[1] ? argv
[1] : "(NULL)", strerror(errno
));
30 if (ioctl(fd
, FIBMAP
, &lba
) != 0) {
31 fprintf(stderr
,"fibmap ioctl: %s (Hint: %s is not suid root?)\n",strerror(errno
),argv
[0]);