Commit Graph

54 Commits

Author SHA1 Message Date
Christopher Faylor 1b23b30b29 Clean up whitespace. 2011-12-17 23:39:47 +00:00
Corinna Vinschen 92b499acff * Align usage output, version output, as well as usage and version
option handling to use the same style throughout all Cygwin utils.
	Throughout use program_invocation_short_name to refer to current
	process name in Cygwin executables.
	* utils.sgml: Align documentation to above change.  Add missing
	sections for getconf, ldd, and setmetamode.
	* strace.cc (proc_child): Avoid compiler warning.
2011-10-10 14:57:48 +00:00
Corinna Vinschen 5578c33733 * mount.cc (from_fstab): Fix potentially fatal typo. 2010-08-13 19:10:22 +00:00
Corinna Vinschen 68a178b37c * mount.cc (do_mount): Don't treat "bind" mount as remote mount.
(mount_entries): Drop the "bind" option from output.
	* utils.sgml (mount): Match examples to actual mount output.  Add
	"bind" option and add example.
2010-08-11 11:01:14 +00:00
Corinna Vinschen a82a8dcb4e * mount.cc (oopts): Remove entirely.
(usage): Call cygwin_internal (CW_LST_MNT_OPTS) to create list of
	mount options.
	(print_version): Fix copyright date.
	(main): Replace option processing loop with single call to
	cygwin_internal (CW_CVT_MNT_OPTS).
2010-04-29 08:50:23 +00:00
Corinna Vinschen f380ca5803 * mount.cc (do_mount_from_fstab): Allow to change cygdrive prefix, too. 2010-01-11 12:13:55 +00:00
Corinna Vinschen 29222c4d6a * mount.cc (do_mount): Don't exit, just return. 2009-08-09 14:13:53 +00:00
Corinna Vinschen 3955529c8b * mount.cc (do_mount): Replace --no-executable flag with notexec
mount option in hint for remote filesystems.
	* path.cc (getmntent): Fix typo (noexec -> notexec).
2009-07-22 16:24:17 +00:00
Corinna Vinschen 1e497ebd33 * Makefile.in (path-mount.o): Add a rule to build stripped down version
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.
2009-07-22 10:20:26 +00:00
Christopher Faylor e951743709 cygwin ChangeLog
2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
	    Christopher Faylor  <me+cygwin@cgf.cx>

	* mount.cc (mount_info::got_usr_bin): Define.
	(mount_info::got_usr_lib): Ditto.
	(mount_info::root_idx): Ditto.
	(mount_info::create_root_entry): Create root entry as immutable and
	flag as automatic.
	(mount_info::init): Remove "Huh?  No /etc/fstab..." warning.
	Unconditionally call from_fstab for user and system tables.  Fill in
	/usr/bin and /usr/lib if they have not been specified in /etc/fstab.
	(oopts): Alphabetize.  Add "override" option to allow overriding
	immutable mount points.
	(mount_info::add_item): Accommodate new MOUNT_IMMUTABLE flag intended
	for root mount.
	(mount_info::add_item): Detect "/usr/bin", "/usr/lib", and "/" and set
	appropriate global state.
	(fillout_mntent): Add ,auto to mount points added by Cygwin DLL.
	(mount): Remove masking of MOUNT_SYSTEM.  Allow user to shoot
	themselves.  Add comment.
	* mount.h (mount_info::got_usr_bin): Declare.
	(mount_info::got_usr_lib): Ditto.
	(mount_info::root_idx): Ditto.
	* include/sys/mount.h: Reformat enum.
	Add MOUNT_{OVERRIDE,IMMUTABLE,AUTOMATIC}.

doc ChangeLog
2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
	    Christopher Faylor  <me+cygwin@cgf.cx>

	* pathnames.sgml (mount-table): Sort mount options and add override
	option.  Add description of root mount handling.

utils ChangeLog
2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
	    Christopher Faylor  <me+cygwin@cgf.cx>

	* mount.cc (oopts): Sort.  Add override option.  Add dummy "auto"
	option for consistency.
	(mount_entries): Avoid adding auto-mounted entries to -m output.

	* utils.sgml: Sort mount options.  Add description of override option.
2009-05-14 03:25:45 +00:00
Corinna Vinschen 8262e64256 * mount.cc (mount_entries): Handle a "/" cygdrive prefix correctly.
Add comments.
2009-03-02 10:47:04 +00:00
Corinna Vinschen 56d8179570 * mount.cc (NT_MAX_PATH): Define.
(longopts): Rename mount-commands option to mount-entries.
	(opts): Remove removed options.
	(struct opt): Move up in file to allow using it in usage.
	(usage): Change text for --mount-entries option.  Remove
	-X option.  Add valid options output.
	(main): Remove handling -b option.
	(convert_spaces): New static function to convert spaces to "\040"
	string.
	(mount_entries): Renamed from mount_commands.  Rewrite to emit
	/etc/fstab compatible output.
	(show_cygdrive_info): Print "nouser" rather than "system".
	* umount.cc (longopts): Remove remove-all-mounts,
	remove-cygdrive-prefix, remove-system-mounts, system and user options.
	(opts): Remove A, c, s, S, u options.
	(usage): Remove text for all removed options.
	(main): Remove handling for all removed options.
	(remove_all_mounts): Remove.
	(remove_all_system_mounts): Remove.
	(remove_cygdrive_prefix): Remove.
	* utils.sgml: Fix mount and umount documentation.  Move description
	of (cyg,not)exec options to mount table section.
