Am 23.04.2010 10:00, schrieb Richard W.M. Jones:
> On Fri, Apr 23, 2010 at 09:07:28AM +0400, Michael Tokarev wrote:
>> So we'll have to either
>> trial and error, or open "normally", check
>> if it's a block device and re-open with that
>> flag set.
>
> Perhaps I'm missing something, but why can't
Richard W.M. Jones wrote:
> On Fri, Apr 23, 2010 at 09:07:28AM +0400, Michael Tokarev wrote:
>> So we'll have to either
>> trial and error, or open "normally", check
>> if it's a block device and re-open with that
>> flag set.
>
> Perhaps I'm missing something, but why can't you stat(2) the name
>
On Fri, Apr 23, 2010 at 09:07:28AM +0400, Michael Tokarev wrote:
> So we'll have to either
> trial and error, or open "normally", check
> if it's a block device and re-open with that
> flag set.
Perhaps I'm missing something, but why can't you stat(2) the name
first to see if it's a block device (
While I'm reviewing a thread about block device
locking, here's another data point which were
not touched before, as far as I remember. It
is related.
What I'm talking is - when fsck/mkfs/... family
of programs are run against a mounted (or in use
by other means) device, they warn you about this