Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-05-12 07:08:59 +0400
committerChristopher Faylor <me@cgf.cx>2002-05-12 07:08:59 +0400
commit29ee580d07d537ec3f57c7ba1f95488513a81eff (patch)
treeaf40e2848dddd0489cc09af4919a780efdb9c5b5 /winsup/cygwin/path.h
parentb84621d2e3bfcf29f1ce1e700e3b4cd895dff2fd (diff)
* fhandler.h (executable_states): For now, make dont_care_if_executable
equivalent to not_executable. * sys/mount.h: Define MOUNT_NOTEXEC. * path.h (fs_info): New class. (path_conv): Move fs-specific fields to new 'fs' structure. (path_conv::update_fs_info): Move to fs_info and rename to just 'update'. * path.cc (fs_info::update): Ditto. Return 'true' if successful. (fillout_mntent): Add ',noexec' to list of reported options.
Diffstat (limited to 'winsup/cygwin/path.h')
-rw-r--r--winsup/cygwin/path.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
index 7b47720e7..702461039 100644
--- a/winsup/cygwin/path.h
+++ b/winsup/cygwin/path.h
@@ -44,10 +44,10 @@ enum path_types
PATH_SYMLINK = MOUNT_SYMLINK,
PATH_BINARY = MOUNT_BINARY,
PATH_EXEC = MOUNT_EXEC,
+ PATH_NOTEXEC = MOUNT_NOTEXEC,
PATH_CYGWIN_EXEC = MOUNT_CYGWIN_EXEC,
PATH_ALL_EXEC = (PATH_CYGWIN_EXEC | PATH_EXEC),
PATH_ISDISK = 0x04000000,
- PATH_NOTEXEC = 0x08000000,
PATH_HAS_SYMLINKS = 0x10000000,
PATH_HASBUGGYOPEN = 0x20000000,
PATH_SOCKET = 0x40000000,
@@ -55,18 +55,22 @@ enum path_types
};
class symlink_info;
-class path_conv
+struct fs_info
{
- char path[MAX_PATH];
+ char name[MAX_PATH];
char root_dir[MAX_PATH];
- char fs_name[MAX_PATH];
- DWORD fs_flags;
- DWORD fs_serial;
+ DWORD flags;
+ DWORD serial;
DWORD sym_opt; /* additional options to pass to symlink_info resolver */
- void add_ext_from_sym (symlink_info&);
- void update_fs_info (const char*);
+ DWORD is_remote_drive;
DWORD drive_type;
- bool is_remote_drive;
+ bool update (const char *);
+};
+class path_conv
+{
+ char path[MAX_PATH];
+ fs_info fs;
+ void add_ext_from_sym (symlink_info&);
public:
unsigned path_flags;
@@ -79,7 +83,7 @@ class path_conv
char *normalized_path;
int isdisk () const { return path_flags & PATH_ISDISK;}
- int isremote () const {return is_remote_drive;}
+ int isremote () const {return fs.is_remote_drive;}
int has_acls () const {return path_flags & PATH_HASACLS;}
int has_symlinks () const {return path_flags & PATH_HAS_SYMLINKS;}
int hasgood_inode () const {return path_flags & PATH_HASACLS;} // Not strictly correct
@@ -126,7 +130,9 @@ class path_conv
check (src, opt | PC_NULLEMPTY, suffixes);
}
- path_conv (): path_flags (0), known_suffix (NULL), error (0), devn (0), unit (0), fileattr (INVALID_FILE_ATTRIBUTES), normalized_path (NULL) {path[0] = '\0';}
+ path_conv (): path_flags (0), known_suffix (NULL), error (0), devn (0),
+ unit (0), fileattr (INVALID_FILE_ATTRIBUTES),
+ normalized_path (NULL) {path[0] = '\0';}
~path_conv ();
inline char *get_win32 () { return path; }
@@ -138,8 +144,8 @@ class path_conv
DWORD get_devn () {return devn == FH_BAD ? (DWORD) FH_DISK : devn;}
short get_unitn () {return devn == FH_BAD ? 0 : unit;}
DWORD file_attributes () {return fileattr;}
- DWORD get_drive_type () {return drive_type;}
- BOOL fs_fast_ea () {return sym_opt & PC_CHECK_EA;}
+ DWORD get_drive_type () {return fs.drive_type;}
+ BOOL fs_fast_ea () {return fs.sym_opt & PC_CHECK_EA;}
void set_path (const char *p) {strcpy (path, p);}
void clear_normalized_path ();
};