Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

os_vx_abs.c

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 1997-2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: os_vx_abs.c,v 12.1 2005/06/16 20:23:26 bostic Exp $
00008  */
00009 
00010 #include "db_config.h"
00011 
00012 #include "db_int.h"
00013 #include "iosLib.h"
00014 
00015 /*
00016  * __os_abspath --
00017  *      Return if a path is an absolute path.
00018  */
00019 int
00020 __os_abspath(path)
00021         const char *path;
00022 {
00023         DEV_HDR *dummy;
00024         char *ptail;
00025 
00026         /*
00027          * VxWorks devices can be rooted at any name at all.
00028          * Use iosDevFind() to see if name matches any of our devices.
00029          */
00030         if ((dummy = iosDevFind((char *)path, &ptail)) == NULL)
00031                 return (0);
00032         /*
00033          * If the routine used a device, then ptail points to the
00034          * rest and we are an abs path.
00035          */
00036         if (ptail != path)
00037                 return (1);
00038         /*
00039          * If the path starts with a '/', then we are an absolute path,
00040          * using the host machine, otherwise we are not.
00041          */
00042         return (path[0] == '/');
00043 }

Generated on Sun Dec 25 12:14:42 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2