⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 changelog

📁 实战Linux编程的原代码,希望对学驱动的人能有所帮助
💻
📖 第 1 页 / 共 5 页
字号:
	Performance.	* src/remove.c (remove_entry) [!ROOT_CAN_UNLINK_DIRS]:	Don't call rmdir here.2002-05-29  Jim Meyering  <meyering@lucent.com>	* src/remove.c (AD_pop_and_chdir): Don't use errno (it's not valid)	in diagnostic for changed dev/ino.	(remove_entry): Tweak diagnostic.2002-05-27  Jim Meyering  <meyering@lucent.com>	* src/remove.c (ROOT_CAN_UNLINK_DIRS): Define.	(AD_pop_and_chdir): Propagate status as we traverse back `up' the tree.	(DO_UNLINK, DO_RMDIR): Define.	(remove_entry) [ROOT_CAN_UNLINK_DIRS]: Add code so this works also on	systems where root can use `unlink' to remove directories.2002-05-24  Jim Meyering  <meyering@lucent.com>	* tests/mv/mv-special-1: Adapt for changed format of --verbose output.2002-05-22  Jim Meyering  <meyering@lucent.com>	* src/remove.c: Include file-type.h.	Include file type in prompt when asking whether to remove file.	Based on a patch from Paul Eggert.	* src/remove.c (prompt): Add comment.	* src/remove.c (remove_dir): Fix another (known) leak.	* tests/rm/rm3: Don't depend on order of traversal of dir entries.	It is nondeterministic on some types of filesystems.	* src/remove.c (hash_freer): New function.	(AD_mark_helper): Use it.	(AD_mark_as_unremovable): xstrdup the filename argument.	(remove_dir): Free directory name.	* src/remove.c (remove_entry): Fail also when trying to remove a	directory without the --recursive option.	Change a diagnostic, s/unlink/remove/, now that it can apply also	to a directory.	* src/remove.c (is_empty_dir): New function.	(prompt): New function, factored out of...	(remove_entry): ...here.  Call it.	(remove_dir): Call prompt before rmdir.	* src/remove.c (remove_entry): Add support for prompting (e.g., -i).	* src/remove.h (UPDATE_STATUS): New macro.	Include save-cwd.h.	(struct File_spec): Remove declaration.	Update prototypes.	* src/remove.c [AD_ent] (status): New member.  This lets us propagate	the status from a subdirectory to its parent via AD_pop_and_chdir.	(AD_push_initial): Set it.	(AD_push): Likewise.	(remove_cwd_entries): Change return type to enum RM_status, and	adjust all callers.	(rm): Use UPDATE_STATUS rather than open-coding it.	* src/remove.c (remove_entry): New function, factored out of...	(remove_cwd_entries): ...here, and...	(rm_1): ...here.	* src/remove.c (remove_cwd_entries): Add support for --verbose.	(remove_dir): Likewise.	(rm_1): Likewise.2002-05-18  Jim Meyering  <meyering@lucent.com>	* tests/rm/rm3: New file.	* tests/rm/rm4: New file.	* tests/rm/Makefile.am (TESTS): Add rm3 and rm4.2002-05-17  Jim Meyering  <meyering@lucent.com>	* tests/rm/rm1: New file.	* tests/rm/rm2: New file.	* tests/rm/unread2: New file.	* tests/rm/Makefile.am (TESTS): Add rm1, rm2, and unread2.	* src/remove.h (enum RM_status) [RM_NONEMPTY_DIR]: New member.2002-05-13  Jim Meyering  <meyering@lucent.com>	* src/remove.c (rm): Free cwd_state, if necessary.2002-05-01  Jim Meyering  <meyering@lucent.com>	* src/remove.c (rm_1): Remove now useless (always true)	user_specified_name parameter.  Adjust sole caller.	* src/remove.c (rm): New function.  This interface allows	one to remove multiple arguments at a time.  This is important in	that it allows us to hide the remove_init/remove_fini functions and	the cwd_state parameter.	(rm_1): Renamed from rm.	(remove_init, remove_fini): Remove functions.  Each body is now	part of `rm'.	* src/remove.h (rm): Update prototype.2002-06-01  Jim Meyering  <meyering@lucent.com>	* src/ls.c: Remove use of D_TYPE_IN_DIRENT, now that that symbol	has been renamed.2002-05-30  Jim Meyering  <meyering@lucent.com>	* src/copy.c (copy_reg): Use a temporary to avoid a warning	from gcc -W about comparison between signed and unsigned.	(copy_internal): Likewise, but use a cast.2002-05-22  Jim Meyering  <meyering@lucent.com>	* src/sys2.h (S_ISREG, S_ISDIR): Define if not already defined.	(S_TYPEISSEM, S_TYPEISSHM, S_TYPEISTMO): Likewise.	* src/ls.c (S_ISLNK, S_ISFIFO, S_ISSOCK, S_ISCHR, S_ISBLK, S_ISDOOR):	Remove definitions.	* src/sys2.c (S_ISLNK, S_ISFIFO, S_ISSOCK, S_ISCHR, S_ISBLK, S_ISDOOR):	Define here instead.2002-04-27  Jim Meyering  <meyering@lucent.com>	* src/remove.c (cycle_check): New function containing code factored	out of remove_dir.  The sole difference is that upon detecting a	cycle, rm now dies unconditionally.  Before, in interactive mode,	it would ask the user whether to continue.	(remove_dir): Call cycle_check.2002-04-25  Jim Meyering  <meyering@lucent.com>	Avoid new warnings from gcc.	* src/dd.c: Declare input_file and output_file to be `const'.	(skip): Declare `file' parameter to be `const', too.	Remove hash table, active_dir_map, used to detect directory cycles.	Instead, detect them lazily with just O(1) memory.	Suggestion from Andi Kleen.	* src/remove.c (is_power_of_two): New function.	(print_nth_dir, make_active_dir_ent): Remove functions.	(hash_active_dir_ent, hash_compare_active_dir_ents): Likewise.	(remove_dir): Check for cycles here, ...	(rm): ... and don't check for cycles here.	* src/remove.c (rm): Call fspec_get_full_mode here, rather than	fspec_get_filetype_mode.  We want to get the dev/ino earlier, and	at the same time as when we get the file type, to avoid the risk	that an attacker would change e.g. a directory to a symlink before	we record its dev/ino.	* configure.ac (AC_CONFIG_FILES): Remove intl/Makefile.	(AM_GNU_GETTEXT): Add external arg.	* intl/: Remove directory.	* Makefile.am (SUBDIRS): Remove intl.	(DISTCLEANFILES): Remove definition.	* src/sys2.h: Remove ENABLE_NLS-related code.	(_, N_) Remove definitions.	Include "gettext.h" instead.	* src/Makefile.am (INCLUDES): Remove -I../intl.2002-04-22  Jim Meyering  <meyering@lucent.com>	* src/remove.c (rm): Call exit with EXIT_FAILURE, not `1'.2002-04-19  Jim Meyering  <meyering@lucent.com>	* tests/cp/*: Clean up.	* tests/sample-test: Use a temporary directory named	`basename $0`.tmp/$$.  Create with mkdir -p.	* tests/cp/backup-1: Use better trap, etc.	* tests/mkdir/p-2: Use better trap.	* tests/mkdir/p-1: Likewise.	* tests/mkdir/concurrent-1: Likewise.	* tests/rm/deep-1: Set $tmp the new way.	* tests/rm/ir-1: Use `rm', not $RM.  Use better trap.	* tests/rm/i-1: Likewise.	* tests/rm/f-1: Likewise.	* tests/sample-test: Use automatically-derived name for temporary	directory.  This is more 8.3-friendly.  Based on a suggestion from	Richard Dawe.	* tests/sample-test: New file.	* tests/Makefile.am (EXTRA_DIST): Add sample-test.2002-04-17  Jim Meyering  <meyering@lucent.com>	* src/touch.c (touch): Don't report errors for nonexistent files	when --no-create is in effect.  Based on a patch from TAKAI Kousuke.	* tests/touch/no-create-missing: New file/test for above.	* tests/touch/Makefile.am (TESTS): Add no-create-missing.2002-04-16  Jim Meyering  <meyering@lucent.com>	* src/stat.c: Add copyright comment.	(human_fstype): Rename from print_human_fstype, and rework accordingly.	(print_statfs): Use human_fstype to honor format width on %T.2002-04-15  Jim Meyering  <meyering@lucent.com>	Handle "lld" vs "ld" printf formats the same way Bash does.	* src/stat.c: Include inttypes.h.	(PRIdMAX, PRIuMAX): Define, if not already defined.	(print_statfs): Use those macros, not the literal strings.	(print_stat): Likewise.	Suggestion from Paul Eggert.	* src/stat.c (print_human_fstype): Add missing `break;'	for `case S_MAGIC_MINIX:'.2002-04-14  Jim Meyering  <meyering@lucent.com>	* src/stat.c (statfs_secure): Define.	(print_stat): Remove another #ifdef.	(do_statfs): Likewise.	(print_statfs): Prefer/use fputs over printf.	(print_stat): Likewise.	* src/Makefile.am (bin_PROGRAMS): Add stat.	(noinst_HEADERS): Add fs.h.	* src/stat.c [HAVE_SYS_VFS_H]: Guard incluion of sys/vfs.h.	Constify many parameters.	(print_statfs): Fix typo: Use %u (to match %lu) for namelen, not %d.	(verbose_usage): Remove function.  Move contents into usage.	Remove lots of #if directives involving FLASK_LINUX	[!FLASK_LINUX] (is_flask_enabled): Define.	(stat_secure, lstat_secure): Define.	(print_statfs): Remove lots of nested #if directives.	Instead, rely on support fo %llu and %lld printf formats --	but that is only temporary, since it's not porable enough.	(main): Hoist is_flask_enabled test to be done here, rather	than in each of do_stat and do_statfs for every argument.2002-04-13  Jim Meyering  <meyering@lucent.com>	* src/stat.c: Include system.h, error.h, and many other headers.	[HAVE_SYS_SYSMACROS_H]: Guard inclusion of sys/sysmacros.h.	(PROGRAM_NAME, AUTHORS): Define.	(long_options): Declare/define.	(print_human_access): Rewrite to use mode_string.	(usage): Rewrite.	(main): Use getopt_long.	(print_human_type): Call fputs once rather than calling	printf many times.	(print_human_fstype): Revamp in a similar fashion.  Don't use strdup.	Declare most functions to be `static'.2002-04-12  Jim Meyering  <meyering@lucent.com>	* src/Makefile.am (LDADD): List ../lib/libfetish.a both before	and after @LIBINTL@.  Thanks to Paul Eggert for the fix and to	Bruno Haible for diagnosing the problem.	* src/link.c: Include long-options.h.	[long_opts]: Remove.	(usage): Tweak --help output; use *_OPTION_DESCRIPTION macros.	(main): Don't use getopt directly.  Use parse_long_options instead.	Tweak a diagnostic.	Use EXIT_FAILURE rather than a literal `1'.	* src/unlink.c: Likewise.	(main): If POSIXLY_CORRECT is set, don't recognize --help or --version,	so the program can operate on a file with one of those names.2002-04-11  Jim Meyering  <meyering@lucent.com>	New programs link and unlink.	* src/Makefile.am (bin_PROGRAMS): Add link and unlink.	* src/link.c, src/unlink.c: New files, from Debian's fileutils_4.1-10.	Written by Michael Stone.	* man/link.x: New file.	* man/unlink.x: New file.	* man/Makefile.am: Add link and unlink.2002-04-07  Jim Meyering  <meyering@lucent.com>	* tests/install/basic-1: Tweak comments to reflect reality.	* tests/cp/fail-perm: Add VERBOSE=yes support.	* tests/mv/mv-special-1: Fix typo in VERBOSE=yes handling.	Reported by Richard Dawe.2002-03-30  Jim Meyering  <meyering@lucent.com>	* Version 4.1.8.	* tests/mv/i-link-no: Use --reply=no rather than -i.	The latter depends on whether stdin is a tty and hence would	fail in some situations where --reply=no doesn't.	* src/mv.c (do_move): Correct a comment.	* src/copy.c (copy_internal): Move the block that sets `earlier_file'	down to just before the first use of that variable.  Otherwise, it was	possible to make mv (and probably cp, too) malfunction when copying	hard-linked files into a directory containing at least one of the	source file names.  Call forget_created everywhere thereafter where	this function returns without creating a destination file that might	subsequently be linked.  Reported by Iida Yosiaki.	* src/cp-hash.c (forget_created): New function.	* src/cp-hash.h (forget_created): Prototype.	* tests/mv/i-link-no: New test for the above.	Based on an example from Iida Yosiaki.	* tests/mv/Makefile.am (TESTS): Add i-link-no.2002-03-17  Jim Meyering  <meyering@lucent.com>	* src/copy.c (copy_internal) [move_mode]: Give a better diagnostic,	by using errno from the failed unlink, when a cross-device `mv'	fails, e.g., because the destination cannot be unlinked.	Prompted by a report from Karl Berry.	* tests/mv/part-fail: New test for the above.	* tests/mv/Makefile.am (TESTS): Add part-fail.2002-03-16  Jim Meyering  <meyering@lucent.com>	* src/Makefile.am (datadir): Don't override $(datadir)	which might be set by --datadir and different from $(prefix)/share.	Patch from Albert Chin-A-Young.2002-03-10  Jim Meyering  <meyering@lucent.com>	* Version 4.1.7.	* src/ln.c (main): Change wording in diagnostic.	* src/cp.c (do_copy): Likewise.	* src/install.c (strip): Likewise.	Suggestions from Santiago Vila.	* Use autoconf-2.53.  Regenerate dependent files.	* Makefile.maint (GZIP, BZIP2): Remove definitions.	($(my_distdir).tar.bz2): Remove rule.  Now, it's built by `make dist'.	* configure.ac (AM_INIT_AUTOMAKE): Specify the required version	of automake (1.6), and options (gnits dist-bzip2), rather than...	* Makefile.am (AUTOMAKE_OPTIONS): ...here.  Remove definition.	* src/copy.c (copy_reg): Don't exit upon finding a replaced file.	Instead, just skip it like the diagnostic says.	Reported by Paul Eggert.2002-03-09  Paul Eggert  <eggert@twinsun.com>	* src/copy.c (copy_reg): Use a more concise diagnostic for	reporting replaced files.  This avoids a bug in the code,	which mishandled ino_t wider than long.	* src/remove.c (remove_dir): Likewise, twice.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -