summaryrefslogtreecommitdiffstats
path: root/fibmap_mplayer.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-12-08 21:34:05 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-12-08 21:34:05 +0000
commit922162fb5d99604e8c7fdb72b09f626c6d9f087e (patch)
tree634bc568df4e64038251148ebf459dcba24bb615 /fibmap_mplayer.c
parenta5766ca031aba607b687e230c4eea0130aae5e68 (diff)
downloadmpv-922162fb5d99604e8c7fdb72b09f626c6d9f087e.tar.bz2
mpv-922162fb5d99604e8c7fdb72b09f626c6d9f087e.tar.xz
removed the historic libcss support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11593 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'fibmap_mplayer.c')
-rw-r--r--fibmap_mplayer.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/fibmap_mplayer.c b/fibmap_mplayer.c
deleted file mode 100644
index 897a4d1605..0000000000
--- a/fibmap_mplayer.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* (C)2001,2002 by LGB (Gábor Lénárt), lgb@lgb.hu
- Part of MPlayer project, this source is copyrighted according to GNU/GPL. */
-
-#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>
-
-#include "mp_msg.h"
-
-#ifndef FIBMAP
-#define FIBMAP 1
-#endif
-
-int main ( int argc , char ** argv )
-{
- int fd,ret,lba=0;
- if (geteuid()!=0) {
- mp_msg(MSGT_CPLAYER,MSGL_FATAL, "%s must be setuid root to work\n",
- argv[0]);
- return 1;
- }
- if (seteuid(getuid()) == -1) {
- mp_msg(MSGT_CPLAYER,MSGL_FATAL, "Couldn't drop privileges: %s\n",
- strerror(errno));
- return 1;
- }
- if (argc!=2 || argv[1]==NULL) {
- mp_msg(MSGT_CPLAYER,MSGL_FATAL,"Usage: %s <filename>\n", argv[0]);
- return 1;
- }
- if ((fd = open(argv[1], O_RDONLY)) == -1) {
- mp_msg(MSGT_CPLAYER,MSGL_FATAL,"Cannot open file %s: %s\n",
- argv[1], strerror(errno));
- return 1;
- }
- if (seteuid(0) == -1) {
- mp_msg(MSGT_CPLAYER,MSGL_FATAL, "Couldn't restore root privileges: %s\n",
- strerror(errno));
- return 1;
- }
- ret = ioctl(fd, FIBMAP, &lba);
- if (seteuid(getuid()) == -1) {
- mp_msg(MSGT_CPLAYER,MSGL_FATAL, "Couldn't re-drop privileges: %s\n",
- strerror(errno));
- return 1;
- }
- close(fd);
- if (ret != 0) {
- mp_msg(MSGT_CPLAYER,MSGL_FATAL,"fibmap ioctl failed: %s\n",
- strerror(errno));
- return 1;
- }
- printf("%d\n",lba);
- return 0;
-}