| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* lib/backup-internal.h, lib/backupfile.h:
Add malloc-related attributes and include stdlib.h as needed.
|
|
|
|
|
|
| |
* lib/*.{h,c}: Use GPLv3+ notice whenever the module description says
so.
* build-aux/pmccabe.css: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New module opendirat with code taken from fts.
Use this module to let backupfile use a directory file descriptor.
* NEWS: Document the incompatible change.
* lib/backup-find.c (find_backup_file_name):
* lib/backup-rename.c (backup_file_rename):
New arg DIR_FD.
* lib/backupfile.c: Include stdint.h, for SIZE_MAX.
(SIZE_MAX): Remove.
Include opendirat.h rather than dirent--.h.
(check_extension): New args DIR_FD and BASE_MAX. All callers changed.
(numbered_backup): New args DIR_FD and PNEW_FD. All callers changed.
(backupfile_internal): New arg DIR_FD. All callers changed.
* lib/fts.c: Include opendirat.h.
(opendirat): Move to opendirat.c.
* lib/opendirat.c, lib/opendirat.h, modules/opendirat: New files.
* modules/backupfile (Depends-on): Remove dirfd, opendir.
Add opendirat.
* modules/fts (Depends-on): Remove fdopendir, openat-safer.
Add opendirat.
|
|
It is like backupfile, except it avoids some race conditions,
and it does not output to stderr or exit.
* MODULES.html.sh: Add backup-rename.
* lib/backup-find.c, lib/backup-internal.h, lib/backup-rename.c:
* modules/backup-rename: New files.
* lib/backupfile.c: Turn this into an internals file, which
contains code common to backupfile and backup_rename. Do not
include argmatch.h or xalloc.h: include xalloc-oversized.h.
Include renameat2.h and fcntl.h.
(BACKUP_NOMEM): New constant.
(numbered_backup): New args BASE_OFFSET and *DIRPP. Do not exit
on memory exhaustion; just return BACKUP_NOMEM. Caller changed.
(backupfile_internal): Rename from find_backup_file_name.
Support new arg RENAME.
(backup_args, backup_types, get_version, xget_version):
Move to lib/backup-find.c.
* lib/backupfile.h (backup_file_rename): New decl.
* modules/backupfile (Files): Add lib/backup-internal.h,
lib/backup-find.c.
(Depends-on): Add dirfd, fcntl, renameat2.
(lib_SOURCES): Add backup-find.c.
|