Issue 2418 - statfs refences differ on IRIX
Summary: statfs refences differ on IRIX
Status: CLOSED FIXED
Alias: None
Product: udk
Classification: Code
Component: code (show other issues)
Version: 641
Hardware: SGI IRIX
: P3 Trivial (vote)
Target Milestone: OOo 1.0.3
Assignee: nickb
QA Contact: issues@udk
URL:
Keywords:
: 4551 (view as issue list)
Depends on:
Blocks:
 
Reported: 2001-12-04 05:19 UTC by Unknown
Modified: 2003-11-23 11:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
sal/osl/unx/file.c - statfs fix for IRIX. This is the preferable fix of the 2 patches supplied for this issue (3.02 KB, patch)
2001-12-04 05:31 UTC, Unknown
no flags Details | Diff
sal/osl/unx/file.c - statfs fix for IRIX. Non preferable patch. (2.24 KB, patch)
2001-12-04 05:34 UTC, Unknown
no flags Details | Diff
patch for irix (1.03 KB, patch)
2003-03-14 01:01 UTC, Unknown
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2001-12-04 05:19:12 UTC
The statfs system call used in sal/osl/unx/file.c for obtaining file system 
information does not currently work on IRIX.
The statfs struct on IRIX differs to other *IX platforms, and so do the 
arguments in the statfs system call.

To be more specific:
- The member of the statfs structure that returns the count of free blocks is 
f_bavail on other *IX platforms, but on IRIX is f_bfree.
- The statfs system call is 
`int statfs (const char *path, struct statfs *buf);`
 on other *IX platforms, but on IRIX, has the following form:
int statfs (const char *path, struct statfs *buf, int len, int fstyp);
Comment 1 Unknown 2001-12-04 05:31:12 UTC
Created attachment 755 [details]
sal/osl/unx/file.c - statfs fix for IRIX. This is the preferable fix of the 2 patches supplied for this issue
Comment 2 Unknown 2001-12-04 05:34:27 UTC
Created attachment 756 [details]
sal/osl/unx/file.c - statfs fix for IRIX. Non preferable patch.
Comment 3 Unknown 2001-12-04 05:39:01 UTC
The first of the 2 patches is the preferable choice, as it is much 
cleaner and neater, and leaves the code in a more readable state. It 
has been tested under Linux, and caused no problems. It does create a 
new couple more new macro's to replcae some calls and refences to 
statfs in the code that are not compatable under IRIX.

The second patch is there because it looks to have less impact on 
other platforms (although the first is fine also).
Comment 4 kay.ramme 2001-12-18 09:09:47 UTC
KR->HRO: Please have a look at this.
Comment 5 hennes.rohling 2002-01-09 11:10:52 UTC
-
Comment 6 nickb 2002-03-26 04:00:04 UTC
Would be great if we could get one of these checked in for 1.0.

Thanks
Comment 7 hennes.rohling 2002-04-23 14:22:06 UTC
Patch 2418-1 applied. 

File(s) changed:
porting/sal/osl/unx/file.c, rev 1.51.2.4
Comment 8 hennes.rohling 2002-04-30 17:04:42 UTC
The patch contained a small error that has broken the solaris build. 
Martin drawed back the usage of the new macro __OSL_STATFS_FUNC to 
ensure the solaris and linux builds work.

Actually Irix will not work, so I need to apply a minor change to 
reactivate functionaly on solaris AND irix.
Comment 9 hennes.rohling 2002-05-06 12:55:47 UTC
Modified changes made for issue 4329 to work on Irix ANS Solaris.

sal/osl/unx/file.c, rev 1.51.2.6
Comment 10 hennes.rohling 2002-05-07 13:07:15 UTC
*** Issue 4551 has been marked as a duplicate of this issue. ***
Comment 11 Unknown 2003-03-14 00:59:36 UTC
I'd like to reopen this issue, as we are now using statvfs on Irix
rather than statfs. Attached is patch for the changes, and this only
affects IRIX.

George
Comment 12 Unknown 2003-03-14 01:01:11 UTC
Re assigning to Nick as it is a simple porting issue affecting only Irix
Comment 13 Unknown 2003-03-14 01:01:59 UTC
Created attachment 5080 [details]
patch for irix
Comment 14 nickb 2003-03-16 23:02:47 UTC
Added milestone
Comment 15 nickb 2003-03-19 05:13:07 UTC
Accepting...
Comment 16 foskey 2003-04-02 11:47:04 UTC
If nick approves then I approve.   It is specific to IRIX.

Should this be checked in configure and set there somehow?
Comment 17 nickb 2003-04-03 00:29:55 UTC
Checked in sal/osl/unx/file.c - 1.51.2.12 - (OOO_STABLE_1)
Comment 18 pavel 2003-11-23 11:57:01 UTC
Closing.