"Fossies" - the Fresh Open Source Software Archive

Member "schily-2021-09-18/sunpro/Make/lib/vroot/src/lstat.cc" (15 Aug 2021, 1817 Bytes) of package /linux/privat/schily-2021-09-18.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /*
    2  * CDDL HEADER START
    3  *
    4  * This file and its contents are supplied under the terms of the
    5  * Common Development and Distribution License ("CDDL"), version 1.0.
    6  * You may use this file only in accordance with the terms of version
    7  * 1.0 of the CDDL.
    8  *
    9  * A full copy of the text of the CDDL should have accompanied this
   10  * source.  A copy of the CDDL is also available via the Internet at
   11  * http://www.opensource.org/licenses/cddl1.txt
   12  * See the License for the specific language governing permissions
   13  * and limitations under the License.
   14  *
   15  * When distributing Covered Code, include this CDDL HEADER in each
   16  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
   17  * If applicable, add the following below this CDDL HEADER, with the
   18  * fields enclosed by brackets "[]" replaced with your own identifying
   19  * information: Portions Copyright [yyyy] [name of copyright owner]
   20  *
   21  * CDDL HEADER END
   22  */
   23 /*
   24  * Copyright 1998 Sun Microsystems, Inc. All rights reserved.
   25  * Use is subject to license terms.
   26  */
   27 /*
   28  * @(#)lstat.cc 1.6 06/12/12
   29  */
   30 
   31 #pragma ident   "@(#)lstat.cc   1.6 06/12/12"
   32 
   33 /*
   34  * Copyright 2017 J. Schilling
   35  *
   36  * @(#)lstat.cc 1.3 21/08/16 2017 J. Schilling
   37  */
   38 #include <schily/mconfig.h>
   39 #ifndef lint
   40 static  UConst char sccsid[] =
   41     "@(#)lstat.cc   1.3 21/08/16 2017 J. Schilling";
   42 #endif
   43 
   44 #include <sys/types.h>
   45 #include <sys/stat.h>
   46 
   47 extern int lstat(const char *path, struct stat *buf);
   48 
   49 #include <vroot/vroot.h>
   50 #include <vroot/args.h>
   51 
   52 static int  lstat_thunk(char *path)
   53 {
   54     vroot_result= lstat(path, vroot_args.lstat.buffer);
   55     return(vroot_result == 0);
   56 }
   57 
   58 int lstat_vroot(char *path, struct stat *buffer, pathpt vroot_path, pathpt vroot_vroot)
   59 {
   60     vroot_args.lstat.buffer= buffer;
   61     translate_with_thunk(path, lstat_thunk, vroot_path, vroot_vroot, rw_read);
   62     return(vroot_result);
   63 }