annotate fibmap_mplayer.c @ 2148:0c6cef85d507

compressed headers support
author arpi
date Wed, 10 Oct 2001 01:07:50 +0000
parents 5216f108cb4f
children 04b2227ab75a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1164
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
1 #include <stdio.h>
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
2 #include <stdlib.h>
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
3 #include <string.h>
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
4 #include <unistd.h>
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
5 #include <fcntl.h>
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
6 #include <errno.h>
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
7 #include <sys/types.h>
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
8 #include <sys/ioctl.h>
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
9 #include <sys/stat.h>
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
10
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
11 #ifndef FIBMAP
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
12 #define FIBMAP 1
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
13 #endif
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
14
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
15 int main ( int argc , char ** argv )
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
16 {
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
17 int fd,lba=0;
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
18 if (argc!=2) {
1973
5216f108cb4f all error/warn/info messages moved to help_mp-en.h for translation
arpi
parents: 1164
diff changeset
19 fprintf(stderr,"Bad usage.\n");
1164
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
20 return 1;
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
21 }
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
22 if ((fd = open(argv[1], O_RDONLY)) == -1) {
1973
5216f108cb4f all error/warn/info messages moved to help_mp-en.h for translation
arpi
parents: 1164
diff changeset
23 fprintf(stderr,"Cannot open file %s: %s\n",
1164
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
24 argv[1] ? argv[1] : "(NULL)", strerror(errno));
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
25 return 1;
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
26 }
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
27 if (ioctl(fd, FIBMAP, &lba) != 0) {
1973
5216f108cb4f all error/warn/info messages moved to help_mp-en.h for translation
arpi
parents: 1164
diff changeset
28 fprintf(stderr,"fibmap ioctl: %s (Hint: %s is not suid root?)\n",strerror(errno),argv[0]);
1164
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
29 close(fd);
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
30 return 1;
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
31 }
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
32 close(fd);
1973
5216f108cb4f all error/warn/info messages moved to help_mp-en.h for translation
arpi
parents: 1164
diff changeset
33 fprintf(stderr,"%d\n",lba);
1164
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
34 return 0;
3367eba48763 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-)
lgb
parents:
diff changeset
35 }