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 }