search for: ext2fs_write_inode

Displaying 8 results from an estimated 8 matches for "ext2fs_write_inode".

2016 Jul 06
0
[PATCH] ext2: Don't load whole files into memory when copying to the appliance (RHBZ#1113065).
...static void ext2_clean_path (ext2_filsys fs, ext2_ino_t dir_ino, const char *dirname, const char *basename, int isdir); static void ext2_copy_file (struct ext2_data *data, const char *src, const char *dest); @@ -500,6 +501,81 @@ ext2_write_file (ext2_filsys fs, ext2_error_to_exception ("ext2fs_write_inode", err, filename); } +/* Same as ext2_write_file, but it copies the file contents from the + * host. You must create the file first with ext2_empty_inode, and + * the host file must be a regular file. + */ +static void +ext2_write_host_file (ext2_filsys fs, + ext2_ino_t...
2015 Dec 02
4
[PATCH 0/3] supermin: add --include-packagelist
Hi, to ease debugging issues with appliances (e.g. when used in libguestfs), using --include-packagelist will add a file containing the list of all the packages used. Thanks, Pino Toscano (3): ext2: add ext2fs_chmod and ext2fs_chown chroot: factor out file copy code Add --include-packagelist src/build.ml | 42 +++++++++++++++++++++++++------ src/chroot.ml | 29
2017 Jul 13
3
[PATCH supermin v2] ext2: Create symlinks properly (RHBZ#1470157).
...("ext2fs_file_close", err, filename); - - /* Update the true size in the inode. */ - struct ext2_inode inode; - err = ext2fs_read_inode (fs, ino, &inode); - if (err != 0) - ext2_error_to_exception ("ext2fs_read_inode", err, filename); - inode.i_size = size; - err = ext2fs_write_inode (fs, ino, &inode); - if (err != 0) - ext2_error_to_exception ("ext2fs_write_inode", err, filename); -} - -/* Same as ext2_write_file, but it copies the file contents from the - * host. You must create the file first with ext2_empty_inode, and - * the host file must be a regular f...
2017 Jul 12
3
[PATCH supermin] ext2: Create symlinks properly (RHBZ#1470157).
...("ext2fs_file_close", err, filename); - - /* Update the true size in the inode. */ - struct ext2_inode inode; - err = ext2fs_read_inode (fs, ino, &inode); - if (err != 0) - ext2_error_to_exception ("ext2fs_read_inode", err, filename); - inode.i_size = size; - err = ext2fs_write_inode (fs, ino, &inode); - if (err != 0) - ext2_error_to_exception ("ext2fs_write_inode", err, filename); -} - -/* Same as ext2_write_file, but it copies the file contents from the - * host. You must create the file first with ext2_empty_inode, and - * the host file must be a regular f...
2019 Feb 19
0
[PATCH nbdkit 4/4] Add linuxdisk plugin.
...r_message (err)); + return -1; + } + inode.i_mode = mode; + inode.i_uid = statbuf->st_uid; + inode.i_gid = statbuf->st_gid; + inode.i_ctime = statbuf->st_ctime; + inode.i_atime = statbuf->st_atime; + inode.i_mtime = statbuf->st_mtime; + /* XXX nanosecond times? */ + err = ext2fs_write_inode (fs, *ino, &inode); + if (err) { + nbdkit_error ("ext2fs_write_inode: %s", error_message (err)); + return -1; + } + + return 0; +} + +/* A wrapper around ext2fs_new_inode. This creates an inode and a + * directory entry and does some other bookkeeping. This is + * sufficien...
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...ext2fs_read_inode (fs, ino, &inode); - if (err != 0) - error (EXIT_FAILURE, 0, "ext2fs_read_inode: %s", error_message (err)); - inode.i_mode = mode; - inode.i_uid = uid; - inode.i_gid = gid; - inode.i_ctime = ctime; - inode.i_atime = atime; - inode.i_mtime = mtime; - err = ext2fs_write_inode (fs, ino, &inode); - if (err != 0) - error (EXIT_FAILURE, 0, "ext2fs_write_inode: %s", error_message (err)); -} - -void -ext2_empty_inode (ext2_ino_t dir_ino, const char *dirname, const char *basename, - mode_t mode, uid_t uid, gid_t gid, - time_t...
2019 Feb 19
6
[PATCH nbdkit v2 0/5] Add linuxdisk plugin.
Another interesting thing you can do with this plugin: https://rwmj.wordpress.com/2019/02/19/nbdkit-linuxdisk-plugin/ v2: - Fix inconsistent tab/space. - All 3 plugins now contain a block of text pointing to the other 2 plugins. - TMDIR -> TMPDIR - Unlink the temporary file and other cleanups along error paths. - fclose -> pclose, and check the return value for errors. -
2019 Feb 19
7
[PATCH nbdkit 0/4] New plugin: Add linuxdisk plugin.
Turns out Japanese trains are good for coding! In supermin we have a bunch of code to create the libguestfs appliance. It creates it directly using libext2fs (part of e2fsprogs). We can use the same technique to create ext2 virtual disks in nbdkit, which is what this new plugin does. Why a new plugin instead of modifying the floppy plugin? See the 4/4 commit message for an explanation. The