diff options
author | Christopher Faylor <me@cgf.cx> | 2001-11-11 09:07:36 +0300 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-11-11 09:07:36 +0300 |
commit | d0d517913c0c66166bd895f0d14b79260eeb69bb (patch) | |
tree | 0b421f7bce96f35a9400a1e3558ea891a5d86933 /winsup/utils/path.cc | |
parent | 2fac517df43d7d8de14bd2c7ef4b944ffb507960 (diff) |
* dump_setup.cc: New file.
* Makefile.in: Add info for dump_setup.o.
* cygcheck.cc (main): Recognize '-c' option for checking setup installed base.
* path.cc (cygpath): Read mount table if not loaded.
Diffstat (limited to 'winsup/utils/path.cc')
-rw-r--r-- | winsup/utils/path.cc | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc index 7670904c8..d3c99de12 100644 --- a/winsup/utils/path.cc +++ b/winsup/utils/path.cc @@ -1,17 +1,12 @@ -/* - * Copyright (c) 2000, Red Hat, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * A copy of the GNU General Public License can be found at - * http://www.gnu.org/ - * - * Written by DJ Delorie <dj@cygnus.com> - * - */ +/* path.cc + + Copyright 2001 Red Hat, Inc. + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. */ /* The purpose of this file is to hide all the details about accessing Cygwin's mount table. If the format or location of the mount table @@ -94,7 +89,7 @@ get_cygdrive (HKEY key, mnt *m, int issystem) return m + 1; } -void +static void read_mounts () { DWORD posix_path_size; @@ -277,6 +272,8 @@ cygpath (const char *s, ...) int max_len = -1; struct mnt *m, *match = NULL; + if (!mount_table[0].posix) + read_mounts (); va_start (v, s); char *path = vconcat (s, v); if (strncmp (path, "./", 2) == 0) |