2008-08-13 16:35:04 +00:00
Christopher Faylor 5f853b3fc5 * mount.cc: Remove non-unix-like options (-x,-t,b) throughout.
(oopts): Use boolean constants for slightly increased clarity.
* configure.in: Remove apparently unneeded program_transfer_name code.
* configure: Regenerate.
2008-07-25 15:03:25 +00:00
Corinna Vinschen 874149c80c * mount.cc (do_mount): Remove MOUNT_ENC code.
(oopts): Remove "managed" option.
	(mount_commands): Drop "managed" handling.
	* path.cc (oopts): Remove "managed" option.
	(getmntent): Remove MOUNT_ENC code.
2008-07-17 15:07:48 +00:00
Corinna Vinschen f7483b41e0 * mount.cc (usage): Mark -s and -u as ignored.
(print_version): Simplify printing copyright dates.
	(main): Remove default_flag.  Dont set flags on -s and -u options.
	(mount_commands): Drop handling -s and -u options.
2008-04-23 11:37:58 +00:00
Christopher Faylor e7fd6e5738 * cygwin/external.cc (cygwin_internal): Implement CW_SET_DOS_FILE_WARNING.
* cygwin/include/sys/cygwin.h: Define CW_SET_DOS_FILE_WARNING.
* utils/mount.cc (main): Turn dos file warnings off since we know what we're
doing.
2007-03-30 13:36:06 +00:00
Christopher Faylor c2b8862303 * mount.cc (do_mount): Avoid unnecessary cygwin_conv_to_win32_path and pass
POSIX path directly - this avoids a cygwin DLL warning.
2006-12-10 21:50:06 +00:00
Corinna Vinschen bb002a4968 * mount.cc (longopts): Fix typo which disallows --options option. 2005-08-03 09:23:39 +00:00
Christopher Faylor 180cd17fa1 * mount.cc (mount_commands): Display "-X" option when appropriate. 2005-05-13 20:24:20 +00:00
Christopher Faylor 0d235234c5 * mount.cc (usage): Clarify action of -m option. 2005-05-01 15:50:02 +00:00
Christopher Faylor 4bfc614b42 fix whitespace, update some copyrights 2004-10-25 15:49:36 +00:00
Christopher Faylor e48feef96a * mount.cc (mount_commands): Ensure user mode is actually user mode and not the
default system mode.
2003-09-04 01:04:57 +00:00
Christopher Faylor 035df9eff5 * mount.cc (do_mount): Issue warning when using managed mount option on
non-empty directory.
2003-07-26 05:38:51 +00:00
Christopher Faylor baf77a53b0 * mount.cc (struct opt): Remove posix option. 2003-07-04 03:20:22 +00:00
Christopher Faylor 08604f02bc * mount.cc (longopts): Add long "options" keyword.
(opts): Add -o option.
(usage): Display -o option.
(struct opt): New.
(concat3): New function.
(main): Handle -o flag.
2003-07-04 03:11:18 +00:00
Joshua Daniel Franklin aa275fe010 * cygcheck.cc (usage) Add description output. 2003-04-26 21:52:03 +00:00
Christopher Faylor 7c51881531 * mount.cc (usage): Correctly report default mode. 2002-10-19 11:41:31 +00:00
Joshua Daniel Franklin 98467dae59 Add final newlines to utils 2002-09-15 19:24:37 +00:00
Christopher Faylor 1050e57c9a * mount.cc (main): Ensure that mount_already_exists() also gets default flag
that is passed to do_mount.
* cygpath.cc (long_options): Add "dos" and "mixed", correct "close", "file" and
"type" to use NULL flag.
(usage): Clean up usage output (more), accomodate new options.
(main): Add --dos and --mixed options; accomodate all output forms in --type.
Make UNIXy output default.
2002-07-01 20:54:35 +00:00
Christopher Faylor 94cc482c64 * mount.cc (main): Use default system/user flag for cygdrive stuff, too.
(change_cygdrive_prefix): Change MOUNT_AUTO to MOUNT_CYGDRIVE.
* umount.cc (remove_cygdrive_prefix): Ditto.
(main): Use default system/user flag for cygdrive stuff, too.
2002-06-09 04:54:32 +00:00
Christopher Faylor 60a3d46123 * mount.cc (opts): Remove '-i' option.
(usage): Ditto.
(main): Ditto.
(longopts): Remove --import-old-mounts option.
2002-06-09 00:33:27 +00:00
Christopher Faylor b050246c00 * mount.cc (main): Make -b the default. 2002-05-30 03:42:19 +00:00
Christopher Faylor 8704ad9da9 * mount.cc (version) New global variable.
(usage) Standardize usage output.  Accomodate new version option.
(print_version) New function.
(longopts) Accomodate new version option.
(opts) Ditto.
(main) Ditto.
2002-05-23 04:19:07 +00:00
Christopher Faylor c49fa76263 * Makefile.in (kill.exe): Add as a specific target.
* kill.cc (longopts): New.
(opts): Ditto.
(get_sig): Accept const char * parameter.  Return -1 on unknown signal.
(test_for_unknown_sig): New function.
(listsig): New function.
(main): Use getopt_long for option parsing.  Implement -l, and -s options.  Use
test_for_unknown_sig() to test for signal validity.
2002-05-13 05:13:58 +00:00
Christopher Faylor 48897dfeb9 * mount.cc (do_mount): Default to non-exec option for remote drives. Report
warnings before attempting a mount.
(longopts): Add no-executable option.
(mount_commands): Ditto.
(opts): Ditto.
(usage): Ditto.  Indicate that system mount is now the default.
(main): Accommodate no-executable option.  Make system mount the default.
* umount.cc (usage): Indicate that system umount is now the default.
(main): Make system umount the default.
2002-05-12 04:29:54 +00:00
Christopher Faylor cf75300efa * mount.cc (usage): Fix typo in output. 2002-02-15 23:03:14 +00:00
Christopher Faylor a9f20457f3 * Makefile.in: Only build testsuite directory on first 'make check'.
* configure.in: Remove testsuite from SUBDIRS.
* configure: Regenerate.
2001-10-24 21:56:54 +00:00
Christopher Faylor f90e39b55e * mount.cc (mount_commands): Don't write /cygdrive/u mount points. 2001-09-04 01:09:39 +00:00
Christopher Faylor bee722a5e7 * mount.cc (longopts): Add mount-commands to options list.
(usage): Add mount-commands option.
(mount_commands): New function.  Write commands to recreate current mounts.
2001-09-03 22:02:54 +00:00
Christopher Faylor db8b09c306 * mount.cc (main): Eliminate excess arguments in printf. 2001-09-01 19:58:40 +00:00
Christopher Faylor 34971f0f8c * mount.cc (main): Issue correct warning for 'not enough arguments'. 2001-08-28 18:48:38 +00:00
Christopher Faylor 9f42525632 * mount.cc (longopts): Add help to options list.
(opts): Add 'h' to options string.
* umount.cc (longopts): Add help to options list.
(opts): Add 'h' to options string and change 'R' to 'A'.
2001-04-16 02:51:03 +00:00
Christopher Faylor be61cf4d0c * mount.cc (main): Use getopt_long for parsing arguments.
(usage): Reformat, show long and short options.
* umount.cc (main): Ditto, all of the above.
2001-04-03 02:41:54 +00:00
Christopher Faylor c6cd25a033 * mount.cc (show_mounts): Change format string to more closely resemble UNIX
when displaying mount table.
2001-04-02 14:58:47 +00:00
Christopher Faylor 4c35f9f01f * mount.cc (main): Call show_cygdrive_info instead of show_cygdrive_prefixes.
* mount.cc (show_cygdrive_prefixes): Remove function.
* mount.cc (show_cygdrive_info): New function.  Actually, show_cygdrive_info is
really an enhanced version of show_cygdrive_prefixes renamed to
show_cygdrive_info that also displays the user and system flags.
2000-11-08 20:39:45 +00:00
Christopher Faylor eedc36cb12 Cleanup formatting on some files. Remove excessive whitespace. 2000-10-28 05:00:00 +00:00
Christopher Faylor 959e1bac13 * utils/mount.cc (main): Add --show-cygdrive-prefixes option.
(show_cygdrive_prefixes): New function.
* utils/umount.cc (main): Add --remove-cygdrive-prefix option.
(error): Change signature from 'char *' to 'const char *'.
(remove_cygdrive_prefix): New function.
2000-07-28 22:34:24 +00:00
Corinna Vinschen 44d2afed74 * mount.cc (mount_already_exists): Slightly rearrange.
Change message texts.
2000-07-13 21:49:36 +00:00
Corinna Vinschen d9028f52ae * mount.cc (mount_already_exists): Additional warning message
if mount point exists with another mount type.
2000-07-13 11:09:53 +00:00
Corinna Vinschen 9500a3db90 mount.cc (error): New function to report an error and exit.
umount.cc (error): Ditto.
        (remove_all_automounts): Check return status of cygwin_umount.
        (remove_all_user_mounts): Ditto.
        (remove_all_system_mounts): Ditto.
2000-06-08 12:54:12 +00:00