Commit Graph

272 Commits

Author SHA1 Message Date
simonb 353a61bfae Deal with the case when a device gets recreated (eg when mtree is called by
MAKEDEV) and the stat buffer contains information about the original device
before checking/setting the owner/group/mode of the new device file.
2021-04-03 13:37:18 +00:00
cheusov 6e95ab06dc mtree: use POSIX type uint32_t instead of u_int32_t 2021-03-18 20:02:18 +00:00
wiz 20648b583d Use more markup. Bump date for previous. 2020-06-16 14:26:39 +00:00
sborrill 0a7bddaaad Describe correctly how whitespace is formatted as the docs did not
match the source.
2020-06-16 13:34:38 +00:00
wiz 40e56fc8f4 Use \(en. 2018-12-13 07:34:03 +00:00
dholland f71c1f4842 Fix naming inconsistency; PR 53769 from silas. 2018-12-13 03:18:18 +00:00
sevan 05de7c48c1 Adjust test, we only want to return the structure member if the result is not NULL.
Heads up by Sascha Wildner @ DragonFly BSD.
2018-11-18 23:03:36 +00:00
christos 09f2d229ee factor out common code from Poul-Henning Kamp. 2017-12-31 03:04:44 +00:00
christos ab39b7f428 use uintmax_t for nlink_t from FreeBSD 2017-12-14 18:34:41 +00:00
nakayama d1ef03659a Don't modify strings stored in hash, otherwise filling up of
directory hierarchy stops if the same hash value occurs in
directory and leaf.

Fix the issue that
"./usr/share/locale/pl/LC_MESSAGES/gettext-tools.mo" isn't included
in sets file in the case of MKUNPRIVED=no.
2017-09-07 04:04:13 +00:00
abhinav 8ab56b2aac Fix typo. 2017-02-22 14:15:15 +00:00
christos 50254b7c23 fix tools build. 2015-01-23 20:28:24 +00:00
wiz 91b18a3e92 Pull into this year. 2015-01-23 03:31:58 +00:00
christos 11e0521fb7 attempt to reset file flags when -rr 2015-01-23 02:27:01 +00:00
joerg 24a21ee034 st_nlink on Linux is not int, so add an explicit cast. 2015-01-07 20:50:36 +00:00
christos 859e855ece fix pasto; thanks John-Mark Gurney... 2014-10-27 21:46:45 +00:00
christos 5f78e43780 Pass a file pointer to write data instead of writing to stdout.
No functional change.
2014-04-24 17:22:41 +00:00
christos ef020f85b5 say why we can't use the password or the group databases. 2014-03-31 00:00:22 +00:00
christos 905fa31223 From Brooks Davis:
When comparing a directory to an mtree file NetBSD mtree has output like
this:

xxx:	size (4, 5)
	md5digest (0x6de9439834c9147569741d3c9c9fc010, 0xa5d119ab8edcda0ef7f381da8=
f52f92f)
=2E/yyy missing

FreeBSD's historical behavior is this:

xxx changed
	size expected 4 found 5
	md5digest expected 6de9439834c9147569741d3c9c9fc010 found a5d119ab8edcda0e=
f7f381da8f52f92f
=2E/yyy missing

FreeBSD's mergemaster -U command depends on the latter behavior so
the following patch alters the freebsd9 mode of mtree to output
that format.  I don't think programs should rely on this output one way
or another since it's clearly meant for humans, but this seems like the
easiest short term fix.
2013-11-21 18:39:50 +00:00
christos 4d024dddcc Our <sys/param.h> ends up calling header files that define intmax_t. This
should not be the case (but >sys/param.h> is not a standard header so all bets
are off). FreeBSD's does not, so explicitly include <stdint.h> to get it.
2013-10-17 17:22:59 +00:00
christos db2a5420b4 skip comment lines on password and group databases (Brooks Davis) 2013-10-16 17:27:42 +00:00
christos 7419876865 Default a bare "." with no type to F_DIR. For FreeBSD compatibility (Brooks
Davis)
2013-10-16 17:26:14 +00:00
christos 5c416430fc Restore old behavior of not printing sizes for directories, since it varies
depending on filesystem implementation. (Brooks Davis)
2013-10-16 17:24:20 +00:00
christos 60baa80007 use intmax_t instead of long long. fixes wrong cast for time_t. 2013-09-09 23:27:43 +00:00
christos 40d5816a68 move flags only used in main() inside main(), from Ed Schouten 2013-04-08 17:39:11 +00:00
christos c4e4c061b3 fill up the directory hierarchy so that leaf files are not ignored if
specified by themselves.
2013-02-05 00:59:03 +00:00
christos 8c4c80c2ef fix man page. 2013-02-03 19:16:06 +00:00
christos 6a0fd2f03e add the ability to only output paths included in a spec file when creating
from a directory (-c)
2013-02-03 19:15:16 +00:00
wiz 0d9af955c5 Typo fix. 2012-12-20 20:31:01 +00:00
wiz 4612bed094 Add missing letter and use x.y versions for Fx/Nx. 2012-12-20 20:17:26 +00:00
christos 357b749529 move flavor to misc.c because pax needs it. 2012-12-20 19:09:25 +00:00
mlelstv 821ebbb223 joerg@: just use unsigned int please 2012-12-20 18:58:37 +00:00
christos 3afc22d858 Implement the "flavor" output discussed in tech-userlevel@, by Brooks Davis 2012-12-20 16:43:16 +00:00
christos d80c5e8655 make us compatible with FreeBSD (for -n) (Brooks Davies) 2012-12-15 01:24:40 +00:00
christos 7f80b3db6a - No mention of -t in the usage message or the manpage SYNOPSIS (Brooks Davis) 2012-12-12 15:52:10 +00:00
christos 40e1da4105 - No "j" in the getopt string. (Brooks Davis) 2012-12-12 15:51:41 +00:00
christos d89c5e4d96 - two entries for rmd160digest in misc.c (Brooks Davis) 2012-12-12 15:51:04 +00:00
christos cbc85fc672 -n is incorrectly supressing the ".." lines. (Brooks Davis) 2012-12-12 15:50:35 +00:00
christos 0b112faa75 disable encoding of globbing characters for now. 2012-10-07 18:40:49 +00:00
wiz c4b7eb510b Sync usage with man page. 2012-10-05 09:18:08 +00:00
wiz 324794350b Fix typos; remove trailing whitespace; add missing options to SYNOPSIS. 2012-10-05 09:18:02 +00:00
wiz 519eb1daa9 Fix typo in comment. 2012-10-05 09:17:29 +00:00
christos b73d92b069 Implement FreeBSD's "nochange" keyworld which causes the existance of a
filesystem object to be checked but none of its attiributes.(brooks)
2012-10-05 01:31:05 +00:00
christos 23fe062937 Implement FreeBSD's "nochange" keyworld which causes the existance of a
filesystem object to be checked but none of its attributes. (brooks)
2012-10-05 01:30:36 +00:00
christos 1529f30b49 Encode literal global characters in files. Otherwise the results of
updating a directory using the resulting spec will be surprising.

See http://svnweb.freebsd.org/base/head/usr.sbin/mtree/test/test00.sh
for test cases.
(brooks)
2012-10-05 01:28:20 +00:00
christos 14b8803532 NetBSD needs <time.h> 2012-10-05 01:27:29 +00:00
christos 9e84d4e8c2 Implement FreeBSD's -f spec1 -f spec2 spec comparision function. This
is more useful than -C and diff because it highlights the keys that have
changed value so for example, you can see that the size of a file has
not changed but the contents have. (brooks)
2012-10-05 01:26:56 +00:00
christos d07df9451a Allow uid and uname or gid and gname to both be printed while
preserving the behavior of falling back to [ug]id when the name is not
resolvable. (brooks)
2012-10-05 01:21:44 +00:00
christos 09b2a8d434 clarify seconds.09nanoseconds format (brooks) 2012-10-05 01:19:54 +00:00
christos c80bcab895 add -j flag to indent directory blocks (from brooks) 2012-10-05 01:13:50 +00:00