of path.cc for usage in mount. (mount.exe): Add dependency to path-mount.o. * mount.cc (force): Convert to bool value. Accommodate throughout. (from_fstab): New function. (do_mount_from_fstab): New function. (longopts): Add --all option. (opts): Add -a option. (usage): Document -a/--all option. (main): Handle -a option as well as single parameter. * path.cc: Add FSTAB_ONLY conditional to allow building path-mount.o. (mount_table): Remove static storage class. (max_mount_entry): Ditto. (root_here): Unused. Remove. (from_fstab_line): Remove static. * path.h (struct mnt_t): Define here rather than in path.cc. (from_fstab_line): Declare. (mount_table): Declare. (max_mount_entry): Declare. * utils.sgml (mount): Document -a/--all option and mounting of single path from fstab files.
		
			
				
	
	
		
			33 lines
		
	
	
		
			739 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			739 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /* path.h
 | |
| 
 | |
|    Copyright 2001, 2002, 2003, 2006, 2008, 2009 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. */
 | |
| 
 | |
| struct mnt_t
 | |
| {
 | |
|   char *native;
 | |
|   char *posix;
 | |
|   unsigned flags;
 | |
| };
 | |
| 
 | |
| char *cygpath (const char *s, ...);
 | |
| char *cygpath_rel (const char *cwd, const char *s, ...);
 | |
| bool is_exe (HANDLE);
 | |
| bool is_symlink (HANDLE);
 | |
| bool readlink (HANDLE, char *, int);
 | |
| int get_word (HANDLE, int);
 | |
| int get_dword (HANDLE, int);
 | |
| bool from_fstab_line (mnt_t *m, char *line, bool user);
 | |
| 
 | |
| extern mnt_t mount_table[255];
 | |
| extern int max_mount_entry;
 | |
| 
 | |
| #ifndef SYMLINK_MAX
 | |
| #define SYMLINK_MAX 4095  /* PATH_MAX - 1 */
 | |
| #endif
 |