search for: ext2_data

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

Did you mean: ept_data
2014 Jul 30
2
[PATCH 1/3] ext2: create a struct for the OCaml 't' type
...file changed, 41 insertions(+), 36 deletions(-) diff --git a/src/ext2fs-c.c b/src/ext2fs-c.c index 70755c9..8eab24c 100644 --- a/src/ext2fs-c.c +++ b/src/ext2fs-c.c @@ -52,6 +52,11 @@ /* fts.h in glibc is broken, forcing us to use the GNUlib alternative. */ #include "fts_.h" +struct ext2_data +{ + ext2_filsys fs; +}; + static void initialize (void) __attribute__((constructor)); static void @@ -78,18 +83,18 @@ ext2_handle_closed (void) caml_failwith ("ext2fs: function called on a closed handle"); } -#define Ext2fs_val(v) (*((ext2_filsys *)Data_custom_val(v))) +#defin...
2016 Jan 22
1
[supermin] [PATCH] ext2: check for needed block size
...80a 100644 --- a/src/ext2fs-c.c +++ b/src/ext2fs-c.c @@ -52,6 +52,9 @@ /* fts.h in glibc is broken, forcing us to use the GNUlib alternative. */ #include "fts_.h" +/* How many blocks of size S are needed for storing N bytes. */ +#define ROUND_UP(N, S) (((N) + (S) - 1) / (S)) + struct ext2_data { ext2_filsys fs; @@ -629,6 +632,7 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char *dest) errcode_t err; struct stat statbuf; struct statvfs statvfsbuf; + size_t blocks; if (data->debug >= 3) printf ("supermin: ext2: copy_file %s -> %s\n&...
2016 Jul 06
0
[PATCH] ext2: Don't load whole files into memory when copying to the appliance (RHBZ#1113065).
...ar *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_ft); 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 ex...
2019 Nov 26
0
[PATCH supermin] ext2: Build symbolic links correctly (RHBZ#1770304).
...Toolybird for identifying the problem and kernel patch. --- src/ext2fs-c.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/ext2fs-c.c b/src/ext2fs-c.c index e8ab972..8903f74 100644 --- a/src/ext2fs-c.c +++ b/src/ext2fs-c.c @@ -782,12 +782,6 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char *dest) } /* Create a symlink. */ else if (S_ISLNK (statbuf.st_mode)) { - ext2_ino_t ino; - ext2_empty_inode (data->fs, dir_ino, dirname, basename, - statbuf.st_mode, statbuf.st_uid, statbuf.st_gid, - stat...
2016 Apr 14
1
[PATCH supermin] ext2: fix printf formatters
...rc/ext2fs-c.c +++ b/src/ext2fs-c.c @@ -31,6 +31,7 @@ #include <limits.h> #include <errno.h> #include <assert.h> +#include <inttypes.h> /* Inlining is broken in the ext2fs header file. Disable it by * defining the following: @@ -659,9 +660,9 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char *dest) */ blocks = ROUND_UP (statbuf.st_size, data->fs->blocksize); if (blocks > ext2fs_free_blocks_count (data->fs->super)) { - fprintf (stderr, "supermin: %s: needed %lu blocks (%d each) for " - "%lu...
2017 Jul 12
3
[PATCH supermin] ext2: Create symlinks properly (RHBZ#1470157).
...ode, and - * the host file must be a regular file. +/* 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, @@ -833,7 +792,8 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char *dest) ssize_t r = readlink (src, buf, sizeof buf); if (r == -1) unix_error (errno, (char *) "readlink", caml_copy_string (src)); - ext2_write_file (data->fs, ino, buf, r, dest); + buf[r] = '\0'; + ext2fs_symlink (dat...
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).
...e, and - * the host file must be a regular file. +/* 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, @@ -829,11 +788,17 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char *dest) statbuf.st_ctime, statbuf.st_atime, statbuf.st_mtime, 0, 0, EXT2_FT_SYMLINK, &ino); - char buf[PATH_MAX+1]; - ssize_t r = readlink (src, buf, sizeof buf); + char *buf = malloc (statbuf.st_size+1);...