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
AgeCommit message (Collapse)Author
2016-06-25Fix various OS-related commentsCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-06-23Drop has_broken_udf flagCorinna Vinschen
2016-06-23Remove support for SUNWNFS file systemCorinna Vinschen
2016-06-23Handle up to 63 partitions per driveCorinna Vinschen
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 Vinschen
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 Vinschen
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 Foley
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 Vinschen
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 Vinschen
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 Vinschen
* 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 Schindelin
* 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 Vinschen
* 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 Vinschen
* 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 Vinschen
* 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 Vinschen
* 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 Vinschen
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 Vinschen
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 Vinschen
accessing out-of-scope value (CID 60027). Always initialize attr to upath (CID 60113).
2014-02-09 * miscfuncs.h (class NT_readline): New class to implement line-wiseCorinna Vinschen
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-07 * fhandler_disk_file.cc (fhandler_disk_file::fchown): Fix typo inCorinna Vinschen
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 Vinschen
2013-11-24 Throughout, drop unnecessary explicit includes of windows header filesCorinna Vinschen
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 Vinschen
* 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 Vinschen
2013-03-06 * mount.cc (fs_names): Add trailing NULL element to avoid potentialCorinna Vinschen
SEGV in format_proc_filesystems.
2013-01-21Throughout, update copyrights to reflect dates which correspond to main-branchChristopher Faylor
checkins. Regularize copyright format.
2012-12-14 * fhandler.cc (fhandler_base::write): Don't attempt to sparsifyCorinna Vinschen
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-17whitespace cleanupChristopher Faylor
2012-08-14 * mount.cc (fs_names): Add missing ReFS entry. Change comment.Corinna Vinschen
* mount.h (enum fs_info_type): Add comment.
2012-07-19 * mount.cc (getmntent_r): Remove unused but set variable.Yaakov Selkowitz
2012-07-18 * cygwin.din (getmntent_r): Export.Corinna Vinschen
* 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 Faylor
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 Vinschen
* 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 Vinschen
FS type.
2012-02-17 * mount.cc (get_disk_type): Drop unneeded toupper call. Convert caseCorinna Vinschen
constants to wide chars.
2012-02-16 * autoload.cc (NetUseGetInfo): Define.Corinna Vinschen
* 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 Vinschen
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 Vinschen
api_fatal message.
2011-12-22 * external.cc (cygwin_internal): Implement CW_ALLOC_DRIVE_MAP,Corinna Vinschen
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 Vinschen
2011-12-04Throughout, remove extra space after function name from debugging output.Christopher Faylor
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 Vinschen
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 Vinschen
* 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-13Rename FH_BAD to FH_NADA throughout.Christopher Faylor
* 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.
2011-06-06whitespace eliminationChristopher Faylor
2011-05-28* autoload.cc: Call _api_fatal in asm.Christopher Faylor
* child_info.h: Redefine CURR_CHILD_INFO_MAGIC. (child_info_fork::abort): Rename from handle_failure. Change arguments. * cygtls.h (_local_storage::ttybuf): New field. * dcrt0.cc (vapi_fatal): Split api_fatal. Add "in forked process" to message when appropriate. (api_fatal): Use vapi_fatal. * devices.h: Make multiple inclusion safe. (fh_devices): Add FH_CONS* stuff. Reorder slightly. (device): Eliminate anonymous union. Add more ways to access minor/major. (device::setunit): Accommodate no-longer-anonymous union. (device::is_fs): Ditto. (device::is_fs_special): Ditto. (device::major): New function. (device::minor): Ditto. (device::is_device): New function. (device::not_device): Ditto. (device::operator int): New operator. (device::operator fh_devices): Ditto. (device::operator bool): Ditto. (device::operator DWORD): Ditto. (device::operator =): Ditto. (isproc_dev): New function. (isprocsys_dev): Ditto. (iscons_dev): Ditto. (istty_slave_dev): Ditto. * devices.in: Add new "/dev/cons*" strings. Accommodate no-longer-anonymous union throughout. (BRACK): Use more precise method for initialization. * devices.cc: Regenerate. * dtable.cc (dtable::stdio_init): Use get_cttyp instead of get_tty. (dtable::find_archetype): Use new DWORD operator in device to test archetypes. (dtable::init_std_file_from_handle): Use different method to initialize 'dev'. Adapt to different ctty handling and accommodate /dev/cons*. (fh_alloc): Accommodate no-longer-anonymous union. Adapt to new /dev/cons*. (build_fh_pc): Make debugging output more useful. * exceptions.cc (ctrl_c_handler): Use get_cttyp instead of get_tty. * external.cc (fillout_pinfo): Accommodate new cons* stuff. * fhandler.cc (fhandler_base::read): Eliminate is_slow() test. * fhandler.h (fhandler_base::*): Adapt to changes in device.h. (fhandler_*::is_slow): Delete. ( fhandler_proc::get_proc_fhandler): Return fh_devices type. * fhandler_console.cc (open_shared_console): New function. (console_unit): New class. (console_unit::console_unit): New constructor. (enum_windows): New function. Declare as friend to console_unit. (fhandler_console::set_unit): New function. (fhandler_console::get_tty_stuff): Call set_unit to set the unit number and determine if initialization is needed. Eliminate flags parameter. (tty_list::get_cttyp): Rename (sorta) from get_tty. Return pointer to correct tty_min. (fhandler_console::open): Adapt to elimination of argument to get_tty_stuff. (fhandler_console::output_tcsetattr): Properly detect error condition. (fhandler_console::fixup_after_fork_exec): Adapt to get_tty_stuff() setting tc automatically. * fhandler_proc.cc: Use FH_BAD rather than 0 throughout where using fh_devices enum. (fhandler_proc::get_proc_fhandler): Return fh_devices. Adapt to devices.h changes. * fhandler_process.cc: Adapt to devices.h changes. Use FH_BAD rather than 0 throughout where using fh_devices enum. * fhandler_procnet.cc: Ditto. * fhandler_procsys.cc: Ditto. * fhandler_procsysvipc.cc: Ditto. * fhandler_tape.cc (fhandler_dev_tape::fhandler_dev_tape): Ditto. * fhandler_termios.cc (handler_termios::bg_check): Use tc->ttyname() rather than assuming that we can construct a tty. * fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Just return get_minor() of dev. (fhandler_pty_master::process_slave_output): Add slightly more debugging info. (fhandler_tty_slave::fhandler_tty_slave): Change name from ntty to unit. (fhandler_pty_master::open): Ditto. (fhandler_tty_slave::ioctl): Adapt to change which causes ctty to represent a complete device. (fhandler_tty_master::init_console): Add debugging for failure path. (fhandler_pty_master::setup): Use get_unit() to retrieve unit number rather than relying on raw ntty. (fhandler_pty_master::setup): Ditto. * fhandler_virtual.h (virt_tab_t): Redefine fhandler as fh_devices. * fork.cc: Remove obsolete vfork stuff. (frok::child): Don't assume that a ctty == 0 is valid. * mount.cc (mount_info::conv_to_win32_path): Adapt to device struct changes. (mount_info::conv_to_win32_path): Ditto. * path.cc (path_conv::check): Retrive major/minor numbers via a method rather than accessing them directly from device. Rely on dev operators to set/retrieve device information as required by device struct change. * path.h (isproc_dev): Move to devices.h. (isprocsys_dev): Ditto. (isvirtual_dev): Ditto. (path_conv:{isdevice,isfifo,isspecial,iscygdrive,issocket,get_devn,get_unitn}): Use device methods to access/manipulate devices. * pinfo.cc (pinfo::exit): Don't assume that ctty == 0 is valid. Use iscons_dev to determine if a device is a console. (_pinfo::_ctty): Use device::parse to generate tty/cons name. (_pinfo::set_ctty): Don't assume that ctty == 0 is valid. Remove redundant info from debugging. * shared.cc (offsets): Remove console offset. * shared_info.h (shared_locations): Ditto. * syscalls.cc (umask): Use device methods to manipulate device information. (ctermid): Use device::parse to generate term device name. * tlsoffsets.h: Regenerate. * tty.cc (ttyslot): Return minor number of ctty since ctty now represents a full device. (tty::create_master): Set ctty to a complete device. (tty_list::attach): Rework to detect new /dev/cons* stuff. (tty_list::terminate): Adapt to changes to ctty. (tty_list::init): Adapt to change to setntty - pass in device major number. (tty::exists): Use get_unit() to retrive tty unit number. (tty::open_mutex): Ditto. (tty::open_inuse): Ditto. (tty::create_inuse): Ditto. (tty::get_event): Ditto. (tty_min::ttyname): Define new function. * tty.h (tty_min::ntty): Redefine as fh_devices. (tty::exists): Use get_unit() to retrive tty unit number. (tty::open_mutex): Ditto. (tty::open_inuse): Ditto. (tty::create_inuse): Ditto. (tty::get_event): Ditto. (tty_min::ttyname): Declare new function. (tty::getntty): Declare as const. (tty_list::operator []): Assure that only minor part of argument is used. * dll_init.cc (dll_list::alloc): Detect mismatch of data segments early issuing an explicit error message if necessary. * heap.cc (heap_init): Adapt to changes from fork->handle_failure to fork->abort. * pinfo.h (EXITCODE_FORK_FAILED): New enum. (from Ryan Johnson) * sigproc.cc (child_info_fork::abort): Rename from handle_failure. Change arguments to allow passing in a printf-like message. * winsup.h (api_fatal): Delete macro definition. (api_fatal): Redefine from __api_fatal. (vapi_fatal): Declare new function. * include/sys/strace.h (strace_vprintf): Define new macro. * ntdll.h (_SYSTEM_INFORMATION_CLASS): Add SystemHandleInformation.
2011-05-24 * mount.cc (mount_info::conv_to_win32_path): Remove unused code.Corinna Vinschen
* mount.h (class mount_info): Remove sys_mount_table_counter member. * shared_info.h (class shared_info): Ditto. (CURR_SHARED_MAGIC): Update.
2011-05-02Eliminate trailing whitespace in some files.Christopher Faylor
* dll_init.cc (dll_list::alloc): Reset 'p' in forked process. * select.cc (select_stuff::wait): Move cleanup() closer to WFMO to minimize unavoidable (?) race.
2011-04-04 Drop NT4 support.Corinna Vinschen
* autoload.cc (DnsQuery_A): Fatal if not available. (DnsRecordListFree): Ditto. (DsGetDcNameW): Ditto. (NetGetAnyDCName): Remove. (NetGetDCName): Remove. (EnumProcessModules): Fatal if not available. (GetModuleFileNameExW): Ditto. (GetModuleInformation): Ditto. (GetProcessMemoryInfo): Ditto. (QueryWorkingSet): Ditto. (LsaRegisterLogonProcess): Ditto. * fenv.cc (_feinitialise): Drop supports_sse condition. * fhandler_disk_file.cc (path_conv::isgood_inode): Fix comment. (fhandler_base::fstat_by_name): Drop has_fileid_dirinfo condition. (fhandler_disk_file::opendir): Ditto. * fhandler_netdrive.cc (fhandler_netdrive::readdir): Fix comment. * fhandler_proc.cc (format_proc_partitions): Drop NT4-only code. * fhandler_process.cc (get_process_state): Ditto. * kernel32.cc (GetWindowsDirectoryW): Remove. (GetWindowsDirectoryA): Remove. * miscfuncs.cc (nice_to_winprio): Drop NT4-only code. * mount.cc (fs_info::update): Fix comments. * net.cc (get_2k_ifs): Drop NT4-only code. * sec_auth.cc (get_logon_server): Ditto. (lsaauth): Drop NT4-specific error handling. * security.cc (alloc_sd): Set SE_DACL_PROTECTED unconditionally. * select.cc (select_stuff::wait): Always use MWMO_INPUTAVAILABLE. (peek_windows): Drop NT4-only condition in call to PeekMessage. * syscalls.cc (gethostid): Remove NT4-only workaround. * wincap.cc: Througout, drop has_dacl_protect, has_broken_if_oper_status, has_process_io_counters, has_terminal_services, has_extended_priority_class, has_guid_volumes, has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse from wincaps. (wincap_nt4sp4): Remove. (wincap_minimal): Set to wincap_2000. (wincapc::init): Rely on availability of OSVERSIONINFOEX structure. Treat error from GetVersionEx as fatal. Treat NT4 as fatal. * wincap.h (struct wincaps): Drop has_dacl_protect, has_broken_if_oper_status, has_process_io_counters, has_terminal_services, has_extended_priority_class, has_guid_volumes, has_fileid_dirinfo, has_mwmo_inputavailable and supports_sse flags and methods. * winlean.h (GetWindowsDirectoryW) Define as GetSystemWindowsDirectoryW. (GetWindowsDirectoryA): Define as GetSystemWindowsDirectoryA.
2010-11-22 * mount.cc (NETAPP_IGNORE): Add FILE_PERSISTENT_ACLS.Corinna Vinschen
(FS_IS_NETAPP_DATAONTAP): Drop test for FILE_PERSISTENT_ACLS. (fs_info::update): Set filetype to ntfs in remote case, too. Fix a couple of comments. Add test for Netapps faking to be FAT. * mount.h (IMPLEMENT_FS_FLAG): Simplify definition and usage.