aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/mount.cc
AgeCommit message (Collapse)AuthorFilesLines
2019-02-18Cygwin: mount: define binary mount as defaultCorinna Vinschen1-27/+18
Commit c1023ee353705671aa9a8e4e1179022277add2aa changed the way path_conv::binmode() works. Rather than returning three states, O_BINARY, O_TEXT, 0, it only returned 2 states, O_BINARY, O_TEXT. Since mounts are only binary if they are explicitely mounted binary by setting the MOUNT_BINARY flag, textmode is default. This introduced a new bug. When inheriting stdio HANDLEs from native Windows processes, the fhandler and its path_conv are created from a device struct only. None of the path or mount flags get set this way. So the mount flags are 0 and path_conv::binmode() returned 0. After the path_conv::binmode() change it returned O_TEXT since, as explained above, the default mount mode is textmode. Rather than just enforcing binary mode for path_conv's created from device structs, this patch changes the default mount mode to binary: Replace MOUNT_BINARY flag with MOUNT_TEXT flag with opposite meaning. Drop all explicit setting of MOUNT_BINARY. Drop local set_flags function, it doesn't add any value. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-02-18Cygwin: mount: remove unused method mount_info::set_flags_from_win32_pathCorinna Vinschen1-15/+0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-01-06Cygwin: path_conv: decouple path_types from mount typesCorinna Vinschen1-13/+4
- Remove another unfortunate amalgamation: Mount flags (MOUNT_xxx) are converted to path_types (PATH_xxx) and mixed with non-mount path_types flags in the same storage, leading to a tangled, pell-mell usage of mount flags and path flags in path_conv and symlink_info. - There's also the case of PC_NONULLEMPTY. It's used in exactly one place with a path_conv constructor only used in this single place, just to override the automatic PC_NULLEMPTY addition when calling the other path_conv constructors. Crazily, PC_NONULLEMPTY is a define, no path_types flag, despite its name. - It doesn't help that the binary flag exists as mount and path flag, while the text flag only exists as path flag. This leads to mount code using path flags to set text/binary. Very confusing is the fact that a text mount/path flag is not actually required; the mount code sets the text flag on non binary mounts anyway, so there are only two states. However, to puzzle people a bit more, path_conv::binary wrongly implies there's a third, non-binary/non-text state. Clean up this mess: - Store path flags separately from mount flags in path_conv and symlink_info classes and change all checks and testing inline methods accordingly. - Make PC_NONULLEMPTY a simple path_types flag and drop the redundant path_check constructor. - Clean up the definition of pathconv_arg, path_types, and mount flags. Use _BIT expression, newly define in cygwin/bits.h. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-12-25Cygwin: cygheap: convert installation paths to UNICODE_STRINGSCorinna Vinschen1-1/+1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-12-23Cygwin: support exFAT and fix remote FAT/FAT32 recognitionCorinna Vinschen1-1/+7
Newer FAT32 and exFAT add FILE_SUPPORTS_ENCRYPTION to their flags which wasn't handled by Cygwin yet. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-03-27Recognize Netapp mode supporting reparse pointsCorinna Vinschen1-0/+1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-06-24Fix various OS-related commentsCorinna Vinschen1-1/+1
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-06-23Drop has_broken_udf flagCorinna Vinschen1-12/+3
2016-06-23Remove support for SUNWNFS file systemCorinna Vinschen1-8/+3
2016-06-23Handle up to 63 partitions per driveCorinna Vinschen1-1/+1
Revamp device parsing code. Introducing support for more partitions into the shilka-generated parser has the unfortunate side-effect of raising the size of the DLL by almost 2 Megs. Therefore we split out the handling for /dev/sdXY devices into a tiny bit of hand-written code. While at it, remove some unused cruft from devices.* and generally clean up the device class to provide access methods instead of direct access to members. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-06-23Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout optioncygwin-2_5_2-releaseCorinna Vinschen1-3/+0
Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause. Everything else stays under GPLv3+. New Linking Exception exempts resulting executables from LGPLv3 section 4. Add CONTRIBUTORS file to keep track of licensing. Remove 'Copyright Red Hat Inc' comments. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-04-01Remove MALLOC_CHECK and calls to it entirelyCorinna Vinschen1-6/+0
MALLOC_CHECK got useless with commit b259af5. Remove it throughout. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-03-20Add necessary braces to if statementsPeter Foley1-1/+2
The missing braces cause only the first expression to be guarded by the else clause. winsup/cygwin/ChangeLog * fhandler_disk_file.cc (facl): Add missing braces to if statement. * mount.cc (dos_drive_mappings): Add missing braces to if statement. Signed-off-by: Peter Foley <pefoley2@pefoley.com>
2016-02-15cygwin_conv_path: Really always preserve trailing slash in conversion to ↵Corinna Vinschen1-1/+1
POSIX path * mount.cc (mount_info::conv_to_posix_path): Account for scenarios where the path is identical to a mount point in terms of preserving the trailing slash in the output. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-02-09cygwin_conv_path: Always preserve trailing backslashes in conversion to ↵Corinna Vinschen1-1/+2
POSIX paths * include/sys/cygwin.h (CCP_CONVFLAGS_MASK): Define. * mount.h (__CCP_APP_SLASH): Define. * mount.cc (mount_info::conv_to_posix_path): Handle __CCP_APP_SLASH flag. * path.cc (cygwin_conv_path): Use CCP_CONVFLAGS_MASK to evaluate "how" flag values. Always add __CCP_APP_SLASH flag when calling mount_info::conv_to_posix_path. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-01-27Drop has_broken_fnoi flagCorinna Vinschen1-4/+0
* mount.cc (fs_info::update): Don't set has_broken_fnoi. It's unused anyway. * mount.h (class fs_info): Remove has_broken_fnoi status flag. * path.h (class path_conv): Remove has_broken_fnoi method. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-12-07Introduce the 'usertemp' filesystem typeJohannes Schindelin1-0/+21
* mount.cc (mount_info::from_fstab_line): Support mounting the current user's temp folder as /tmp/. This is particularly useful a feature when Cygwin's own files are write-protected. * pathnames.xml: document the new usertemp file system type Detailed explanation: In the context of Windows, there is a per-user directory for temporary files, by default specified via the environment variable %TEMP%. Let's allow to use that directory for our /tmp/ directory. With this patch, we introduce the special filesystem type "usertemp": By specifying none /tmp usertemp binary,posix=0 0 0 in /etc/fstab, the /tmp/ directory gets auto-mounted to the directory specified by the %TEMP% variable. This feature comes handy in particularly in scenarios where the administrator might want to write-protect the entire Cygwin directory yet still needs to allow users to write into the /tmp/ directory. This is the case in the context of Git for Windows, where the Cygwin (MSys2) root directory lives inside C:\Program Files and hence /tmp/ would not be writable otherwise. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2015-12-06Allow cygwin_conv_path(3) and cygpath(1) to emit /proc/cygdrive prefixed pathCorinna Vinschen1-21/+35
* include/sys/cygwin.h (CCP_PROC_CYGDRIVE): New flag. * mount.cc (mount_info::cygdrive_posix_path): Take flag values rather than just a trailing_slash_p bool. Emit /proc/cygdrive path if CCP_PROC_CYGDRIVE flag is given. (mount_info::conv_to_posix_path): Take flag values rather than just a keep_rel_p bool. Rename _p variables. Print flag value as hex in debug_printf. Call cygdrive_posix_path with flag values. * mount.h (mount_info::cygdrive_posix_path): Accommodate above change in declaration. (mount_info::conv_to_posix_path): Ditto. * fhandler_process.cc (format_process_exename): Accommodate change to mount_info::conv_to_posix_path. * path.cc (cygwin_conv_path): Ditto. * cygpath.cc (absolute_flag): Initialize to CCP_RELATIVE to simplify expressions. (cygdrive_flag): New global flag. (long_options): Add --proc-cygdrive option. (options): Add -U option. (usage): Add description for -U option. (do_sysfolders): Or cygdrive_flag to cygwin_conv_path call. (do_pathconv): Simply or absolute_flag to conv_func. Or cygdrive_flag to conv_func. (do_options): Initalize absolute_flag to CCP_RELATIVE. Initialize new cygdrive_flag. Set absolute_flag to CCP_ABSOLUTE on -a. Set cygdrive_flag to CCP_PROC_CYGDRIVE on -U. * new-features.xml (ov-new2.4): Document cygpath -U option. * utils.xml (cygpath): Ditto. * path.xml (func-cygwin-path): Add CCP_PROC_CYGDRIVE description. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-05Fake volume serial number on filesystems not providing itCorinna Vinschen1-2/+28
* mount.cc (fs_info::update): Fake a serial number on filesystems not providing one. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-04Accommodate trailing NUL in PrlSF filesystem name.Corinna Vinschen1-0/+2
* globals.cc (ro_u_prlfs): Add trailing NUL. Explain why. * mount.cc (fs_info::update): Add a comment to explain PrlSF. * path.h (path_conv::fs_is_prlfs): Add for symmetry. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-11-02Add support for Parallels Desktop FS (prlfs)Corinna Vinschen1-2/+8
* mount.h (enum fs_info_type): Add prlfs (Parallels Desktop FS). (class fs_info): Add has_broken_fnoi flag. Implement prlfs FS flag. * mount.cc (fs_info::update): Handle PrlFS. Fill new has_broken_fnoi flag with life. (fs_names): Add prlfs. * globals.cc (ro_u_prlfs): Define. * path.h (path_conv::has_broken_fnoi): New method. * path.cc (symlink_info::check): Call file_get_fnoi utilizing new has_broken_fnoi filesystem flag. * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Ditto. * new-features.xml (ov-new2.3): Document Parallels Desktop FS support. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2014-11-27 * mount.cc (mount_info::init): Take bool argument and allow toCorinna Vinschen1-6/+6
initialize mount table in two steps, system and user, depending on bool value. * mount.h (class mount_info): Align declaration of init function to above change. * shared.cc (user_info::initialize): Initialize mount table in two steps to allow internal_getpwsid to create valid POSIX paths from DOS paths given in AD. Add comments. * uinfo.cc (cygheap_pwdgrp::get_home): Allow DOS paths in NSS_SCHEME_FREEATTR attributes. (cygheap_pwdgrp::get_shell): Ditto.
2014-08-22 * Throughout, use __try/__except/__endtry blocks, rather than myfaultCorinna Vinschen1-47/+54
handler. * cygtls.cc (_cygtls::remove): Accommodate the fact that pathbufs has been moved from _local_storage to _cygtls. * cygtls.h (class tls_pathbuf): Add comment to hint to gendef usage of counters. Change type of counters to uint32_t for clarity. Remove _cygtls as friend class. (struct _local_storage): Move pathbufs from here... (struct _cygtls): ...to here, allowing to access it from _sigbe. (class san): Only define on 32 bit. Remove errno, _c_cnt and _w_cnt members. (san::setup): Drop parameter. Don't initialize removed members. (san::leave): Don't set removed members. (class myfault): Only define on 32 bit. (myfault::faulted): Only keep implementation not taking any parameter. Drop argument in call to sebastian.setup. (__try/__leave/__except/__endtry): Implement to support real SEH. For now stick to SJLJ on 32 bit. * dcrt0.cc (dll_crt0_0): Drop 64 bit call to exception::install_myfault_handler. * exception.h (exception_handler): Define with EXCEPTION_DISPOSITION as return type. (PDISPATCHER_CONTEXT): Define as void * on 32 bit. Define as pointer to _DISPATCHER_CONTEXT on 64 bit. (class exception): Define separately for 32 and 64 bit. (exception::myfault): Add handler for myfault SEH handling on 64 bit. (exception::exception): Fix mangled method name to account for change in type of last parameter. (exception::install_myfault_handler): Remove. * exceptions.cc (exception::myfault_handle): Remove. (exception::myfault): New SEH handler for 64 bit. * gendef (_sigbe): Set tls_pathbuf counters to 0 explicitely when returning to the caller. * ntdll.h: Move a comment to a better place. (struct _SCOPE_TABLE): Define on 64 bit. * thread.cc (verifyable_object_isvalid): Remove gcc 4.7 workaround. * tls_pbuf.cc (tls_pbuf): Fix to accommodate new place of pathbufs. (tls_pathbuf::destroy): Change type of loop variables to uint32_t. * tls_pbuf.h (class tmp_pathbuf): Change type of buffer counters to uint32_t. Accommodate new place of pathbufs. * tlsoffsets.h: Regenerate. * tlsoffsets64.h: Regenerate.
2014-06-23 * mount.cc (fs_info::update): Define dir in the outermost scope to avoidCorinna Vinschen1-4/+4
accessing out-of-scope value (CID 60027). Always initialize attr to upath (CID 60113).
2014-02-08 * miscfuncs.h (class NT_readline): New class to implement line-wiseCorinna Vinschen1-77/+5
reading from file using native NT functions. * miscfuncs.cc (NT_readline::init): New method. * mount.cc (mount_info::from_fstab): Utilize NT_readline to read fstab files.
2014-02-06 * fhandler_disk_file.cc (fhandler_disk_file::fchown): Fix typo inCorinna Vinschen1-5/+6
comment. * mount.cc (mount_info::from_fstab): Use tmp_pathbuf rather than stack for big local buffer. * net.cc (cygwin_gethostname): Call GetComputerNameExA rather than GetComputerNameA if gethostname failed. * shared.cc (user_info::initialize): Fix formatting. * include/sys/file.h: Define flock and accompanying macros if not already defined in sys/_default_fcntl.h.
2013-12-11 * mount.cc (fs_info::update): Fix formatting.Corinna Vinschen1-2/+2
2013-11-24 Throughout, drop unnecessary explicit includes of windows header filesCorinna Vinschen1-5/+1
included by default. * winlean.h: Add long comment to explain why we have to define certain symbols. (_NORMALIZE_): Define. (_WINNLS_): Drop definition and subsequent undef. (_WINNETWK_): Ditto. (_WINSVC_): Ditto. 2013-11-23 Eric Blake <eblake@redhat.com>
2013-04-24 * autoload.cc (CreateSymbolicLink): Define.Corinna Vinschen1-2/+6
* environ.cc (set_winsymlinks): Set allow_winsymlinks. (parse_thing): Change "winsymlinks" to set by function. * globals.cc (enum winsym_t): Define. (allow_winsymlinks): Define as winsym_t. (ro_u_afs): New R/O Unicode string. * mount.cc (fs_info::update): Fix comment. Handle AFS. (fs_names): Add "afs". * mount.h (enum fs_info_type): Add afs. (class fs_info): Implement afs. * path.cc (symlink): Drop third parameter in call to symlink_worker. (symlink_nfs): New function. (symlink_native): New function. (symlink_worker): Drop third argument. Handle native symlink type by calling symlink_native. Move code to handle NFS to symlink_nfs. Fix formatting. Slightly restructure code. * path.h (class path_conv): Add fs_is_afs method. (symlink_worker): Declare here. * security.h: Define privilege constants as unsigned int instead of as unsigned long. * syscalls.cc (mknod_worker): Set third parameter in symlink_worker call to WSYM_lnk. * winsup.h (symlink_worker): Drop declaration here.
2013-04-23 * Merge in cygwin-64bit-branch.Corinna Vinschen1-50/+22
2013-03-06 * mount.cc (fs_names): Add trailing NULL element to avoid potentialCorinna Vinschen1-1/+2
SEGV in format_proc_filesystems.
2013-01-21Throughout, update copyrights to reflect dates which correspond to main-branchChristopher Faylor1-2/+2
checkins. Regularize copyright format.
2012-12-14 * fhandler.cc (fhandler_base::write): Don't attempt to sparsifyCorinna Vinschen1-0/+4
an already sparse file. Drop check for FILE_SUPPORTS_SPARSE_FILES flag. Explicitely set FILE_ATTRIBUTE_SPARSE_FILE attribute in cached attributes. (fhandler_base::lseek): Only set did_lseek if sparseness is supported. * fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Don't attempt to sparsify an already sparse file. Explicitely set FILE_ATTRIBUTE_SPARSE_FILE attribute in cached attributes. * mount.cc (oopt): Add "sparse" flag. (fillout_mntent): Ditto. * path.h (enum path_types): Add PATH_SPARSE. (path_conv::support_sparse): New method. (path_conv::fs_flags): Constify. (path_conv::fs_name_len): Ditto. include/sys/mount.h: Replace unused MOUNT_MIXED flag with MOUNT_SPARSE.
2012-08-16whitespace cleanupChristopher Faylor1-4/+4
2012-08-14 * mount.cc (fs_names): Add missing ReFS entry. Change comment.Corinna Vinschen1-1/+3
* mount.h (enum fs_info_type): Add comment.
2012-07-19 * mount.cc (getmntent_r): Remove unused but set variable.Yaakov Selkowitz1-2/+1
2012-07-18 * cygwin.din (getmntent_r): Export.Corinna Vinschen1-0/+29
* mount.cc (getmntent_r): New function. * posix.sgml (std-gnu): Add getmntent_r. * include/mntent.h (getmntent_r): Declare. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2012-07-02* mount.cc (mount_info::conv_to_win32_path): Eliminate unneeded assignmentChristopher Faylor1-1/+0
found by CLANG. * path.cc (symlink_info::check): Remove unneeded/unused variable found by CLANG.
2012-06-03 * globals.cc (ro_u_refs): New R/O unicode string.Corinna Vinschen1-0/+1
* mount.cc (fs_info::update): Recognize ReFS. * mount.h (enum fs_info_type): Add refs. (class fs_info): Add refs flag and accessor methods. * ntdll.h (RtlAddAccessAllowedAceEx): Declare. (RtlAddAccessDeniedAceEx): Declare. * path.h (path_conv::fs_is_refs): Define. * sec_helper.cc (_recycler_sd): New function to create security descriptors suitable for the recycler bin starting with Vista. * security.cc (add_access_allowed_ace): Use RtlAddAccessAllowedAceEx and drop code to set AceFlags explicitely. (add_access_denied_ace): Use RtlAddAccessDeniedAceEx and drop code to set AceFlags explicitely. * security.h (_recycler_sd): Declare. (recycler_sd): Define. * syscalls.cc (desktop_ini): Change formatting. (desktop_ini_ext): Define third line of recycler desktop.ini file since Vista, (try_to_bin): Handle ReFS just like NTFS. Write Vista and later Recycler in all uppercase, just like shell32 does when recreating it. Fix comments to include ReFS. Don't implicitely reuse object attributes from earlier NtOpenFile call, rather recreate it for safety. Use recycler_sd call when creating security descriptor for Recycler dirs and files on Vista and later. Write third line of desktop.ini when on Vista and later.
2012-04-02 * mount.cc (fillout_mntent): Use "none" rather than 0 when checkingCorinna Vinschen1-1/+1
FS type.
2012-02-17 * mount.cc (get_disk_type): Drop unneeded toupper call. Convert caseCorinna Vinschen1-6/+6
constants to wide chars.
2012-02-16 * autoload.cc (NetUseGetInfo): Define.Corinna Vinschen1-8/+39
* fhandler_disk_file.cc (fhandler_cygdrive::opendir): Rename flptst to drive. Call new get_disk_type function rather than is_floppy and check SMB drives with the NetUseGetInfo function. Explain why. * mount.cc (get_disk_type): New function to evaluate disk type from native NT device name. (is_floppy): Remove. * mount.h (enum disk_type): Define. (get_disk_type): Declare. * path.h (is_floppy): Drop declaration.
2012-02-14 * cygheap.cc (init_cygheap::init_installation_root): Convert functionCorinna Vinschen1-1/+1
init_installation_root into a cygheap method. * cygheap.h (struct init_cygheap): Move installation_root, installation_key, and installation_key_buf from shared .cygwin_dll_common DLL section to cygheap. Declare new method init_installation_root. * dtable.cc (handle_to_fn): Accommodate the move of installation strings to the cygheap. * external.cc (cygwin_internal): Ditto. * fhandler_console.cc (fhandler_console::open_shared_console): Ditto. * fhandler_mailslot.cc (fhandler_mailslot::get_object_attr): Ditto. * fhandler_tty.cc: Ditto, throughout. * mount.cc (mount_info::init): Ditto. * pipe.cc (fhandler_pipe::create): Ditto. * shared.cc: Ditto, throughout. (installation_root): Remove. (installation_key): Move to cygheap. (installation_key_buf): Ditto. (installation_root_inited): Remove. (SPIN_WAIT): Remove. (init_installation_root): Move to cygheap. (memory_init): Call cygheap->init_installation_root right after cygheap->user.init. Drop call of init_installation_root function. * shared_info.h (init_installation_root): Drop declaration. (installation_root): Ditto. (installation_key): Ditto. * uinfo.cc (pwdgrp::load): Accommodate the move of installation strings to the cygheap.
2012-02-07 * mount.cc (mount_info::create_root_entry): Fix format specifier inCorinna Vinschen1-2/+2
api_fatal message.
2011-12-22 * external.cc (cygwin_internal): Implement CW_ALLOC_DRIVE_MAP,Corinna Vinschen1-0/+151
CW_MAP_DRIVE_MAP, CW_FREE_DRIVE_MAP. * fhandler_process.cc: Include mount.h. (get_volume_path_names_for_volume_name): Move to mount.cc. (struct dos_drive_mappings): Ditto. * mount.cc (get_volume_path_names_for_volume_name): Move here. (dos_drive_mappings::dos_drive_mappings): Ditto. (dos_drive_mappings::fixup_if_match): Ditto. (dos_drive_mappings::~dos_drive_mappings): Ditto. * mount.h (class dos_drive_mappings): Declare her. * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_ALLOC_DRIVE_MAP, CW_MAP_DRIVE_MAP, CW_FREE_DRIVE_MAP. * include/cygwin/version.h: Bump API minor number.
2011-12-12 * mount.cc (fs_info::update): Set has_buggy_reopen for Netapps as well.Corinna Vinschen1-3/+3
2011-12-03Throughout, remove extra space after function name from debugging output.Christopher Faylor1-3/+3
Throughout, change syscalls to report on return values using new %R format option. * smallprint.cc (__small_vsprintf): Add parsing for %R to report on return values and possible errno from syscalls. * errno.cc (errmap): Add PRIVILEGE_NOT_HELD. * fhandler_tty.cc (fhandler_pty_master::setup): When creating a thread use shorter name to reduce debuggging output. * select.cc (start_thread_pipe): Ditto. (start_thread_serial): Ditto. (start_thread_socket): Ditto. (start_thread_mailslot): Ditto. * sigproc.cc (talktome): Ditto.
2011-10-21 * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Check invalidCorinna Vinschen1-2/+2
success only on Samba shares. * mount.cc (fs_info::update): Drop has_buggy_basic_info flag for NcFsd. * syscalls.cc (unlink_nt): Fix typo in comment.
2011-10-21 * globals.cc (ro_u_ncfsd): New R/O unicode string.Corinna Vinschen1-8/+12
* mount.cc (fs_info::update): Check for "NcFsd" FS. Set flags and change comments accordingly. (fs_names): Add entry for NcFsd FS. * mount.h (enum fs_info_type): Add ncfsd. (class fs_info): Add ncfsd flag and accessor methods. * path.h (class path_conv): Add fs_is_ncfsd method. * syscalls.cc (unlink_nt): Experimentally try delete-on-close on NcFsd in STATUS_CANNOT_DELETE case.
2011-06-12Rename FH_BAD to FH_NADA throughout.Christopher Faylor1-1/+1
* devices.h (FH_ERROR): New value. (iscons_dev): Extend to detect all the console device types. * devices.in: Set aside storage for FH_ERROR. * dtable.cc (dtable::init_std_file_from_handle): Use iscons_dev to detect when device is a console. (fh_alloc): Pass device to console constructor. (build_fh_pc): Short circuit when we detect that the constructor saw an error. * fhandler.h (fhandler_console::fhandler_console): Accept fh_devices parameter. (get_tty_stuff): Change to void. * fhandler_console (fhandler_console::set_unit): Set device to FH_ERROR on attempt to access anything other than the current console. (fhandler_console::get_tty_stuff): Change to void return. (fhandler_console::open): Return EPERM on FH_ERROR device type. (fhandler_console::fhandler_console): Set the device type appropriately before calling get_tty_stuff and rely on that function to reset it if necessary.