Re: Issues with lseek(2) on a block device

2024-02-25 Thread Sad Clouds
On Sun, 25 Feb 2024 07:21:07 -0300 Crystal Kolipe wrote: > In most cases, unless we are talking about a low-level disk utility, if > userland code is trying to find out the size of a raw block device then it > seems like a design error. There are many valid reason why applications may want to

Re: Issues with lseek(2) on a block device

2024-02-25 Thread Jason Thorpe
> On Feb 25, 2024, at 12:29 AM, Robert Elz wrote: > > ps: as a semi-related anecdote, the first system I ever personally > installed any unix version onto (way back in the mid 70's) booted from > a reel to reel (1/2" I think) tape - and by booted, I mean ran with its > filesystems (or

Re: Issues with lseek(2) on a block device

2024-02-25 Thread Crystal Kolipe
On Sat, Feb 24, 2024 at 10:54:56PM +, Taylor R Campbell wrote: > > Date: Sat, 24 Feb 2024 16:21:42 -0500 > > From: Thor Lancelot Simon > > > > On Wed, Feb 21, 2024 at 09:20:55PM +, Taylor R Campbell wrote: > > > I think this is a bug, and it would be great if stat(2) just returned > > >

Re: Issues with lseek(2) on a block device

2024-02-25 Thread Sad Clouds
On Sat, 24 Feb 2024 16:28:28 -0500 Thor Lancelot Simon wrote: > On Thu, Feb 22, 2024 at 12:08:14PM +, Sad Clouds wrote: > > Hello, thanks to everyone who responded with their suggestions. Using > > various non-portable ioctls I can device size on most platforms, for > > both block and raw

Re: Issues with lseek(2) on a block device

2024-02-25 Thread Robert Elz
Date:Sun, 25 Feb 2024 04:16:03 - (UTC) From:mlel...@serpens.de (Michael van Elst) Message-ID: | lseek() doesn't move the tape. But the open() or close() may trigger | tape operations like loading or winding. Special files are special. The issue is more the