mirror of
https://github.com/flatpak/flatpak.git
synced 2026-03-27 19:33:06 -04:00
fdio: Be const-correct for struct stat
We don't modify this struct (if non-NULL), so it can be const. In particular, this is helpful if calling glnx_file_copy_at() from nftw() to implement the equivalent of `cp -a --reflink=auto`. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
@@ -939,7 +939,7 @@ glnx_regfile_copy_bytes (int fdf, int fdt, off_t max_bytes)
|
||||
gboolean
|
||||
glnx_file_copy_at (int src_dfd,
|
||||
const char *src_subpath,
|
||||
struct stat *src_stbuf,
|
||||
const struct stat *src_stbuf,
|
||||
int dest_dfd,
|
||||
const char *dest_subpath,
|
||||
GLnxFileCopyFlags copyflags,
|
||||
|
||||
@@ -193,7 +193,7 @@ typedef enum {
|
||||
gboolean
|
||||
glnx_file_copy_at (int src_dfd,
|
||||
const char *src_subpath,
|
||||
struct stat *src_stbuf,
|
||||
const struct stat *src_stbuf,
|
||||
int dest_dfd,
|
||||
const char *dest_subpath,
|
||||
GLnxFileCopyFlags copyflags,
|
||||
|
||||
Reference in New Issue
Block a user