lib: Add a helper to convert struct stat → GFileInfo
It's more natural for a few calling places. Prep for patches to go the other way, which in turn are prep for adding a commit filter v2 that takes `struct stat`. `ot_gfile_type_for_mode()` was only used in this function, so inline it here. Closes: #974 Approved by: jlebon
This commit is contained in:
1 parent
1a9a473580
commit
d57410a7e6
8 files changed
+58
-72
No files matched your search
@@ -21,6 +21,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "ostree-core.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@@ -88,7 +89,8 @@ _ostree_make_temporary_symlink_at (int tmp_dirfd,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
GFileInfo * _ostree_header_gfile_info_new (mode_t mode, uid_t uid, gid_t gid);
|
||||
GFileInfo * _ostree_stbuf_to_gfileinfo (const struct stat *stbuf);
|
||||
GFileInfo * _ostree_mode_uidgid_to_gfileinfo (mode_t mode, uid_t uid, gid_t gid);
|
||||
|
||||
static inline void
|
||||
_ostree_checksum_inplace_from_bytes_v (GVariant *csum_v, char *buf)
|
||||
|
||||
Reference in new issue
Block a user