Mercurial > mplayer.hg
view fibmap_mplayer.c @ 1390:b3389600cec8
odivx<->divx4 order changed, null video codec added
author | arpi |
---|---|
date | Thu, 26 Jul 2001 00:29:00 +0000 |
parents | 3367eba48763 |
children | 5216f108cb4f |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <sys/types.h> #include <sys/ioctl.h> #include <sys/stat.h> #ifndef FIBMAP #define FIBMAP 1 #endif int main ( int argc , char ** argv ) { int fd,lba=0; if (argc!=2) { printf("Bad usage.\n"); return 1; } if ((fd = open(argv[1], O_RDONLY)) == -1) { printf("Cannot open file %s: %s\n", argv[1] ? argv[1] : "(NULL)", strerror(errno)); return 1; } if (ioctl(fd, FIBMAP, &lba) != 0) { printf("fibmap ioctl: %s (Hint: %s is not suid root?)\n",strerror(errno),argv[0]); close(fd); return 1; } close(fd); printf("%d\n",lba); return 0; }