X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess%2Fmmap.c;h=8a36040aad316eb673e62d5e9efda5c65f322080;hb=cbe5b58ec76784c05d0a0a2442c3d5629c1d9fd1;hp=92667dabf87cc2cafcc1adb3f24363a839648b5f;hpb=be19f7facceb129ef8977ed0ad2b41c593954629;p=vlc diff --git a/modules/access/mmap.c b/modules/access/mmap.c index 92667dabf8..8a36040aad 100644 --- a/modules/access/mmap.c +++ b/modules/access/mmap.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include @@ -59,7 +59,7 @@ vlc_module_begin () add_shortcut ("file") set_callbacks (Open, Close) add_bool ("file-mmap", false, NULL, - FILE_MMAP_TEXT, FILE_MMAP_LONGTEXT, true); + FILE_MMAP_TEXT, FILE_MMAP_LONGTEXT, true) vlc_module_end () static block_t *Block (access_t *); @@ -102,7 +102,6 @@ static int Open (vlc_object_t *p_this) msg_Warn (p_access, "cannot open %s: %m", path); goto error; } - fcntl (fd, F_SETFD, fcntl (fd, F_GETFD) | FD_CLOEXEC); /* mmap() is only safe for regular and block special files. * For other types, it may be some idiosyncrasic interface (e.g. packet @@ -117,7 +116,7 @@ static int Open (vlc_object_t *p_this) if (!S_ISREG (st.st_mode) && !S_ISBLK (st.st_mode)) { - msg_Dbg (p_access, "skipping non regular file %s", path); + msg_Dbg (p_access, "skipping non-regular file %s", path); goto error; } @@ -227,7 +226,7 @@ static block_t *Block (access_t *p_access) if (addr == MAP_FAILED) { msg_Err (p_access, "memory mapping failed (%m)"); - intf_UserFatal (p_access, false, _("File reading failed"), + dialog_Fatal (p_access, _("File reading failed"), "%s", _("VLC could not read the file.")); goto fatal; } @@ -281,8 +280,6 @@ static int Seek (access_t *p_access, int64_t i_pos) static int Control (access_t *p_access, int query, va_list args) { - access_sys_t *p_sys = p_access->p_sys; - switch (query) { case ACCESS_CAN_SEEK: