summaryrefslogtreecommitdiffstats
path: root/winsup/utils/cygcheck.cc
Commit message (Collapse)AuthorAgeFilesLines
* * cygcheck.cc (dump_sysinfo): Fix typo in products.Corinna Vinschen2009-11-271-1/+1
|
* * cygcheck.cc (cygwin_dll_path): New global variable.Corinna Vinschen2009-11-041-0/+2
| | | | | | | | (load_cygwin): Fetch cygwin DLL path and store in cygwin_dll_path. * strace.cc: Full ditto. * path.cc (read_mounts): First use the path stored in cygwin_dll_path, if available. Then fall back to fetching own path. Add comment. Drop printing warnings since they look funny in strace output.
* * cygcheck.cc: Include cygprops.h.Corinna Vinschen2009-10-311-5/+227
| | | | | | | | | | | | | | | | | | | (del_orphaned_reg): New option variable. (unique_object_name_opt): Ditto. (handle_reg_installation): New function. (print_reg_installations): Ditto. (del_orphaned_reg_installations): Ditto. (memmem): Ditto. (handle_unique_object_name): Ditto. (dump_sysinfo): Call print_reg_installations from here. (usage): Add usage for new options --delete-orphaned-installation-keys, --enable-unique-object-names, --disable-unique-object-names, and --show-unique-object-names. (longopts): Add new options --delete-orphaned-installation-keys, --enable-unique-object-names, --disable-unique-object-names, and --show-unique-object-names. (main): Handle new options. * utils.sgml (cygcheck): Change documentaion accordingly.
* * cygcheck.cc (pretty_id): Drop arguments. Don't change CYGWINCorinna Vinschen2009-10-281-17/+3
| | | | | | environment variable. (dump_sysinfo): Don't tweak CYGWIN environment variable, just call pretty_id once.
* * cygcheck.cc (dump_sysinfo): Update with latest NT 6.1 versions.Corinna Vinschen2009-10-201-45/+74
|
* * cygcheck.cc (dump_sysinfo): Add missing "Server Foundation" toCorinna Vinschen2009-07-231-1/+1
| | | | products array.
* * cygcheck.cc (dump_sysinfo): Remove "not yet supported" text.Corinna Vinschen2009-07-131-5/+2
|
* * cygcheck.cc (find_app_on_path): Avoid using NULL pointer if find_on_pathChristopher Faylor2009-05-041-0/+3
| | | | doesn't find the app on the path.
* * cygcheck.cc (usage): Fix option order and print.Corinna Vinschen2009-05-041-5/+6
|
* * utils.sgml: Various syntactical and semantical fixes.Corinna Vinschen2009-04-031-1/+1
| | | | * cygcheck.cc (usage): Fix --find-package explanation.
* * cygcheck.cc (dump_sysinfo): Fix compiler warning in printf.Corinna Vinschen2009-03-241-1/+1
| | | | | * strace.cc (proc_child): Ditto. * ldd.cc: Remove now useless undef wcscasecmp.
* * wide_path.h (class wide_path): New class to convert Windows pathCorinna Vinschen2009-03-141-16/+24
| | | | | | | | | | | | | | | | | | | | to WCHAR win32 path, including long path conversion if necessary. * cygcheck.cc: Use class wide_path throughout to call Win32 functions taking potentially long filenames. (display_error): Use snprintf rather than sprintf. (display_error_fmt): Ditto. (dump_sysinfo): Use FindFirstFileW/FindNextFileW. * cygpath.cc: Use class wide_path throughout to call Win32 functions taking potentially long filenames. (get_device_name): Raise buffer size to take long pathnames. (get_short_paths): Convert to using GetShortPathNameW. (get_short_name): Ditto. (get_long_path_name_w32impl): Convert to equivalent of GetLongPathNameW. (get_long_name): Convert to using GetLongPathNameW. (do_sysfolders): Raise buffer size for POSIX pathname to PATH_MAX. (do_pathconv): In case of POSIX->Win32 conversion, convert to wchar_t Win32 path name and drop long pathname prefix if possible. (main): Call setlocale to accommodate wide char/multibyte conversions.
* * cygcheck.cc (usage): Fix typo.Christopher Faylor2009-03-081-1/+1
|
* * cygcheck.cc (dump_sysinfo): Evaluate and print state ofCorinna Vinschen2009-01-291-0/+13
| | | | obcaseinsensitive kernel flag.
* * Makefile.in: Fix copyright date.Corinna Vinschen2009-01-171-18/+18
| | | | | | | | * cygcheck.cc (scan_registry): Take additional parameter and add code to avoid recursion in Wow6432Node subkey. Rename variable cygnus to cygwin. Scan for "Cygwin" instead of for "cygnus" substring. (dump_sysinfo): Drop unused calls to scan_registry. Drop scanning HKEY_CURRENT_CONFIG.
* * cygcheck.cc (dump_sysinfo): Raise size of osname. Add Windows 7Corinna Vinschen2009-01-161-32/+54
| | | | | and Windows 2008 R2 as recognized OSes. Update products array to the latest documented list.
* * cygcheck.cc (dump_sysinfo_services): Quote the path for popen.Pierre Humblet2009-01-061-1/+1
|
* * cygcheck.cc (pretty_id): Quote the path for popen.Pierre Humblet2008-12-311-5/+6
| | | | (dump_sysinfo_services): Ditto.
* * cygcheck.cc (pathlike::check_existence): Remove class name from declaration.Christopher Faylor2008-09-121-12/+11
| | | | | | | | | | | | | | | | | | | | | (display_internet_error): Use proper format specifier for DWORD. (environ): Remove unneeded declaration. (main): Use brace around nested if to avoid an overly-helpful compiler warning. * dump_setup.cc (parse_filename): Reorganize nested if to avoid an overly-helpful compiler warning. * path.cc (GUID_shortcut): Use braces around part of initializer which needs them. (conv_fstab_spaces): Parenthesize assignment in while loop to avoid a compiler warning. (struct opt): Make static. * ps.cc (main): Reorganize nested if to avoid an overly-helpful compiler warning. * regtool.cc: Make some anonymous structs static to avoid a compiler warning. * ssp.c (lookup_thread_id): Initialize *tix to zero to avoid potential uninitialized use. * strace.cc (add_child): Use proper format specifier for DWORD. (remove_child): Ditto. (proc_child): Ditto.
* * cygcheck.cc (nuke): Use malloc rather than alloca for environment variables.Christopher Faylor2008-08-271-2/+2
| | | | | | (load_cygwin): Ditto. * dump_setup.cc (parse_filename): Cosmetic changes. (get_packages): Ditto.
* * cygcheck.cc (print_version): Update copyright dates.Christopher Faylor2008-08-171-1/+1
|
* * cygcheck.cc (load_cygwin): Duplicate argv list since it disappears whenChristopher Faylor2008-08-041-2/+9
| | | | cygwin1.dll is unloaded.
* * cygcheck.cc (load_cygwin): Free the cygwin dll after we're done with it.Christopher Faylor2008-07-271-26/+27
|
* * cygcheck.cc (dump_sysinfo): Fix multiple Cygwin DLL test.Corinna Vinschen2008-04-221-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | * path.cc: Fetch mount points from fstab files instead of from registry. Use adapted functions copied from Cygwin DLL. (mnt_t): Drop issys member. Define as "mnt_t" instead of "struct mnt_t" subsequently. (max_mount_entry): New variable. (unconvert_slashes): Move to earlier location in file. Make inline. (find2): Remove. (get_cygdrive0): Remove. (get_cygdrive): Remove. (skip_ws): New function. (find_ws): Ditto. (conv_fstab_spaces): Ditto. (read_flags): Ditto. (from_fstab_line): Ditto. (get_user): Ditto. (from_fstab): Ditto. (mnt_sort): Ditto. (read_mounts): Drop old registry code. Fetch "Software\Cygwin\Setup\rootdir" value from HKCU or HKLM key. Use rootdir extracted from module path as fallback. Call from_fstab for nouser and user mount points. (setmntent): Check max_mount_entry to test if read_mounts must be called. (getmntent): Use MOUNT_SYSTEM flag instead of mnt_t's issys member.
* * cygcheck.cc (find_app_on_path): Make buffer SYMLINK_MAX + 1Brian Dessent2008-03-111-3/+3
| | | | chars.
* * cygcheck.cc (dirname): New static function.Brian Dessent2008-03-111-10/+31
| | | | | | | | | | | | | | (find_app_on_path): Use SYMLINK_MAX. Resolve symlink relative to link's location. Adjust to the fact that cygpath already normalizes its return value. * path.cc (rel_vconcat): Add cwd parameter, and use it instead of calling GetCurrentDirectory() if possible. Rename throughout. (vcygpath): Rename from cygpath and accept cwd and va_list. Pass cwd on to rel_vconcat(). (cygpath_rel): New front end for vcygpath. (cygpath): Ditto. * path.h (cygpath_rel): Declare. (SYMLINK_MAX): Define to 4095.
* * cygcheck.cc (dump_sysinfo): Always try to get a OSVERSIONINFOEXCorinna Vinschen2008-01-131-59/+119
| | | | | | first. Load kernel32.dll earlier. Make osname a buffer. Simplify Non-NT code. Use GetProductInfo in Vista/2008 case. Clean up non-Vista version info. Exit early if not on NT.
* * Makefile.in (cygcheck.exe): Add bloda.o as prerequisite, adjustingDave Korn2007-08-031-0/+6
| | | | | | | | dependency-filtering $(wordlist ...) call appropriately. Link ntdll. (bloda.o): New rule to build bloda.o * cygcheck.cc (dump_sysinfo): Call bloda function dump_dodgy_apps(). * bloda.cc: New file implements detection of applications from the Big List Of Dodgy Apps.
* * cygcheck.cc (pathlike): New class.Christopher Faylor2007-06-041-165/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (paths): Redefine as type pathlike. (display_error): Declare a few different ways to allow more flexible usage throughout. (display_error_fmt): New function for those cases where C++ just isn't enough. (add_path): Rewrite to allocate pathlike paths. Always tack on a trailing slash since that's what everyone who uses it wants. NULL terminate the path list. Register "it's a system path" field. (init_path): Call add_path with info regarding whether path is a system path or not. (pathlike::check_existence): Move into pathlike class. Accept file and extension arguments to build up path on the fly. Modify other arguments. (find_on_path): Constify return value and appropriate arguments. Eliminate short-circuit for fully-qualified paths. Simplify loop which iterates over path. (already_did): Constify argument. (track_down): Ditto. Regularize some error messages. (find_app_on_path): Ditto. (cygcheck): Constify argument. Use 20th century string handling functions. (dump_sysinfo): Remove odd inclusion of '\\bin' "Just in case". Accommodate change of paths to pathlike. * path.cc (isslash): Rename from SLASH_P and use throughout. (rel_vconcat): Front-end to vconcat which prepends cwd to path before passing along for conversion to native windows. (cygpath): Remove "./" test. Call rel_vconcat if filename appears to be relative.
* * cygcheck.cc (dump_sysinfo): Add "not supported" to osname on 9xCorinna Vinschen2007-02-201-12/+6
| | | | | machines. Drop "not supported" for Vista. Drop "Longhorn" text for now.
* * cygcheck.cc (get_word, get_dword): Move to path.cc.Corinna Vinschen2006-10-051-44/+137
| | | | | | | | | | | | | | | | | | | (LINK_EXTENSION): New macro. (check_existence): New static function. (find_on_path): Check for symbolic links if asked. (dll_info): New error handling. (track_down): Only call dll_info() for executables, display an error for symlinks, and print magic number for others. (find_app_on_path): New static function. (cygcheck, dump_sysinfo): Call find_app_on_path() instead of find_on_path(). * path.cc (cmp_shortcut_header): New static function. (get_word, get_dword): Moved from cygcheck.cc. (EXE_MAGIC, SHORTCUT_MAGIC, SYMLINK_COOKIE, SYMLINK_MAGIC): New macros. (is_exe, is_symlink, readlink): New functions. * path.h (is_exe, is_symlink, readlink): Declare. (get_word, get_dword): Ditto.
* white spaceChristopher Faylor2006-09-131-1/+1
|
* Check in previously mentioned change to cygcheck.ccChristopher Faylor2006-09-131-0/+6
|
* * cygcheck.cc (find_on_path): Update copyright text.Corinna Vinschen2006-02-081-1/+1
|
* * cygcheck.cc (find_on_path): Create copy of rv on successful accessCorinna Vinschen2006-02-081-1/+1
| | | | check, since rv can be reused in subsequent calls.
* * cygcheck.cc (common_paths): Add "patch".Christopher Faylor2006-01-191-0/+1
|
* * cygcheck.cc (init_paths): Record first_nonsys_path.Christopher Faylor2006-01-191-8/+8
| | | | (find_on_path): Start on first nonsys path when !search_sysdirs.
* copyrightChristopher Faylor2006-01-171-1/+2
|
* * Makefile.in (cygcheck.exe): Do not link against libwininet.a.Corinna Vinschen2006-01-151-8/+49
| | | | | | | * cygcheck.cc (pInternetCloseHandle): Define global function pointer. (display_internet_error): Use it. (package_grep): Attempt to load wininet.dll at runtime. Call WinInet API through function pointers throughout.
* * cygcheck.cc (dump_sysinfo): Convert k32 to HMODULE.Corinna Vinschen2006-01-131-1/+1
|
* * cygcheck.cc (dump_sysinfo): Convert osname to const and remove castsCorinna Vinschen2006-01-131-30/+58
| | | | | | in subsequent assignments. Recognize Longhorn/Vista and report as not yet supported. Recognize when running under WOW64 and report native CPU type. Slightly rearrange \n printing.
* * cygcheck.cc: Replace ` with ' throughout.Christopher Faylor2006-01-121-9/+9
|
* * cygcheck.cc (dump_sysinfo): Report the failing drive to prevent having toChristopher Faylor2006-01-051-4/+11
| | | | guess.
* * cygcheck.cc (common_apps): Add crontab, vi, vim.Christopher Faylor2005-12-291-0/+3
|
* * cygcheck.cc (common_apps): Add a few more binaries to look for.Christopher Faylor2005-12-151-0/+4
|
* * Makefile.in: Link cygcheck with libwininet.a.Christopher Faylor2005-11-221-17/+158
| | | | | | | | | | | | | | * cygcheck.cc: Add includes. (grep_packages): New global variable. (display_internet_error): New function. (safe_chars): New global variable. (base_url): Ditto. (package_grep): New function. (usage): Reword --help output for clarity. Document new argument. (longopts): Add 'package-query' option. (opts): Add 'p' option, reorder to be consistent with 'longopts'. (main): Accommodate new option. * utils.sgml (cygcheck): Update --help output. Document new -p option.
* * cygcheck.cc (dump_sysinfo_services): Properly null-terminate 'buf'.Brian Dessent2005-08-171-31/+43
| | | | Avoid extraneous cygrunsrv invocation if 'verbose' is true.
* * cygcheck.cc (find_on_path): Perform .exe magic on non-PATH search.Christopher Faylor2005-07-191-1/+8
|
* * cygcheck.cc (track_down, cygcheck): Return true on success.Christopher Faylor2005-07-051-14/+18
| | | | (main): Reflect cygcheck failures in exit status.
* * cygcheck.cc (dump_sysinfo): Recognize XP Media Center and Tablet PCCorinna Vinschen2005-05-301-17/+25
| | | | | Editions. Change .NET to 2003 throughout. Recognize 2003 Web Server and Datacenter Server. Report when running in terminal server session.