From 57d2983b03a656783ba67b0d38118319028d0687 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 29 Oct 2006 16:29:07 +0000 Subject: [PATCH] Allow seeking of character devices with non-zero size --- modules/access/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/access/file.c b/modules/access/file.c index 8ffce0f737..7573646473 100644 --- a/modules/access/file.c +++ b/modules/access/file.c @@ -227,7 +227,8 @@ static int Open( vlc_object_t *p_this ) p_sys->b_seekable = VLC_TRUE; } #elif defined( HAVE_SYS_STAT_H ) - else if( S_ISREG(stat_info.st_mode) || S_ISBLK(stat_info.st_mode) ) + else if( S_ISREG(stat_info.st_mode) || S_ISBLK(stat_info.st_mode) + || ( S_ISCHR(stat_info.st_mode) && (stat_info.st_size > 0) ) ) { p_sys->b_seekable = VLC_TRUE; p_access->info.i_size = stat_info.st_size; -- 2.39.2