Displaying 5 results from an estimated 5 matches for "ext2_write_file".
2017 Jul 12
3
[PATCH supermin] ext2: Create symlinks properly (RHBZ#1470157).
...created
before:
https://bugzilla.redhat.com/show_bug.cgi?id=1470157#c4
This changes the code to use the ext2fs_symlink function instead which
creates fast and slow symlinks properly.
This fix is required if you use supermin with any Linux kernel >= 4.13.
The actual fix is two lines replacing ext2_write_file with a simpler
call to ext2fs_symlink. The majority of this fix is removing the
ext2_write_file function which is no longer referenced after that
change.
Thanks: Eric Sandeen
---
src/ext2fs-c.c | 50 +++++---------------------------------------------
1 file changed, 5 insertions(+), 45 deletions...
2014 Jul 30
2
[PATCH 1/3] ext2: create a struct for the OCaml 't' type
...dle_closed ();
- err = ext2fs_read_bitmaps (fs);
+ err = ext2fs_read_bitmaps (data.fs);
if (err != 0)
ext2_error_to_exception ("ext2fs_read_bitmaps", err, NULL);
@@ -173,7 +178,7 @@ static void ext2_empty_inode (ext2_filsys fs, ext2_ino_t dir_ino, const char *di
static void ext2_write_file (ext2_filsys fs, ext2_ino_t ino, const char *buf, size_t size, const char *filename);
static void ext2_link (ext2_filsys fs, ext2_ino_t dir_ino, const char *basename, ext2_ino_t ino, int dir_ft);
static void ext2_clean_path (ext2_filsys fs, ext2_ino_t dir_ino, const char *dirname, const char *bas...
2016 Jul 06
0
[PATCH] ext2: Don't load whole files into memory when copying to the appliance (RHBZ#1113065).
...time_t ctime, time_t atime, time_t mtime);
static void ext2_empty_inode (ext2_filsys fs, ext2_ino_t dir_ino, const char *dirname, const char *basename, mode_t mode, uid_t uid, gid_t gid, time_t ctime, time_t atime, time_t mtime, int major, int minor, int dir_ft, ext2_ino_t *ino_ret);
static void ext2_write_file (ext2_filsys fs, ext2_ino_t ino, const char *buf, size_t size, const char *filename);
+static void ext2_write_host_file (ext2_filsys fs, ext2_ino_t ino, const char *src, const char *filename);
static void ext2_link (ext2_filsys fs, ext2_ino_t dir_ino, const char *basename, ext2_ino_t ino, int dir_...
2017 Jul 13
3
[PATCH supermin v2] ext2: Create symlinks properly (RHBZ#1470157).
...time_t ctime, time_t atime, time_t mtime);
static void ext2_empty_inode (ext2_filsys fs, ext2_ino_t dir_ino, const char *dirname, const char *basename, mode_t mode, uid_t uid, gid_t gid, time_t ctime, time_t atime, time_t mtime, int major, int minor, int dir_ft, ext2_ino_t *ino_ret);
-static void ext2_write_file (ext2_filsys fs, ext2_ino_t ino, const char *buf, size_t size, const char *filename);
static void ext2_write_host_file (ext2_filsys fs, ext2_ino_t ino, const char *src, const char *filename);
static void ext2_link (ext2_filsys fs, ext2_ino_t dir_ino, const char *basename, ext2_ino_t ino, int dir_...
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...0)
- error (EXIT_FAILURE, 0, "ext2fs_write_inode: %s", error_message (err));
-
- ext2_link (dir_ino, basename, ino, dir_ft);
-
- ext2fs_inode_alloc_stats2 (fs, ino, 1, 0);
-
- if (ino_ret)
- *ino_ret = ino;
-}
-
-/* You must create the file first with ext2_empty_inode. */
-void
-ext2_write_file (ext2_ino_t ino, const char *buf, size_t size,
- const char *orig_filename)
-{
- errcode_t err;
- ext2_file_t file;
- err = ext2fs_file_open2 (fs, ino, NULL, EXT2_FILE_WRITE, &file);
- if (err != 0)
- error (EXIT_FAILURE, 0, "ext2fs_file_open2: %s: %s",
-...