[Top] [All Lists]

Re: IRIX emulation, getting there.

To: Miguel de Icaza <>
Subject: Re: IRIX emulation, getting there.
From: "William J. Earl" <>
Date: Mon, 8 Sep 1997 10:55:12 -0700
In-reply-to: <>
References: <>
Miguel de Icaza writes:
 > This is my next show stopper:
 >    There is a misterious fcntl call in the IRIX Xsgi server:
 > it is called with the F_ALLOCSP flag, what is this flag used for in
 > the X server setup code?  

     This fcntl() sets the size of a file, and assures that
the underlying storage is really assigned.  From fcntl(2):

     F_FREESP  Alter storage space associated with a section of the ordinary
               file fildes.  The section is specified by a variable of data
               type struct flock pointed to by the third argument arg.  The
               data type struct flock is defined in the <fcntl.h> header file
               [see fcntl(5)] and contains the following members:  l_whence is
               0, 1, or 2 to indicate that the relative offset l_start will be
               measured from the start of the file, the current position, or
               the end of the file, respectively.  l_start is the offset from
               the position specified in l_whence.  l_len is the size of the
               section.  An l_len of 0 frees up to the end of the file; in
               this case, the end of file (i.e., file size) is set to the
               beginning of the section freed.  Any data previously written
               into this section is no longer accessible.  If the section
               specified is beyond the current end of file, the file is grown
               and filled with zeroes.  The l_len field is currently ignored,
               and should be set to 0.

     F_ALLOCSP This command is identical to F_FREESP.

<Prev in Thread] Current Thread [Next in Thread>