mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-23 07:31:31 +00:00
The last commit was bogus...the putenv doesn't affect the parent process,
so the BLOCKSIZE doesn't need to be preserved.
This commit is contained in:
parent
ebf93438bf
commit
2150dea8de
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2040
@ -66,13 +66,12 @@ main(argc, argv)
|
||||
FTS *fts;
|
||||
FTSENT *p;
|
||||
long blocksize;
|
||||
char *oldbsize = NULL;
|
||||
int ftsoptions, listdirs, listfiles;
|
||||
int Hflag, Lflag, Pflag, aflag, ch, notused, rval, sflag, kflag;
|
||||
int Hflag, Lflag, Pflag, aflag, ch, notused, rval, sflag;
|
||||
char **save;
|
||||
|
||||
save = argv;
|
||||
Hflag = Lflag = Pflag = aflag = sflag = kflag = 0;
|
||||
Hflag = Lflag = Pflag = aflag = sflag = 0;
|
||||
ftsoptions = FTS_PHYSICAL;
|
||||
while ((ch = getopt(argc, argv, "HLPaksx")) != EOF)
|
||||
switch (ch) {
|
||||
@ -92,7 +91,7 @@ main(argc, argv)
|
||||
aflag = 1;
|
||||
break;
|
||||
case 'k':
|
||||
kflag = 1;
|
||||
putenv("BLOCKSIZE=1024");
|
||||
break;
|
||||
case 's':
|
||||
sflag = 1;
|
||||
@ -143,13 +142,7 @@ main(argc, argv)
|
||||
argv[1] = NULL;
|
||||
}
|
||||
|
||||
if (kflag) {
|
||||
oldbsize = getenv("BLOCKSIZE");
|
||||
putenv("BLOCKSIZE=1k");
|
||||
}
|
||||
(void)getbsize(¬used, &blocksize);
|
||||
if (oldbsize)
|
||||
putenv(oldbsize);
|
||||
blocksize /= 512;
|
||||
|
||||
if ((fts = fts_open(argv, ftsoptions, NULL)) == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user