| To: | Ron Henry <dijital1@xxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: stat() and xfs |
| From: | Nathan Scott <nathans@xxxxxxx> |
| Date: | Wed, 18 Sep 2002 13:19:45 +1000 |
| Cc: | linux-xfs@xxxxxxxxxxx |
| In-reply-to: | <Pine.LNX.4.44.0209162121170.16184-100000@area51.underboost.net>; from dijital1@underboost.net on Mon, Sep 16, 2002 at 09:29:50PM -0400 |
| References: | <Pine.LNX.4.44.0209162121170.16184-100000@area51.underboost.net> |
| Sender: | linux-xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.2.5i |
hi,
On Mon, Sep 16, 2002 at 09:29:50PM -0400, Ron Henry wrote:
> if I do stat("filename", &entry); and I then procede to printf() some of
> the fields of the returned structure, is there a problem with casting the
> elements to int vs something else? for ex should it be
>
> printf("inode: %d\n", (int)entry.st_ino); OR
>
> printf("inode: %lld\n", (long long)entry.st_ino);
>
> The platform is x86. OS is Linux
>
The latter is more correct - the first would chop off the top
32 bits (and get the wrong result, should the inode number be
greater than 2^32 - 1).
cheers.
--
Nathan
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | stat() and xfs, Ron Henry |
|---|---|
| Next by Date: | TAKE - QA, Nathan Scott |
| Previous by Thread: | stat() and xfs, Ron Henry |
| Next by Thread: | TAKE - QA, Nathan Scott |
| Indexes: | [Date] [Thread] [Top] [All Lists] |