Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Feb 2010 01:00:40 -0500
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        freebsd-hackers@freebsd.org
Cc:        Garrett Cooper <yanefbsd@gmail.com>, Tim Kientzle <kientzle@freebsd.org>, Juergen Lock <nox@jelal.kn-bremen.de>
Subject:   Re: "tar tfv /dev/cd0" speedup patch
Message-ID:  <201002200100.48161.jkim@FreeBSD.org>
In-Reply-To: <4B7F711E.6040402@freebsd.org>
References:  <20100217215940.GA19713@triton8.kn-bremen.de> <20100219181247.GA35702@triton8.kn-bremen.de> <4B7F711E.6040402@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 20 February 2010 12:20 am, Tim Kientzle wrote:
> Juergen,
>
> I was looking at your Linux code here and thought
> the technique of trying lseek(SEEK_END) might work.
> Unfortunately, it doesn't: lseek(fd, 0, SEEK_END) gives
> zero for both /dev/sa0 (a tape drive) and /dev/cd0
> (an optical drive).  Are you sure it works on Linux?

Can you please try ioctl(fd, BLKGETSIZE64, &some_uint64_var) or 
ioctl(fd, BLKGETSIZE, &some_u_long_var)?

Jung-uk Kim



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002200100.48161.jkim>