[cups.bugs] [MOD] STR #3836: statfs on Solaris is not what cups thinks ...

Rob McMahon Rob.McMahon at warwick.ac.uk
Wed Apr 27 08:47:15 PDT 2011


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

> uname -a
SunOS schufia 5.10 Generic_141445-09 i86pc i386 i86pc Solaris
> cc -V
cc: Sun Ceres C 5.10 SunOS_i386 2009/03/06
usage: cc [ options] files.  Use 'cc -flags' for details
> 

statfs on Solaris exists for backwards compatibility, but takes four
parameters.  The prototype is

/usr/include/sys/statfs.h:int statfs(const char *, struct statfs *, int,
int);

>From the same file:
/*
 * Structure returned by statfs(2) and fstatfs(2).
 * This structure and associated system calls have been replaced
 * by statvfs(2) and fstatvfs(2) and will be removed from the system
 * in a near-future release.
 */

Although CUPS is happy to use the preferred interface statvfs, it picks
statfs in preference, but calls it with only two parameters, and dumps
core.  If statvfs exists, I believe it should be used in preference to
statfs.  Attached is a diff to scheduler/printers.c that fixes this for
Solaris 10, and which I believe should be safe on any OS.

Link: http://www.cups.org/str.php?L3836
Version: 1.4.6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diffs
Type: application/octet-stream
Size: 1656 bytes
Desc: not available
URL: <http://lists.cups.org/pipermail/cups-devel/attachments/20110427/ad3785c0/attachment.obj>


More information about the cups-devel mailing list