Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit57da2e5

Browse files
committed
rename "omit_symlink" flag to follow_symlink
1 parent3b97c4f commit57da2e5

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

‎src/dir.c‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static int BlackListCompare(const void *str1, const void *str2);
122122

123123
staticchardir_check_file(pgFile*file);
124124
staticvoiddir_list_file_internal(parray*files,pgFile*parent,boolexclude,
125-
boolomit_symlink,parray*black_list,
125+
boolfollow_symlink,parray*black_list,
126126
intexternal_dir_num,fio_locationlocation);
127127
staticvoidopt_path_map(ConfigOption*opt,constchar*arg,
128128
TablespaceList*list,constchar*type);
@@ -159,14 +159,14 @@ dir_create_dir(const char *dir, mode_t mode)
159159
}
160160

161161
pgFile*
162-
pgFileNew(constchar*path,constchar*rel_path,boolomit_symlink,
162+
pgFileNew(constchar*path,constchar*rel_path,boolfollow_symlink,
163163
intexternal_dir_num,fio_locationlocation)
164164
{
165165
structstatst;
166166
pgFile*file;
167167

168168
/* stat the file */
169-
if (fio_stat(path,&st,omit_symlink,location)<0)
169+
if (fio_stat(path,&st,follow_symlink,location)<0)
170170
{
171171
/* file not found is not an error case */
172172
if (errno==ENOENT)
@@ -445,11 +445,11 @@ BlackListCompare(const void *str1, const void *str2)
445445
* List files, symbolic links and directories in the directory "root" and add
446446
* pgFile objects to "files". We add "root" to "files" if add_root is true.
447447
*
448-
* Whenomit_symlink is true, symbolic link is ignored and only file or
448+
* Whenfollow_symlink is true, symbolic link is ignored and only file or
449449
* directory linked to will be listed.
450450
*/
451451
void
452-
dir_list_file(parray*files,constchar*root,boolexclude,boolomit_symlink,
452+
dir_list_file(parray*files,constchar*root,boolexclude,boolfollow_symlink,
453453
booladd_root,intexternal_dir_num,fio_locationlocation)
454454
{
455455
pgFile*file;
@@ -490,7 +490,7 @@ dir_list_file(parray *files, const char *root, bool exclude, bool omit_symlink,
490490
parray_qsort(black_list,BlackListCompare);
491491
}
492492

493-
file=pgFileNew(root,"",omit_symlink,external_dir_num,location);
493+
file=pgFileNew(root,"",follow_symlink,external_dir_num,location);
494494
if (file==NULL)
495495
{
496496
/* For external directory this is not ok */
@@ -512,7 +512,7 @@ dir_list_file(parray *files, const char *root, bool exclude, bool omit_symlink,
512512
if (add_root)
513513
parray_append(files,file);
514514

515-
dir_list_file_internal(files,file,exclude,omit_symlink,black_list,
515+
dir_list_file_internal(files,file,exclude,follow_symlink,black_list,
516516
external_dir_num,location);
517517

518518
if (!add_root)
@@ -731,7 +731,7 @@ dir_check_file(pgFile *file)
731731
*/
732732
staticvoid
733733
dir_list_file_internal(parray*files,pgFile*parent,boolexclude,
734-
boolomit_symlink,parray*black_list,
734+
boolfollow_symlink,parray*black_list,
735735
intexternal_dir_num,fio_locationlocation)
736736
{
737737
DIR*dir;
@@ -764,7 +764,7 @@ dir_list_file_internal(parray *files, pgFile *parent, bool exclude,
764764
join_path_components(child,parent->path,dent->d_name);
765765
join_path_components(rel_child,parent->rel_path,dent->d_name);
766766

767-
file=pgFileNew(child,rel_child,omit_symlink,external_dir_num,
767+
file=pgFileNew(child,rel_child,follow_symlink,external_dir_num,
768768
location);
769769
if (file==NULL)
770770
continue;
@@ -821,7 +821,7 @@ dir_list_file_internal(parray *files, pgFile *parent, bool exclude,
821821
* recursively.
822822
*/
823823
if (S_ISDIR(file->mode))
824-
dir_list_file_internal(files,file,exclude,omit_symlink,
824+
dir_list_file_internal(files,file,exclude,follow_symlink,
825825
black_list,external_dir_num,location);
826826
}
827827

‎src/pg_probackup.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ extern const char* deparse_compress_alg(int alg);
587587

588588
/* in dir.c */
589589
externvoiddir_list_file(parray*files,constchar*root,boolexclude,
590-
boolomit_symlink,booladd_root,intexternal_dir_num,fio_locationlocation);
590+
boolfollow_symlink,booladd_root,intexternal_dir_num,fio_locationlocation);
591591

592592
externvoidcreate_data_directories(parray*dest_files,
593593
constchar*data_dir,
@@ -620,7 +620,7 @@ extern bool fileExists(const char *path, fio_location location);
620620
externsize_tpgFileSize(constchar*path);
621621

622622
externpgFile*pgFileNew(constchar*path,constchar*rel_path,
623-
boolomit_symlink,intexternal_dir_num,
623+
boolfollow_symlink,intexternal_dir_num,
624624
fio_locationlocation);
625625
externpgFile*pgFileInit(constchar*path,constchar*rel_path);
626626
externvoidpgFileDelete(pgFile*file);

‎src/utils/file.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ int fio_fstat(int fd, struct stat* st)
663663
}
664664

665665
/* Get information about file */
666-
intfio_stat(charconst*path,structstat*st,boolfollow_symlinks,fio_locationlocation)
666+
intfio_stat(charconst*path,structstat*st,boolfollow_symlink,fio_locationlocation)
667667
{
668668
if (fio_is_remote(location))
669669
{
@@ -672,7 +672,7 @@ int fio_stat(char const* path, struct stat* st, bool follow_symlinks, fio_locati
672672

673673
hdr.cop=FIO_STAT;
674674
hdr.handle=-1;
675-
hdr.arg=follow_symlinks;
675+
hdr.arg=follow_symlink;
676676
hdr.size=path_len;
677677

678678
IO_CHECK(fio_write_all(fio_stdout,&hdr,sizeof(hdr)),sizeof(hdr));
@@ -691,7 +691,7 @@ int fio_stat(char const* path, struct stat* st, bool follow_symlinks, fio_locati
691691
}
692692
else
693693
{
694-
returnfollow_symlinks ?stat(path,st) :lstat(path,st);
694+
returnfollow_symlink ?stat(path,st) :lstat(path,st);
695695
}
696696
}
697697

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp