mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27b2b19aa8 | ||
|
|
8992dfa54c | ||
|
|
f4fec33607 | ||
|
|
ba4b0bde2e | ||
|
|
70c84e046e | ||
|
|
6821f2fb4e | ||
|
|
9f8b16e992 | ||
|
|
47fb363432 | ||
|
|
177f131385 | ||
|
|
a1300c60ef | ||
|
|
36325c7f03 | ||
|
|
108f34a71b | ||
|
|
a58ce6f023 | ||
|
|
e44df9d3f5 | ||
|
|
8fb32039bc | ||
|
|
b697bac049 | ||
|
|
532b4285de | ||
|
|
6150b10698 | ||
|
|
f17c1df391 | ||
|
|
e184a46e39 | ||
|
|
166fe58561 | ||
|
|
052cce9e3e | ||
|
|
ba9c7449b9 | ||
|
|
5782a362e1 | ||
|
|
b505dc5734 | ||
|
|
b5d6f66b60 | ||
|
|
346de3c1e1 | ||
|
|
a72abc9304 | ||
|
|
5f02cddc18 | ||
|
|
559c7a57c7 | ||
|
|
31dd7a0de2 | ||
|
|
25030d942d | ||
|
|
60e77fa49a | ||
|
|
a4eedb251e | ||
|
|
95bfb36292 | ||
|
|
9d88182ce1 | ||
|
|
aebefc25f9 | ||
|
|
e83f10c483 | ||
|
|
ada1caedd5 | ||
|
|
5ab71e4d3f | ||
|
|
b04ce61958 | ||
|
|
f89c20bdf7 | ||
|
|
61a8b5cb56 | ||
|
|
e818f19cf8 | ||
|
|
de15a497d1 | ||
|
|
9fa178fccd | ||
|
|
84f7231dfa | ||
|
|
cc19f63be3 | ||
|
|
f926f7ce0e | ||
|
|
cbf35912da | ||
|
|
cccd01b4da | ||
|
|
856b828320 | ||
|
|
6774b991db | ||
|
|
4b8c92b940 | ||
|
|
63d2f05f52 | ||
|
|
3a3f5f359e | ||
|
|
454d7f31c5 | ||
|
|
a608f1e781 | ||
|
|
0be99382d9 | ||
|
|
c34f8d5c78 | ||
|
|
4cb3f4faa4 | ||
|
|
be87d61299 | ||
|
|
44ccd1c465 | ||
|
|
97c5045435 | ||
|
|
5d9d07bbb1 |
85
.github/ISSUE_TEMPLATE.txt
vendored
Normal file
85
.github/ISSUE_TEMPLATE.txt
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
Please **do not** send pull-requests or open new issues on Github.
|
||||
|
||||
Github is a downstream mirror and is not frequently monitored,
|
||||
all development is coordinated upstream on GNU resources.
|
||||
|
||||
* Send general questions or suggestions to: coreutils@gnu.org .
|
||||
* Send bugs reports to: bug-coreutils@gnu.org .
|
||||
|
||||
## Bug reports
|
||||
|
||||
Before reporting a new bug, please check the following resources:
|
||||
|
||||
* Coreutils FAQ: https://www.gnu.org/software/coreutils/faq/coreutils-faq.html
|
||||
|
||||
* Coreutils Gotchas: https://www.pixelbeat.org/docs/coreutils-gotchas.html
|
||||
contains a list of some quirks and unexpected behaviour (which are often
|
||||
mistaken for bugs).
|
||||
|
||||
* Online Manual:
|
||||
https://www.gnu.org/software/coreutils/manual/html_node/index.html
|
||||
|
||||
* Search the archives for previous questions and answers:
|
||||
|
||||
* Coreutils Mailing list (General usage and advice):
|
||||
https://lists.gnu.org/archive/html/coreutils/
|
||||
|
||||
* Bug reports Mailing List:
|
||||
https://lists.gnu.org/archive/html/bug-coreutils/
|
||||
|
||||
* Open Bugs:
|
||||
https://debbugs.gnu.org/cgi/pkgreport.cgi?which=pkg&data=coreitils
|
||||
|
||||
* Translation related issues:
|
||||
https://translationproject.org/domain/coreutils.html
|
||||
|
||||
|
||||
## Effective bug reports
|
||||
|
||||
* Include a descriptive subject line (e.g. the program with which
|
||||
you experience a problem, and what the problem is).
|
||||
* Include the version of the program (e.g. the output of `PROG --version`).
|
||||
* Include the operating system and the type of hardware you are using
|
||||
(e.g. the output of `uname -a`).
|
||||
* Include the exact command and parameters you have used.
|
||||
* Clearly explain what is the output you expected to get, and what is
|
||||
the actual result you encountered.
|
||||
* Include as much information as possible to reproduce the problem.
|
||||
If the problem happens on a very large input file, try to provide
|
||||
a minimal example (a subset of the input file) that still causes the problem.
|
||||
*Do not* include attachments over 40kB.
|
||||
* List policy is reply-to-all, and non-subscribers may post.
|
||||
* There may be a moderation delay for a first-time post, whether or not
|
||||
you subscribe.
|
||||
|
||||
|
||||
## Mailing List Etiquette
|
||||
|
||||
When sending messages to coreutils@gnu.org or bug-coreutils@gnu.org :
|
||||
|
||||
* Send messages as plain text.
|
||||
* Do not send messages encoded as HTML nor encoded as base64 MIME nor
|
||||
included as multiple formats.
|
||||
* Avoid sending large messages, such as log files, system call trace
|
||||
output, and other content resulting in messages over about 40 kB.
|
||||
* Avoid sending screenshots (e.g. PNG files). When reporting errors
|
||||
you encounter on the terminal, copy and paste the text to your message.
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
105
.github/PULL_REQUEST_TEMPLATE.txt
vendored
Normal file
105
.github/PULL_REQUEST_TEMPLATE.txt
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
Please *do not* send pull-requests or open new issues on Github.
|
||||
See "hacking resources" below for recommended alternatives.
|
||||
|
||||
Github is a downstream mirror and is not frequently monitored,
|
||||
all development is coordinated upstream on GNU resources.
|
||||
|
||||
* Send general questions or suggestions to: coreutils@gnu.org .
|
||||
* Send bugs reports to: <bug-coreutils@gnu.org>
|
||||
|
||||
Before sending the bug, please consult the FAQ and Mailing list
|
||||
archives (see below). Often these perceived bugs are simply due to
|
||||
wrong program usage.
|
||||
|
||||
Please remember that development of Coreutils is a volunteer effort,
|
||||
and you can also contribute to its development. For information about
|
||||
contributing to the GNU Project, please read
|
||||
[How to help GNU](https://www.gnu.org/help/].
|
||||
|
||||
|
||||
## Getting Help
|
||||
|
||||
* Coreutils FAQ: https://www.gnu.org/software/coreutils/faq/coreutils-faq.html
|
||||
|
||||
* Coreutils Gotchas: https://www.pixelbeat.org/docs/coreutils-gotchas.html
|
||||
contains a list of some quirks and unexpected behaviour (which are often
|
||||
mistaken for bugs).
|
||||
|
||||
* Online Manual:
|
||||
https://www.gnu.org/software/coreutils/manual/html_node/index.html
|
||||
|
||||
* Search the archives for previous questions and answers:
|
||||
|
||||
* Coreutils Mailing list (General usage and advice):
|
||||
https://lists.gnu.org/archive/html/coreutils/
|
||||
|
||||
* Bug reports Mailing List:
|
||||
https://lists.gnu.org/archive/html/bug-coreutils/
|
||||
|
||||
* Open Bugs: https://debbugs.gnu.org/cgi/pkgreport.cgi?which=pkg&data=coreitils
|
||||
|
||||
* Translation related issues:
|
||||
https://translationproject.org/domain/coreutils.html
|
||||
|
||||
|
||||
## Mailing List Etiquette
|
||||
|
||||
When sending messages to coreutils@gnu.org or bug-coreutils@gnu.org :
|
||||
|
||||
* Send messages as plain text.
|
||||
* Do not send messages encoded as HTML nor encoded as base64 MIME nor
|
||||
included as multiple formats.
|
||||
* Include a descriptive subject line.
|
||||
* Avoid sending large messages, such as log files, system call trace
|
||||
output, and other content resulting in messages over about 40 kB.
|
||||
* Avoid sending screenshots (e.g. PNG files). When reporting errors
|
||||
you encounter on the terminal, copy and paste the text to your message.
|
||||
* List policy is reply-to-all, and non-subscribers may post.
|
||||
* There may be a moderation delay for a first-time post, whether or not
|
||||
you subscribe.
|
||||
|
||||
|
||||
## Hacking resources
|
||||
|
||||
files contain information about hacking and contributing to GNU coreutils:
|
||||
https://git.savannah.gnu.org/cgit/coreutils.git/tree/HACKING
|
||||
https://git.savannah.gnu.org/cgit/coreutils.git/tree/README-hacking
|
||||
Please read them first.
|
||||
|
||||
Before suggesting a new feature, read the list of rejected features requests:
|
||||
https://www.gnu.org/software/coreutils/rejected_requests.html
|
||||
|
||||
Send a patch as an email attachment. Patches can be generated with
|
||||
`git format-patch` (the HACKING links above provide examples of generating
|
||||
a patch).
|
||||
|
||||
|
||||
## Copyright Assignment
|
||||
|
||||
If your change is significant (i.e., if it adds more than ~10 lines),
|
||||
then you'll have to have a copyright assignment on file with the FSF.
|
||||
To learn more see https://www.gnu.org/licenses/why-assign.html .
|
||||
|
||||
The HACKING file (above) contains more details about how to initial
|
||||
the copyright assignment process. Coreutils maintainers can also help
|
||||
in this matter.
|
||||
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -40,6 +40,7 @@
|
||||
/coreutils-*.tar.xz
|
||||
/coreutils-*.tar.xz.sig
|
||||
/doc/manual
|
||||
/doc/coverage
|
||||
/gnulib-tests
|
||||
/lib/.dirstamp
|
||||
/lib/.gitignore
|
||||
|
||||
1
.mailmap
1
.mailmap
@@ -28,6 +28,7 @@ Pádraig Brady <P@draigBrady.com>
|
||||
<stephane.raimbault@gmail.com> <stephane.raimbault@makina-corpus.com>
|
||||
<jarkko.sakkinen@iki.fi> <jarkko.sakkinen@linux.intel.com>
|
||||
<tobias@stoeckmann.org> <tobias@bugol.de>
|
||||
<cjwatson@debian.org> <cjwatson@ubuntu.com>
|
||||
|
||||
# Prefer spelled-out middle name and its address.
|
||||
Arne Henrik Juul <arnej@imf.unit.no> Arne H. Juul <arnej@solan.unit.no>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.27
|
||||
8.28
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
{
|
||||
libc_dl_open
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
ALL_RECURSIVE_TARGETS =
|
||||
|
||||
@@ -93,7 +93,7 @@ dist-hook: gen-ChangeLog
|
||||
$(AM_V_at)touch $(distdir)/doc/constants.texi \
|
||||
$(distdir)/doc/coreutils.info
|
||||
|
||||
gen_start_ver = 8.18
|
||||
gen_start_ver = 8.20
|
||||
.PHONY: gen-ChangeLog
|
||||
gen-ChangeLog:
|
||||
$(AM_V_GEN)if test -d .git; then \
|
||||
@@ -120,7 +120,7 @@ THANKS-to-translators: po/LINGUAS THANKStt.in
|
||||
$(AM_V_GEN)( \
|
||||
cat $(srcdir)/THANKStt.in; \
|
||||
for lang in `cat $(srcdir)/po/LINGUAS`; do \
|
||||
echo http://translationproject.org/team/$$lang.html; \
|
||||
echo https://translationproject.org/team/$$lang.html; \
|
||||
done; \
|
||||
) > $@-tmp && mv $@-tmp $@
|
||||
|
||||
|
||||
62
NEWS
62
NEWS
@@ -1,5 +1,61 @@
|
||||
GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
* Noteworthy changes in release 8.29 (2017-12-27) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
b2sum no longer crashes when processing certain truncated check files.
|
||||
[bug introduced with b2sum coreutils-8.26]
|
||||
|
||||
dd now ensures the correct cache ranges are specified for the "nocache"
|
||||
and "direct" flags. Previously some pages in the page cache were not
|
||||
invalidated. [bug introduced for "direct" in coreutils-7.5,
|
||||
and with the "nocache" implementation in coreutils-8.11]
|
||||
|
||||
df no longer hangs when given a fifo argument.
|
||||
[bug introduced in coreutils-7.3]
|
||||
|
||||
ptx -S no longer infloops for a pattern which returns zero-length matches.
|
||||
[the bug dates back to the initial implementation]
|
||||
|
||||
shred --remove will again repeatedly rename files with shortening names
|
||||
to attempt to hide the original length of the file name.
|
||||
[bug introduced in coreutils-8.28]
|
||||
|
||||
stty no longer crashes when processing settings with -F also specified.
|
||||
[bug introduced in fileutils-4.0]
|
||||
|
||||
tail --bytes again supports non seekable inputs on all systems.
|
||||
On systems like android it always tried to process as seekable inputs.
|
||||
[bug introduced in coreutils-8.24]
|
||||
|
||||
timeout will again notice its managed command exiting, even when
|
||||
invoked with blocked CHLD signal, or in a narrow window where
|
||||
this CHLD signal from the exiting child was missed. In each case
|
||||
timeout would have then waited for the time limit to expire.
|
||||
[bug introduced in coreutils-8.27]
|
||||
|
||||
** New features
|
||||
|
||||
timeout now supports the --verbose option to diagnose forced termination.
|
||||
|
||||
** Improvements
|
||||
|
||||
dd now supports iflag=direct with arbitrary sized files on all file systems.
|
||||
|
||||
tail --bytes=NUM will efficiently seek to the end of block devices,
|
||||
rather than reading from the start.
|
||||
|
||||
Utilities which do not support long options (other than the default --help
|
||||
and --version), e.g. cksum and sleep, now use more consistent error diagnostic
|
||||
for unknown long options.
|
||||
|
||||
** Build-related
|
||||
|
||||
Default man pages are now distributed which are used if perl is
|
||||
not available on the build system, or when cross compiling.
|
||||
|
||||
|
||||
* Noteworthy changes in release 8.28 (2017-09-01) [stable]
|
||||
|
||||
** Bug fixes
|
||||
@@ -3582,7 +3638,7 @@ GNU coreutils NEWS -*- outline -*-
|
||||
These changes are in response to decisions taken in the January 2005
|
||||
Austin Group standardization meeting. For more details, please see
|
||||
"Utility Syntax Guidelines" in the Minutes of the January 2005
|
||||
Meeting <http://www.opengroup.org/austin/docs/austin_239.html>.
|
||||
Meeting <https://www.opengroup.org/austin/docs/austin_239.html>.
|
||||
|
||||
** Binary input and output are now implemented more consistently.
|
||||
These changes affect only platforms like MS-DOS that distinguish
|
||||
@@ -3660,9 +3716,9 @@ GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
The new -P option checks whether a file name component has leading "-",
|
||||
as suggested in interpretation "Austin-039:XCU:pathchk:pathchk -p"
|
||||
<http://www.opengroup.org/austin/interps/doc.tpl?gdid=6232>.
|
||||
<https://collaboration.opengroup.org/austin/interps/documents.php?action=show&gdid=6232>.
|
||||
It also rejects the empty name even if the current host accepts it; see
|
||||
<http://www.opengroup.org/austin/interps/doc.tpl?gdid=6233>.
|
||||
<https://collaboration.opengroup.org/austin/interps/documents.php?action=show&gdid=6233>.
|
||||
|
||||
The --portability option is now equivalent to -p -P.
|
||||
|
||||
|
||||
24
README
24
README
@@ -94,16 +94,30 @@ Here is one possible patch to correct the problem:
|
||||
|
||||
|
||||
************************
|
||||
OSF/1 4.0d build failure
|
||||
OSF/1 4.0d and AIX build failures
|
||||
------------------------
|
||||
|
||||
If you use /usr/bin/make on an OSF/1 4.0d system, it will fail due
|
||||
to the presence of the "[" target. That version of make appears to
|
||||
treat "[" as some syntax relating to locks. To work around that,
|
||||
If you use /usr/bin/make on these systems, the build will fail due
|
||||
to the presence of the "[" target. OSF/1 make(1) appears to
|
||||
treat "[" as some syntax relating to locks, while AIX make(1)
|
||||
appears to skip the "[" target. To work around these issues
|
||||
the best solution is to use GNU make. Otherwise, simply remove
|
||||
all mention of "[$(EXEEXT)" from src/Makefile.
|
||||
|
||||
|
||||
************************
|
||||
32 bit time_t build failures
|
||||
------------------------
|
||||
|
||||
On systems where it's determined that 64 bit time_t is supported
|
||||
(indicated by touch -t <some time after 2038>), but that coreutils
|
||||
would be built with a narrower time_t, the build will fail.
|
||||
This can be allowed by passing TIME_T_32_BIT_OK=yes to configure,
|
||||
or avoided by enabling 64 bit builds. For example GCC on AIX defaults
|
||||
to 32 bit, and to enable the 64 bit ABI one can use:
|
||||
./configure CFLAGS=-maix64 LDFLAGs=-maix64 AR='ar -X64'
|
||||
|
||||
|
||||
*************************************************
|
||||
"make check" failure on IRIX 6.5 and Solaris <= 9
|
||||
-------------------------------------------------
|
||||
@@ -179,7 +193,7 @@ reproduce whatever problem prompted it. Plus, you'll earn lots of
|
||||
karma if you include a test case to exercise any bug(s) you fix.
|
||||
Here are instructions for checking out the latest development sources:
|
||||
|
||||
http://savannah.gnu.org/git/?group=coreutils
|
||||
https://savannah.gnu.org/git/?group=coreutils
|
||||
|
||||
If your patch adds a new feature, please try to get some sort of consensus
|
||||
that it is a worthwhile change. One way to do that is to send mail to
|
||||
|
||||
@@ -106,4 +106,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
@@ -8,7 +8,7 @@ I.e., the tools checked for by the bootstrap script and include:
|
||||
- Git <https://git-scm.com/>
|
||||
- Gperf <https://www.gnu.org/software/gperf/>
|
||||
- Gzip <https://www.gnu.org/software/gzip/>
|
||||
- Perl <http://www.cpan.org/>
|
||||
- Perl <https://www.cpan.org/>
|
||||
- Rsync <https://rsync.samba.org/>
|
||||
- Tar <https://www.gnu.org/software/tar/>
|
||||
- Texinfo <https://www.gnu.org/software/texinfo/>
|
||||
|
||||
@@ -16,7 +16,7 @@ Here are most of the steps we (maintainers) follow when making a release.
|
||||
* Ensure that you've pushed all changes that belong in the release
|
||||
and that the NixOS/Hydra autobuilder is reporting all is well:
|
||||
|
||||
http://hydra.nixos.org/jobset/gnu/coreutils-master
|
||||
https://hydra.nixos.org/jobset/gnu/coreutils-master
|
||||
|
||||
* Run bootstrap one last time. This downloads any new translations:
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ Augey Mikus mikus@dqc.org
|
||||
Austin Donnelly Austin.Donnelly@cl.cam.ac.uk
|
||||
Axel Dörfler axeld@pinc-software.de
|
||||
Axel Kittenberger Anshil@gmx.net
|
||||
Barry Kelly http://barrkel.blogspot.com/
|
||||
Barry Kelly http://blog.barrkel.com/
|
||||
Bauke Jan Douma bjdouma@xs4all.nl
|
||||
Ben Elliston bje@air.net.au
|
||||
Ben Harris bjh21@netbsd.org
|
||||
@@ -192,6 +192,7 @@ Eli Zaretskii eliz@is.elta.co.il
|
||||
Emile LeBlanc leblanc@math.toronto.edu
|
||||
Emmanuel Lacour elacour@home-dn.net
|
||||
Eric Backus ericb@lsid.hp.com
|
||||
Eric Bergen eric.bergen@gmail.com
|
||||
Eric G. Miller egm2@jps.net
|
||||
Eric Pemente pemente@northpark.edu
|
||||
Eric S. Raymond esr@snark.thyrsus.com
|
||||
@@ -264,6 +265,7 @@ Ilya N. Golubev gin@mo.msk.ru
|
||||
Ingo Saitz ingo@debian.org
|
||||
Ivan Labath labath3@st.fmph.uniba.sk
|
||||
Ivo Timmermans ivo@debian.org
|
||||
Jack Howarth howarth.mailing.lists@gmail.com
|
||||
Jacky Fong jacky.fong@utoronto.ca
|
||||
James Antill jmanti%essex.ac.uk@seralph21.essex.ac.uk
|
||||
James Hunt jamesodhunt@hotmail.com
|
||||
@@ -375,9 +377,9 @@ Marc Haber mh+debian-bugs@zugschlus.de
|
||||
Marc Lehman schmorp@schmorp.de
|
||||
Marc Mengel mengel@fnal.gov
|
||||
Marc Olzheim marcolz@stack.nl
|
||||
Marcel Böhme http://www.comp.nus.edu.sg/~mboehme
|
||||
Marcel Böhme https://www.comp.nus.edu.sg/~mboehme
|
||||
Marco Franzen Marco.Franzen@Thyron.com
|
||||
Marcus Brinkmann http://www.marcus-brinkmann.de
|
||||
Marcus Brinkmann https://www.marcus-brinkmann.de
|
||||
Marcus Daniels marcus@ee.pdx.edu
|
||||
Mark A. Thomas thommark@access.digex.net
|
||||
Mark Conty Mark_Conty@cargill.com
|
||||
|
||||
15
TODO
15
TODO
@@ -7,9 +7,9 @@ before embarking on a big project.
|
||||
==================================================
|
||||
Modify chmod so that it does not change an inode's st_ctime
|
||||
when the selected operation would have no other effect.
|
||||
First suggested by Hans Ecke <http://hans.ecke.ws> in
|
||||
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/2920
|
||||
Discussed more recently on <http://bugs.debian.org/497514>.
|
||||
First suggested by Hans Ecke <https://hans.ecke.ws> in
|
||||
https://lists.gnu.org/r/bug-coreutils/2004-09/msg00145.html
|
||||
Discussed more recently on <https://bugs.debian.org/497514>.
|
||||
|
||||
document the following in coreutils.texi:
|
||||
[
|
||||
@@ -52,7 +52,7 @@ Write an autoconf test to work around build failure in HPUX's 64-bit mode.
|
||||
See notes in README -- and remove them once there's a work-around.
|
||||
|
||||
Integrate use of sendfile, suggested here:
|
||||
http://mail.gnu.org/archive/html/bug-fileutils/2003-03/msg00030.html
|
||||
https://lists.gnu.org/r/bug-fileutils/2003-03/msg00030.html
|
||||
I don't plan to do that, since a few tests demonstrate no significant benefit.
|
||||
|
||||
printf: consider adapting builtins/printf.def from bash
|
||||
@@ -86,14 +86,11 @@ sort: Investigate better sorting algorithms; see Knuth vol. 3.
|
||||
Mathematical Monthly 66 (1959), 387-389.
|
||||
|
||||
shred: Update shred as described here to conform to DoD 5220 rules:
|
||||
http://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00075.html
|
||||
https://lists.gnu.org/r/bug-coreutils/2007-05/msg00075.html
|
||||
|
||||
Remove suspicious uses of alloca (ones that may allocate more than
|
||||
about 4k)
|
||||
|
||||
Adapt these contribution guidelines for coreutils:
|
||||
http://sources.redhat.com/automake/contribute.html
|
||||
|
||||
Improve test coverage.
|
||||
See HACKING for instructions on generating an html test coverage report.
|
||||
Find a program that has poor coverage and improve.
|
||||
@@ -159,4 +156,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
10
bootstrap
10
bootstrap
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2017-01-09.19; # UTC
|
||||
scriptversion=2017-09-19.08; # UTC
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
@@ -17,7 +17,7 @@ scriptversion=2017-01-09.19; # UTC
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Originally written by Paul Eggert. The canonical version of this
|
||||
# script is maintained as build-aux/bootstrap in gnulib, however, to
|
||||
@@ -141,7 +141,7 @@ po_download_command_format=\
|
||||
# Fallback for downloading .po files (if rsync fails).
|
||||
po_download_command_format2=\
|
||||
"wget --mirror -nd -q -np -A.po -P '%s' \
|
||||
http://translationproject.org/latest/%s/"
|
||||
https://translationproject.org/latest/%s/"
|
||||
|
||||
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
|
||||
# fall back to the package name (1st argument with munging)
|
||||
@@ -699,7 +699,7 @@ download_po_files() {
|
||||
echo "$me: getting translations into $subdir for $domain..."
|
||||
cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
|
||||
eval "$cmd" && return
|
||||
# Fallback to HTTP.
|
||||
# Fallback to HTTPS.
|
||||
cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
|
||||
eval "$cmd"
|
||||
}
|
||||
@@ -792,7 +792,7 @@ symlink_to_dir()
|
||||
# aren't confused into doing unnecessary builds. Conversely, if the
|
||||
# existing symlink's timestamp is older than the source, make it afresh,
|
||||
# so that broken tools aren't confused into skipping needed builds. See
|
||||
# <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
|
||||
# <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
|
||||
test -h "$dst" &&
|
||||
src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
|
||||
dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
# We don't need these modules.
|
||||
@@ -180,6 +180,7 @@ gnulib_modules="
|
||||
netinet_in
|
||||
non-recursive-gnulib-prefix-hack
|
||||
nproc
|
||||
nstrftime
|
||||
obstack
|
||||
open
|
||||
parse-datetime
|
||||
@@ -235,7 +236,6 @@ gnulib_modules="
|
||||
stpcpy
|
||||
stpncpy
|
||||
strdup-posix
|
||||
strftime
|
||||
strncat
|
||||
strnumcmp
|
||||
strpbrk
|
||||
@@ -294,6 +294,7 @@ gnulib_modules="
|
||||
xstrtol
|
||||
xstrtold
|
||||
xstrtoumax
|
||||
year2038
|
||||
yesno
|
||||
"
|
||||
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
# This file is expected to be used via gitlog-to-changelog's --amend=FILE
|
||||
# option. It specifies what changes to make to each given SHA1's commit
|
||||
# log and metadata, using Perl-eval'able expressions.
|
||||
|
||||
# I was unable to apply the c-set using normal methods, so
|
||||
# applied it with patch and then forgot to reset the Author.
|
||||
51a4b04954ad5ad12de1d1b82a3603fc350a3bfa
|
||||
s,Jim .*>,Ondrej Oprala <ooprala\@redhat.com>,
|
||||
|
||||
9
cfg.mk
9
cfg.mk
@@ -12,14 +12,14 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Used in maint.mk's web-manual rule
|
||||
manual_title = Core GNU utilities
|
||||
|
||||
# Use the direct link. This is guaranteed to work immediately, while
|
||||
# it can take a while for the faster mirror links to become usable.
|
||||
url_dir_list = http://ftp.gnu.org/gnu/$(PACKAGE)
|
||||
url_dir_list = https://ftp.gnu.org/gnu/$(PACKAGE)
|
||||
|
||||
# Exclude bundled external projects from syntax checks
|
||||
VC_LIST_ALWAYS_EXCLUDE_REGEX = src/blake2/.*$$
|
||||
@@ -48,7 +48,7 @@ export VERBOSE = yes
|
||||
# 4914152 9e
|
||||
export XZ_OPT = -8e
|
||||
|
||||
old_NEWS_hash = fbfecedc8eaff3d296b43a9f1db2a269
|
||||
old_NEWS_hash = 8c2a749f657a6bd541e8b9c5227fe26f
|
||||
|
||||
# Add an exemption for sc_makefile_at_at_check.
|
||||
_makefile_at_at_check_exceptions = ' && !/^cu_install_prog/ && !/dynamic-dep/'
|
||||
@@ -320,11 +320,12 @@ sc_prohibit-gl-attributes:
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Look for lines longer than 80 characters, except omit:
|
||||
# - program-generated long lines in diff headers,
|
||||
# - urls
|
||||
# - the help2man script copied from upstream,
|
||||
# - tests involving long checksum lines, and
|
||||
# - the 'pr' test cases.
|
||||
FILTER_LONG_LINES = \
|
||||
\|^[^:]*NEWS:.*https\{,1\}://| d; \
|
||||
\|^[^:]*man/help2man:| d; \
|
||||
\|^[^:]*tests/misc/sha[0-9]*sum.*\.pl[-:]| d; \
|
||||
\|^[^:]*tests/pr/|{ \|^[^:]*tests/pr/pr-tests:| !d; };
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
dnl Written by Jim Meyering.
|
||||
|
||||
@@ -23,9 +23,12 @@ AC_PREREQ([2.69])
|
||||
# Make inter-release version strings look like, e.g., v6.9-219-g58ddd, which
|
||||
# indicates that it is built from the 219th delta (in _some_ repository)
|
||||
# following the v6.9 tag, and that 58ddd is a prefix of the commit SHA1.
|
||||
# The explicit URL can be removed when autoconf > 2.69 is released.
|
||||
AC_INIT([GNU coreutils],
|
||||
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
||||
[bug-coreutils@gnu.org])
|
||||
[bug-coreutils@gnu.org],
|
||||
[coreutils],
|
||||
[https://www.gnu.org/software/coreutils/])
|
||||
|
||||
AC_CONFIG_SRCDIR([src/ls.c])
|
||||
|
||||
|
||||
@@ -955,7 +955,7 @@ that are upward compatible with the
|
||||
@uref{http://www.bipm.org/en/publications/si-brochure/chapter3.html,
|
||||
SI prefixes}
|
||||
for decimal multiples and with the
|
||||
@uref{http://physics.nist.gov/cuu/Units/binary.html, ISO/IEC 80000-13
|
||||
@uref{https://physics.nist.gov/cuu/Units/binary.html, ISO/IEC 80000-13
|
||||
(formerly IEC 60027-2) prefixes} for binary multiples.
|
||||
|
||||
With human-readable formats, output sizes are followed by a size letter
|
||||
@@ -8520,8 +8520,9 @@ Equivalent to @option{--no-dereference --preserve=links}.
|
||||
@opindex --force
|
||||
When copying without this option and an existing destination file cannot
|
||||
be opened for writing, the copy fails. However, with @option{--force},
|
||||
when a destination file cannot be opened, @command{cp} then removes it and
|
||||
tries to open it again. When this option is combined with
|
||||
when a destination file cannot be opened, @command{cp} then
|
||||
tries to recreate the file by first removing it.
|
||||
When this option is combined with
|
||||
@option{--link} (@option{-l}) or @option{--symbolic-link}
|
||||
(@option{-s}), the destination link is replaced, and unless
|
||||
@option{--backup} (@option{-b}) is also given there is no brief
|
||||
@@ -9187,7 +9188,9 @@ dd if=ifile iflag=nocache count=0
|
||||
# Ensure drop cache for the whole file
|
||||
dd of=ofile oflag=nocache conv=notrunc,fdatasync count=0
|
||||
|
||||
# Drop cache for part of file
|
||||
# Advise to drop cache for part of file
|
||||
# Note the kernel will only consider complete and
|
||||
# already persisted pages.
|
||||
dd if=ifile iflag=nocache skip=10 count=10 of=/dev/null
|
||||
|
||||
# Stream data using just the read-ahead cache.
|
||||
@@ -9955,8 +9958,8 @@ destroy it.
|
||||
@command{shred} makes no attempt to detect or report this problem, just as
|
||||
it makes no attempt to do anything about backups. However, since it is
|
||||
more reliable to shred devices than files, @command{shred} by default does
|
||||
not truncate or remove the output file. This default is more suitable
|
||||
for devices, which typically cannot be truncated and should not be
|
||||
not deallocate or remove the output file. This default is more suitable
|
||||
for devices, which typically cannot be deallocated and should not be
|
||||
removed.
|
||||
|
||||
Finally, consider the risk of backups and mirrors.
|
||||
@@ -10013,7 +10016,7 @@ the whole file. @var{bytes} can be followed by a size specification like
|
||||
@opindex --remove=wipe
|
||||
@opindex --remove=wipesync
|
||||
@cindex removing files after shredding
|
||||
After shredding a file, truncate it (if possible) and then remove it.
|
||||
After shredding a file, deallocate it (if possible) and then remove it.
|
||||
If a file has multiple links, only the named links will be removed.
|
||||
Often the file name is less sensitive than the file data, in which case
|
||||
the optional @var{how} parameter, supported with the long form option,
|
||||
@@ -11216,6 +11219,10 @@ line, @command{chmod} changes the permissions of the pointed-to file.
|
||||
In contrast, @command{chmod} ignores symbolic links encountered during
|
||||
recursive directory traversals.
|
||||
|
||||
Only a process whose effective user ID matches the user ID of the file,
|
||||
or a process with appropriate privileges, is permitted to change the
|
||||
file mode bits of a file.
|
||||
|
||||
A successful use of @command{chmod} clears the set-group-ID bit of a
|
||||
regular file if the file's group ID does not match the user's
|
||||
effective group ID or one of the user's supplementary group IDs,
|
||||
@@ -12244,7 +12251,7 @@ numbers unambiguously octal, you can use @samp{%#03a}.
|
||||
|
||||
The @samp{%N} format can be set with the environment variable
|
||||
@env{QUOTING_STYLE}@. If that environment variable is not set,
|
||||
the default value is @samp{shell-escape}. Valid quoting styles are:
|
||||
the default value is @samp{shell-escape-always}. Valid quoting styles are:
|
||||
@quotingStyles
|
||||
|
||||
The @samp{%t} and @samp{%T} formats operate on the st_rdev member of
|
||||
@@ -14173,6 +14180,10 @@ Exit status:
|
||||
1 otherwise.
|
||||
@end display
|
||||
|
||||
@menu
|
||||
* Realpath usage examples:: Realpath usage examples.
|
||||
@end menu
|
||||
|
||||
|
||||
@node Realpath usage examples
|
||||
@subsection Realpath usage examples
|
||||
@@ -17382,6 +17393,12 @@ the @var{command}.
|
||||
Send this @var{signal} to @var{command} on timeout, rather than the
|
||||
default @samp{TERM} signal. @var{signal} may be a name like @samp{HUP}
|
||||
or a number. @xref{Signal specifications}.
|
||||
|
||||
@item -v
|
||||
@itemx --verbose
|
||||
@opindex -v
|
||||
@opindex --verbose
|
||||
Diagnose to stderr, any signal sent upon timeout.
|
||||
@end table
|
||||
|
||||
@cindex time units
|
||||
@@ -18179,7 +18196,7 @@ to set a file's timestamp to an arbitrary value.
|
||||
@chapter Opening the Software Toolbox
|
||||
|
||||
An earlier version of this chapter appeared in
|
||||
@uref{http://www.linuxjournal.com/article.php?sid=2762, the
|
||||
@uref{https://www.linuxjournal.com/article.php?sid=2762, the
|
||||
@cite{What's GNU@?} column of the June 1994 @cite{Linux Journal}}.
|
||||
It was written by Arnold Robbins.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
info_TEXINFOS = doc/coreutils.texi
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Without this pragma, gcc suggests that (given !HAVE_POSIX_FADVISE)
|
||||
the fdadvise function might be a candidate for attribute 'const'. */
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Full implementation: GDSL (http://gna.org/projects/gdsl/) by Nicolas
|
||||
Darnis <ndarnis@free.fr>. */
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Full implementation: GDSL (http://gna.org/projects/gdsl/) by Nicolas
|
||||
Darnis <ndarnis@free.fr>. Adapted by Gene Auyeung. */
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Pádraig Brady. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Colin Plumb and Paul Eggert. */
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Colin Plumb and Paul Eggert. */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Jim Meyering. */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef ROOT_DEV_INO_H
|
||||
# define ROOT_DEV_INO_H 1
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Here we replace or wrap the most common smack functions used by coreutils.
|
||||
Others will need to be protected by HAVE_SMACK. */
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Mike Haertel. */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef XDECTOINT_H_
|
||||
# define XDECTOINT_H_ 1
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Jim Meyering. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Pádraig Brady. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Pádraig Brady. */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
|
||||
2
gnulib
2
gnulib
Submodule gnulib updated: a20922f105...21d224dc9e
4
init.cfg
4
init.cfg
@@ -13,7 +13,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# This goes hand in hand with the "exec 9>&2;" in tests/Makefile.am's
|
||||
# TESTS_ENVIRONMENT definition.
|
||||
@@ -627,7 +627,7 @@ skip_if_setgid_()
|
||||
|
||||
# Skip if files are created with a different group to the current user
|
||||
# This can happen due to a setgid dir, or by some other mechanism on OS X:
|
||||
# http://unix.stackexchange.com/q/63865
|
||||
# https://unix.stackexchange.com/q/63865
|
||||
# https://bugs.gnu.org/14024#41
|
||||
skip_if_nondefault_group_()
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
# FIXME: add traps and choose top level names so that
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# GNULIB_BOOT_TIME([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
||||
* ----------------------------------------------------------
|
||||
|
||||
@@ -15,7 +15,7 @@ dnl Misc type-related macros for coreutils.
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Written by Jim Meyering.
|
||||
|
||||
@@ -211,6 +211,7 @@ AC_DEFUN([gl_CHECK_ALL_HEADERS],
|
||||
paths.h
|
||||
priv.h
|
||||
stropts.h
|
||||
sys/mtio.h
|
||||
sys/param.h
|
||||
sys/systeminfo.h
|
||||
syslog.h
|
||||
|
||||
@@ -20,7 +20,7 @@ m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Written by Jim Meyering.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Written by Jim Meyering.
|
||||
|
||||
|
||||
13
man/chmod.x
13
man/chmod.x
@@ -1,7 +1,7 @@
|
||||
'\" Copyright (C) 1998-2017 Free Software Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
'\" of the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
|
||||
'\" There is NO WARRANTY, to the extent permitted by law.
|
||||
[NAME]
|
||||
chmod \- change file mode bits
|
||||
@@ -87,14 +87,19 @@ functionality of the underlying
|
||||
system call. When in
|
||||
doubt, check the underlying system behavior.
|
||||
.PP
|
||||
For directories
|
||||
.B chmod
|
||||
preserves a directory's set-user-ID and set-group-ID bits unless you
|
||||
preserves set-user-ID and set-group-ID bits unless you
|
||||
explicitly specify otherwise. You can set or clear the bits with
|
||||
symbolic modes like
|
||||
.B u+s
|
||||
and
|
||||
.BR g\-s ,
|
||||
and you can set (but not clear) the bits with a numeric mode.
|
||||
.BR g\-s .
|
||||
To clear these bits for directories with a numeric mode requires
|
||||
an additional leading zero, or leading = like
|
||||
.B 00755
|
||||
, or
|
||||
.B =755
|
||||
.SH "RESTRICTED DELETION FLAG OR STICKY BIT"
|
||||
The restricted deletion flag or sticky bit is a single bit, whose
|
||||
interpretation depends on the file type. For directories, it prevents
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'\" Copyright (C) 1998-2017 Free Software Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
'\" of the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
|
||||
'\" There is NO WARRANTY, to the extent permitted by law.
|
||||
[NAME]
|
||||
chown \- change file owner and group
|
||||
|
||||
2
man/df.x
2
man/df.x
@@ -1,7 +1,7 @@
|
||||
'\" Copyright (C) 1998-2017 Free Software Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
'\" of the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
|
||||
'\" There is NO WARRANTY, to the extent permitted by law.
|
||||
[NAME]
|
||||
df \- report file system disk space usage
|
||||
|
||||
2
man/du.x
2
man/du.x
@@ -1,7 +1,7 @@
|
||||
'\" Copyright (C) 1998-2017 Free Software Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
'\" of the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
|
||||
'\" There is NO WARRANTY, to the extent permitted by law.
|
||||
[NAME]
|
||||
du \- estimate file space usage
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Poor man's placeholder for help2man invocation on systems lacking perl;
|
||||
# it generates a dummy man page stating that a proper one could not be
|
||||
# generated, and redirecting the user back to either the info
|
||||
# documentation or the '--help' output.
|
||||
# Poor man's placeholder for help2man invocation on systems lacking perl,
|
||||
# or when cross compiling.
|
||||
# It just copies the distributed man pages.
|
||||
|
||||
set -e; set -u
|
||||
|
||||
@@ -24,12 +23,12 @@ while test $# -gt 0; do
|
||||
# Help2man options we recognize and handle.
|
||||
--output=*) output=`expr x"$1" : x'--output=\(.*\)'`;;
|
||||
--output) shift; output=$1;;
|
||||
--include=*) include=`expr x"$1" : x'--include=\(.*\)'`;;
|
||||
--include) shift; include=$1;;
|
||||
--source=*) source=`expr x"$1" : x'--source=\(.*\)'`;;
|
||||
--source) shift; source=$1;;
|
||||
# Recognize (as no-op) other help2man options that might be used
|
||||
# in the makefile.
|
||||
--include=*);;
|
||||
--include) shift;;
|
||||
--info-page=*);;
|
||||
-*) fatal_ "invalid or unrecognized help2man option '$1'";;
|
||||
--) shift; break;;
|
||||
@@ -41,10 +40,13 @@ done
|
||||
test $# -gt 0 || fatal_ "missing argument"
|
||||
test $# -le 1 || fatal_ "too many non-option arguments"
|
||||
|
||||
dist_man=$(printf '%s\n' "$include" | sed 's/\.x$/.1/')
|
||||
test -f "$dist_man" && cp "$dist_man" "$output" && exit || :
|
||||
|
||||
baseout=`basename_ "$output"`
|
||||
sed 's/^/WARNING: /' >&2 <<END
|
||||
Cannot create proper '$baseout' man page, since perl is missing or
|
||||
inadequate on this system. Creating a stub man page instead.
|
||||
Did not generate or find default '$baseout' man page.
|
||||
Creating a stub man page instead.
|
||||
END
|
||||
|
||||
progname=`basename_ "$1"`
|
||||
@@ -55,9 +57,8 @@ cat >"$output" <<END
|
||||
.SH NAME
|
||||
$progname $bs- a $source program
|
||||
.SH DESCRIPTION
|
||||
.B OOOPS!
|
||||
Due to the lack of perl on the build system, we were
|
||||
unable to create a proper manual page for
|
||||
.B OOPS!
|
||||
We were unable to create a proper manual page for
|
||||
.B $progname.
|
||||
For concise option descriptions, run
|
||||
.IP
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Written by Brendan O'Dea <bod@debian.org>
|
||||
# Available from ftp://ftp.gnu.org/gnu/help2man/
|
||||
# Available from https://ftp.gnu.org/gnu/help2man/
|
||||
|
||||
use 5.008;
|
||||
use strict;
|
||||
@@ -256,7 +256,7 @@ my $epoch_secs = time;
|
||||
if (exists $ENV{SOURCE_DATE_EPOCH} and $ENV{SOURCE_DATE_EPOCH} =~ /^(\d+)$/)
|
||||
{
|
||||
$epoch_secs = $1;
|
||||
$ENV{TZ} = 'UTC';
|
||||
$ENV{TZ} = 'UTC0';
|
||||
}
|
||||
|
||||
# Translators: the following message is a strftime(3) format string, which in
|
||||
|
||||
18
man/local.mk
18
man/local.mk
@@ -14,26 +14,31 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
EXTRA_DIST += man/help2man man/dummy-man
|
||||
|
||||
## Use the distributed man pages if cross compiling or lack perl
|
||||
if CROSS_COMPILING
|
||||
run_help2man = $(SHELL) $(srcdir)/man/dummy-man
|
||||
else
|
||||
## Graceful degradation for systems lacking perl.
|
||||
if HAVE_PERL
|
||||
run_help2man = $(PERL) -- $(srcdir)/man/help2man
|
||||
else
|
||||
run_help2man = $(SHELL) $(srcdir)/man/dummy-man
|
||||
endif
|
||||
endif
|
||||
|
||||
man1_MANS = @man1_MANS@
|
||||
EXTRA_DIST += $(man1_MANS:.1=.x)
|
||||
EXTRA_DIST += $(man1_MANS) $(man1_MANS:.1=.x)
|
||||
|
||||
EXTRA_MANS = @EXTRA_MANS@
|
||||
EXTRA_DIST += $(EXTRA_MANS:.1=.x)
|
||||
EXTRA_DIST += $(EXTRA_MANS) $(EXTRA_MANS:.1=.x)
|
||||
|
||||
ALL_MANS = $(man1_MANS) $(EXTRA_MANS)
|
||||
|
||||
CLEANFILES += $(ALL_MANS)
|
||||
MAINTAINERCLEANFILES += $(ALL_MANS)
|
||||
|
||||
# This is a kludge to remove generated 'man/*.1' from a non-srcdir build.
|
||||
# Without this, "make distcheck" might fail.
|
||||
@@ -179,13 +184,14 @@ endif
|
||||
## Note the use of $$t/$*, rather than just '$*' as in other packages.
|
||||
## That is necessary to avoid failures for programs that are also shell
|
||||
## built-in functions like echo, false, printf, pwd.
|
||||
rm -f $@ $@-t \
|
||||
rm -f $@-t \
|
||||
&& t=$*.td \
|
||||
&& rm -rf $$t \
|
||||
&& $(MKDIR_P) $$t \
|
||||
&& (cd $$t && $(LN_S) '$(abs_top_builddir)/src/'$$prog$(EXEEXT) \
|
||||
$$argv$(EXEEXT)) \
|
||||
&& : $${SOURCE_DATE_EPOCH=`cat $(srcdir)/.timestamp 2>/dev/null || :`} \
|
||||
&& : $${TZ=UTC0} && export TZ \
|
||||
&& export SOURCE_DATE_EPOCH && $(run_help2man) \
|
||||
--source='$(PACKAGE_STRING)' \
|
||||
--include=$(srcdir)/man/$$name.x \
|
||||
@@ -198,4 +204,4 @@ endif
|
||||
$$t/$$name.1 > $@-t \
|
||||
&& rm -rf $$t \
|
||||
&& chmod a-w $@-t \
|
||||
&& mv $@-t $@
|
||||
&& rm -f $@ && mv $@-t $@
|
||||
|
||||
2
man/rm.x
2
man/rm.x
@@ -1,7 +1,7 @@
|
||||
'\" Copyright (C) 1998-2017 Free Software Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
'\" of the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
|
||||
'\" There is NO WARRANTY, to the extent permitted by law.
|
||||
[NAME]
|
||||
rm \- remove files or directories
|
||||
|
||||
@@ -3,4 +3,4 @@ stat \- display file or file system status
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
[SEE ALSO]
|
||||
stat(2)
|
||||
stat(2), statfs(2)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'\" Copyright (C) 2009-2017 Free Software Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
'\" of the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
|
||||
'\" There is NO WARRANTY, to the extent permitted by law.
|
||||
[NAME]
|
||||
stdbuf \-
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
VERSION='2015-10-06 12:49' # UTC
|
||||
VERSION='2017-09-19 07:31' # UTC
|
||||
|
||||
# Building coreutils from a git-cloned directory may require versions of
|
||||
# tools like autoconf, automake, gettext, etc. that are newer than the ones
|
||||
@@ -26,12 +26,12 @@ prog_name=`basename $0`
|
||||
die () { echo "$prog_name: $*" >&2; exit 1; }
|
||||
|
||||
tarballs='
|
||||
http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
|
||||
http://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz
|
||||
http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
|
||||
http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
|
||||
http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz
|
||||
http://ftp.gnu.org/gnu/gettext/gettext-0.19.6.tar.gz
|
||||
https://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
|
||||
https://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz
|
||||
https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
|
||||
https://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
|
||||
https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz
|
||||
https://ftp.gnu.org/gnu/gettext/gettext-0.19.6.tar.gz
|
||||
'
|
||||
|
||||
usage() {
|
||||
|
||||
@@ -125,10 +125,13 @@ sub check_msg($$)
|
||||
|
||||
my $buf = join ("\n", @line) . "\n";
|
||||
$buf =~ m!https?://bugzilla\.redhat\.com/show_bug\.cgi\?id=(\d+)!s
|
||||
and return "use shorter http://bugzilla.redhat.com/$1";
|
||||
and return "use shorter https://bugzilla.redhat.com/$1";
|
||||
|
||||
$buf =~ m!https?://debbugs\.gnu\.org/(?:cgi/bugreport\.cgi\?bug=)?(\d+)!s
|
||||
and return "use shorter http://bugs.gnu.org/$1";
|
||||
and return "use shorter https://bugs.gnu.org/$1";
|
||||
|
||||
$buf =~ m!https://lists\.gnu\.org/archive/html/!s
|
||||
and return "use '/r/' in place of '/archive/html/' in lists.gnu.org URLs";
|
||||
|
||||
$buf =~ /^ *Signed-off-by:/mi
|
||||
and return q(do not use "Signed-off-by:");
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Simon Josefsson <simon@josefsson.org>. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
#include <getopt.h>
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at
|
||||
your option. The terms of these licenses can be found at:
|
||||
|
||||
- CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
|
||||
- CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
|
||||
- OpenSSL license : https://www.openssl.org/source/license.html
|
||||
- Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
|
||||
- Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
More information about the BLAKE2 hash function can be found at
|
||||
https://blake2.net.
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at
|
||||
your option. The terms of these licenses can be found at:
|
||||
|
||||
- CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
|
||||
- CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
|
||||
- OpenSSL license : https://www.openssl.org/source/license.html
|
||||
- Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
|
||||
- Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
More information about the BLAKE2 hash function can be found at
|
||||
https://blake2.net.
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at
|
||||
your option. The terms of these licenses can be found at:
|
||||
|
||||
- CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
|
||||
- CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
|
||||
- OpenSSL license : https://www.openssl.org/source/license.html
|
||||
- Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
|
||||
- Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
More information about the BLAKE2 hash function can be found at
|
||||
https://blake2.net.
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at
|
||||
your option. The terms of these licenses can be found at:
|
||||
|
||||
- CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
|
||||
- CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
|
||||
- OpenSSL license : https://www.openssl.org/source/license.html
|
||||
- Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
|
||||
- Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
More information about the BLAKE2 hash function can be found at
|
||||
https://blake2.net.
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at
|
||||
your option. The terms of these licenses can be found at:
|
||||
|
||||
- CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
|
||||
- CC0 1.0 Universal : https://creativecommons.org/publicdomain/zero/1.0
|
||||
- OpenSSL license : https://www.openssl.org/source/license.html
|
||||
- Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
|
||||
- Apache 2.0 : https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
More information about the BLAKE2 hash function can be found at
|
||||
https://blake2.net.
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Differences from the Unix cat:
|
||||
* Always unbuffered, -u is ignored.
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by David MacKenzie <djm@gnu.ai.mit.edu> */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Extracted from chown.c/chgrp.c and librarified by Jim Meyering. */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef CHOWN_CORE_H
|
||||
# define CHOWN_CORE_H
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Roland McGrath. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Q. Frank Xia, qx@math.columbia.edu.
|
||||
Cosmetic changes and reorganization by David MacKenzie, djm@gnu.ai.mit.edu.
|
||||
@@ -107,6 +107,11 @@ main (void)
|
||||
# include "die.h"
|
||||
# include "error.h"
|
||||
|
||||
static struct option const long_options[] =
|
||||
{
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
/* Number of bytes to read at once. */
|
||||
# define BUFLEN (1 << 16)
|
||||
|
||||
@@ -291,7 +296,7 @@ main (int argc, char **argv)
|
||||
|
||||
parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE, Version,
|
||||
usage, AUTHORS, (char const *) NULL);
|
||||
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
|
||||
if (getopt_long (argc, argv, "", long_options, NULL) != -1)
|
||||
usage (EXIT_FAILURE);
|
||||
|
||||
have_read_stdin = false;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Richard Stallman and David MacKenzie. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Extracted from cp.c and librarified by Jim Meyering. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Extracted from cp.c and librarified by Jim Meyering. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Alex Deymo <deymo@chromium.org>. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Alex Deymo <deymo@chromium.org>. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Alex Deymo <deymo@chromium.org>. */
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* coreutils.c aggregates the functionality of every other tool into a single
|
||||
binary multiplexed by the value of argv[0]. This is enabled by passing
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Torbjorn Granlund, Sweden (tege@sics.se).
|
||||
Rewritten to use lib/hash.c by Jim Meyering. */
|
||||
|
||||
2
src/cp.c
2
src/cp.c
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Stuart Kemp, cpsrk@groper.jcu.edu.au.
|
||||
Modified by David MacKenzie, djm@gnu.ai.mit.edu. */
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by David Ihnat. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
David MacKenzie <djm@gnu.ai.mit.edu> */
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# written by Jim Meyering
|
||||
|
||||
|
||||
147
src/dd.c
147
src/dd.c
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Rubin, David MacKenzie, and Stuart Kemp. */
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "fd-reopen.h"
|
||||
#include "gethrxtime.h"
|
||||
#include "human.h"
|
||||
#include "ioblksize.h"
|
||||
#include "long-options.h"
|
||||
#include "quote.h"
|
||||
#include "verror.h"
|
||||
@@ -45,6 +46,11 @@
|
||||
proper_name ("David MacKenzie"), \
|
||||
proper_name ("Stuart Kemp")
|
||||
|
||||
static struct option const long_options[] =
|
||||
{
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
/* Use SA_NOCLDSTOP as a proxy for whether the sigaction machinery is
|
||||
present. */
|
||||
#ifndef SA_NOCLDSTOP
|
||||
@@ -266,6 +272,9 @@ static sig_atomic_t volatile info_signal_count;
|
||||
/* Whether to discard cache for input or output. */
|
||||
static bool i_nocache, o_nocache;
|
||||
|
||||
/* Whether to instruct the kernel to discard the complete file. */
|
||||
static bool i_nocache_eof, o_nocache_eof;
|
||||
|
||||
/* Function used for read (to handle iflag=fullblock parameter). */
|
||||
static ssize_t (*iread_fnc) (int fd, char *buf, size_t size);
|
||||
|
||||
@@ -1000,7 +1009,8 @@ quit (int code)
|
||||
exit (code);
|
||||
}
|
||||
|
||||
/* Return LEN rounded down to a multiple of PAGE_SIZE
|
||||
/* Return LEN rounded down to a multiple of IO_BUFSIZE
|
||||
(to minimize calls to the expensive posix_fadvise(,POSIX_FADV_DONTNEED),
|
||||
while storing the remainder internally per FD.
|
||||
Pass LEN == 0 to get the current remainder. */
|
||||
|
||||
@@ -1013,7 +1023,7 @@ cache_round (int fd, off_t len)
|
||||
if (len)
|
||||
{
|
||||
uintmax_t c_pending = *pending + len;
|
||||
*pending = c_pending % page_size;
|
||||
*pending = c_pending % IO_BUFSIZE;
|
||||
if (c_pending > *pending)
|
||||
len = c_pending - *pending;
|
||||
else
|
||||
@@ -1033,55 +1043,65 @@ static bool
|
||||
invalidate_cache (int fd, off_t len)
|
||||
{
|
||||
int adv_ret = -1;
|
||||
off_t offset;
|
||||
bool nocache_eof = (fd == STDIN_FILENO ? i_nocache_eof : o_nocache_eof);
|
||||
|
||||
/* Minimize syscalls. */
|
||||
off_t clen = cache_round (fd, len);
|
||||
if (len && !clen)
|
||||
return true; /* Don't advise this time. */
|
||||
if (!len && !clen && max_records)
|
||||
return true; /* Nothing pending. */
|
||||
else if (! len && ! clen && ! nocache_eof)
|
||||
return true;
|
||||
off_t pending = len ? cache_round (fd, 0) : 0;
|
||||
|
||||
if (fd == STDIN_FILENO)
|
||||
{
|
||||
if (input_seekable)
|
||||
{
|
||||
/* Note we're being careful here to only invalidate what
|
||||
we've read, so as not to dump any read ahead cache. */
|
||||
#if HAVE_POSIX_FADVISE
|
||||
adv_ret = posix_fadvise (fd, input_offset - clen - pending, clen,
|
||||
POSIX_FADV_DONTNEED);
|
||||
#else
|
||||
errno = ENOTSUP;
|
||||
#endif
|
||||
}
|
||||
offset = input_offset;
|
||||
else
|
||||
errno = ESPIPE;
|
||||
{
|
||||
offset = -1;
|
||||
errno = ESPIPE;
|
||||
}
|
||||
}
|
||||
else if (fd == STDOUT_FILENO)
|
||||
else
|
||||
{
|
||||
static off_t output_offset = -2;
|
||||
|
||||
if (output_offset != -1)
|
||||
{
|
||||
if (0 > output_offset)
|
||||
{
|
||||
output_offset = lseek (fd, 0, SEEK_CUR);
|
||||
output_offset -= clen + pending;
|
||||
}
|
||||
if (0 <= output_offset)
|
||||
{
|
||||
#if HAVE_POSIX_FADVISE
|
||||
adv_ret = posix_fadvise (fd, output_offset, clen,
|
||||
POSIX_FADV_DONTNEED);
|
||||
#else
|
||||
errno = ENOTSUP;
|
||||
#endif
|
||||
output_offset += clen + pending;
|
||||
}
|
||||
if (output_offset < 0)
|
||||
output_offset = lseek (fd, 0, SEEK_CUR);
|
||||
else if (len)
|
||||
output_offset += clen + pending;
|
||||
}
|
||||
|
||||
offset = output_offset;
|
||||
}
|
||||
|
||||
if (0 <= offset)
|
||||
{
|
||||
if (! len && clen && nocache_eof)
|
||||
{
|
||||
pending = clen;
|
||||
clen = 0;
|
||||
}
|
||||
|
||||
/* Note we're being careful here to only invalidate what
|
||||
we've read, so as not to dump any read ahead cache.
|
||||
Note also the kernel is conservative and only invalidates
|
||||
full pages in the specified range. */
|
||||
#if HAVE_POSIX_FADVISE
|
||||
offset = offset - clen - pending;
|
||||
/* ensure full page specified when invalidating to eof. */
|
||||
if (clen == 0)
|
||||
offset -= offset % page_size;
|
||||
adv_ret = posix_fadvise (fd, offset, clen, POSIX_FADV_DONTNEED);
|
||||
#else
|
||||
errno = ENOTSUP;
|
||||
#endif
|
||||
}
|
||||
|
||||
return adv_ret != -1 ? true : false;
|
||||
}
|
||||
|
||||
@@ -1093,11 +1113,21 @@ static ssize_t
|
||||
iread (int fd, char *buf, size_t size)
|
||||
{
|
||||
ssize_t nread;
|
||||
static ssize_t prev_nread;
|
||||
|
||||
do
|
||||
{
|
||||
process_signals ();
|
||||
nread = read (fd, buf, size);
|
||||
/* Ignore final read error with iflag=direct as that
|
||||
returns EINVAL due to the non aligned file offset. */
|
||||
if (nread == -1 && errno == EINVAL
|
||||
&& 0 < prev_nread && prev_nread < size
|
||||
&& (input_flags & O_DIRECT))
|
||||
{
|
||||
errno = 0;
|
||||
nread = 0;
|
||||
}
|
||||
}
|
||||
while (nread < 0 && errno == EINTR);
|
||||
|
||||
@@ -1107,8 +1137,6 @@ iread (int fd, char *buf, size_t size)
|
||||
|
||||
if (0 < nread && warn_partial_read)
|
||||
{
|
||||
static ssize_t prev_nread;
|
||||
|
||||
if (0 < prev_nread && prev_nread < size)
|
||||
{
|
||||
uintmax_t prev = prev_nread;
|
||||
@@ -1121,10 +1149,9 @@ iread (int fd, char *buf, size_t size)
|
||||
prev);
|
||||
warn_partial_read = false;
|
||||
}
|
||||
|
||||
prev_nread = nread;
|
||||
}
|
||||
|
||||
prev_nread = nread;
|
||||
return nread;
|
||||
}
|
||||
|
||||
@@ -1168,15 +1195,19 @@ iwrite (int fd, char const *buf, size_t size)
|
||||
quotef (output_file));
|
||||
|
||||
/* Since we have just turned off O_DIRECT for the final write,
|
||||
here we try to preserve some of its semantics. First, use
|
||||
posix_fadvise to tell the system not to pollute the buffer
|
||||
cache with this data. Don't bother to diagnose lseek or
|
||||
posix_fadvise failure. */
|
||||
we try to preserve some of its semantics. */
|
||||
|
||||
/* Call invalidate_cache() to setup the appropriate offsets
|
||||
for subsequent calls. */
|
||||
o_nocache_eof = true;
|
||||
invalidate_cache (STDOUT_FILENO, 0);
|
||||
|
||||
/* Attempt to ensure that that final block is committed
|
||||
to disk as quickly as possible. */
|
||||
conversions_mask |= C_FSYNC;
|
||||
|
||||
/* After the subsequent fsync() we'll call invalidate_cache()
|
||||
to attempt to clear all data from the page cache. */
|
||||
}
|
||||
|
||||
while (total_written < size)
|
||||
@@ -1562,11 +1593,13 @@ scanargs (int argc, char *const *argv)
|
||||
if (input_flags & O_NOCACHE)
|
||||
{
|
||||
i_nocache = true;
|
||||
i_nocache_eof = (max_records == 0 && max_bytes == 0);
|
||||
input_flags &= ~O_NOCACHE;
|
||||
}
|
||||
if (output_flags & O_NOCACHE)
|
||||
{
|
||||
o_nocache = true;
|
||||
o_nocache_eof = (max_records == 0 && max_bytes == 0);
|
||||
output_flags &= ~O_NOCACHE;
|
||||
}
|
||||
}
|
||||
@@ -1687,7 +1720,7 @@ advance_input_offset (uintmax_t offset)
|
||||
The offending behavior has been confirmed with an Exabyte SCSI tape
|
||||
drive accessed via /dev/nst0 on both Linux 2.2.17 and 2.4.16 kernels. */
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined __linux__ && HAVE_SYS_MTIO_H
|
||||
|
||||
# include <sys/mtio.h>
|
||||
|
||||
@@ -2149,13 +2182,19 @@ dd_copy (void)
|
||||
else
|
||||
nread = iread_fnc (STDIN_FILENO, ibuf, input_blocksize);
|
||||
|
||||
if (nread >= 0 && i_nocache)
|
||||
invalidate_cache (STDIN_FILENO, nread);
|
||||
|
||||
if (nread == 0)
|
||||
break; /* EOF. */
|
||||
|
||||
if (nread < 0)
|
||||
if (nread > 0)
|
||||
{
|
||||
advance_input_offset (nread);
|
||||
if (i_nocache)
|
||||
invalidate_cache (STDIN_FILENO, nread);
|
||||
}
|
||||
else if (nread == 0)
|
||||
{
|
||||
i_nocache_eof |= i_nocache;
|
||||
o_nocache_eof |= o_nocache && ! (conversions_mask & C_NOTRUNC);
|
||||
break; /* EOF. */
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(conversions_mask & C_NOERROR) || status_level != STATUS_NONE)
|
||||
error (0, errno, _("error reading %s"), quoteaf (input_file));
|
||||
@@ -2194,7 +2233,6 @@ dd_copy (void)
|
||||
}
|
||||
|
||||
n_bytes_read = nread;
|
||||
advance_input_offset (nread);
|
||||
|
||||
if (n_bytes_read < input_blocksize)
|
||||
{
|
||||
@@ -2361,7 +2399,7 @@ main (int argc, char **argv)
|
||||
usage, AUTHORS, (char const *) NULL);
|
||||
close_stdout_required = false;
|
||||
|
||||
if (getopt_long (argc, argv, "", NULL, NULL) != -1)
|
||||
if (getopt_long (argc, argv, "", long_options, NULL) != -1)
|
||||
usage (EXIT_FAILURE);
|
||||
|
||||
/* Initialize translation table to identity translation. */
|
||||
@@ -2470,13 +2508,12 @@ main (int argc, char **argv)
|
||||
exit_status = EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
else if (max_records != (uintmax_t) -1)
|
||||
else
|
||||
{
|
||||
/* Invalidate any pending region less than page size,
|
||||
in case the kernel might round up. */
|
||||
if (i_nocache)
|
||||
/* Invalidate any pending region or to EOF if appropriate. */
|
||||
if (i_nocache || i_nocache_eof)
|
||||
invalidate_cache (STDIN_FILENO, 0);
|
||||
if (o_nocache)
|
||||
if (o_nocache || o_nocache_eof)
|
||||
invalidate_cache (STDOUT_FILENO, 0);
|
||||
}
|
||||
|
||||
|
||||
19
src/df.c
19
src/df.c
@@ -12,7 +12,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>.
|
||||
--human-readable option added by lm@sgi.com.
|
||||
@@ -1702,24 +1702,25 @@ main (int argc, char **argv)
|
||||
|
||||
if (optind < argc)
|
||||
{
|
||||
/* Open each of the given entries to make sure any corresponding
|
||||
/* stat each of the given entries to make sure any corresponding
|
||||
partition is automounted. This must be done before reading the
|
||||
file system table. */
|
||||
stats = xnmalloc (argc - optind, sizeof *stats);
|
||||
for (int i = optind; i < argc; ++i)
|
||||
{
|
||||
/* Prefer to open with O_NOCTTY and use fstat, but fall back
|
||||
on using "stat", in case the file is unreadable. */
|
||||
int fd = open (argv[i], O_RDONLY | O_NOCTTY);
|
||||
if ((fd < 0 || fstat (fd, &stats[i - optind]))
|
||||
&& stat (argv[i], &stats[i - optind]))
|
||||
if (stat (argv[i], &stats[i - optind]))
|
||||
{
|
||||
error (0, errno, "%s", quotef (argv[i]));
|
||||
exit_status = EXIT_FAILURE;
|
||||
argv[i] = NULL;
|
||||
}
|
||||
if (0 <= fd)
|
||||
close (fd);
|
||||
else if (! S_ISFIFO (stats[i - optind].st_mode))
|
||||
{
|
||||
/* open() is needed to automount in some cases. */
|
||||
int fd = open (argv[i], O_RDONLY | O_NOCTTY);
|
||||
if (0 <= fd)
|
||||
close (fd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user