mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bob Copeland <email@bobcopeland.com>
To: "linux-os (Dick Johnson)" <linux-os@analogic.com>
Cc: Parag Warudkar <kernel-stuff@comcast.net>,
	Al Viro <viro@ftp.linux.org.uk>,
	Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: Compatible fstat()
Date: Tue, 8 Nov 2005 14:39:51 -0500	[thread overview]
Message-ID: <b6c5339f0511081139y7ab57ea9y498d9cf4aae9692b@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0511081316390.4913@chaos.analogic.com>

> > Yeah I corrected that before trying but still didn't work on Debian
> > (2.6.8 kernel)...
> > Running root, open successful but size is always zero - Strange..
> >
> > Parag
>
> Also found that the returned value was -1 and errno was EOVERFLOW.
> So, that doesn't work either!

Isn't this just because the device size is > 2**32?  What if you use fseeko(3)
and #define _FILE_OFFSET_BITS 64?

Okay, still not portable and there is probably a better way that doesn't rely
on such nonsense.  For example, since you have a minimum size in mind,
just seek that much and see if it works - you don't really need to know the
whole disk size for that.  Or figure out the best way on all of your platforms
and abstract it.

-Bob

  reply	other threads:[~2005-11-08 19:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-08 15:48 linux-os (Dick Johnson)
2005-11-08 17:10 ` Parag Warudkar
2005-11-08 17:22   ` Al Viro
2005-11-08 17:56     ` linux-os (Dick Johnson)
2005-11-08 17:58     ` Parag Warudkar
2005-11-08 18:10       ` linux-os (Dick Johnson)
2005-11-08 18:15         ` Parag Warudkar
2005-11-08 18:20           ` linux-os (Dick Johnson)
2005-11-08 19:39             ` Bob Copeland [this message]
2005-11-08 20:03               ` linux-os (Dick Johnson)
2005-11-08 21:06               ` Parag Warudkar
2005-11-08 22:57                 ` Bill Davidsen
2005-11-09  0:14                   ` Parag Warudkar
2005-11-12 13:41                     ` Bill Davidsen
2005-11-08 18:49     ` Theodore Ts'o
2005-11-08 19:12       ` Parag Warudkar
2005-11-09  3:23         ` Theodore Ts'o
2005-11-08 17:53   ` linux-os (Dick Johnson)
2005-11-08 18:04     ` Parag Warudkar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b6c5339f0511081139y7ab57ea9y498d9cf4aae9692b@mail.gmail.com \
    --to=email@bobcopeland.com \
    --cc=kernel-stuff@comcast.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®