Displaying 5 results from an estimated 5 matches for "extend_dir_t".
2020 Apr 15
0
[PATCH nbdkit 2/9] floppy, iso, split, ssh: Use new vector type to store lists of strings.
...7 @@ static void set_times (const struct stat *statbuf, struct dir_entry *entry);
static int convert_long_file_names (struct lfn *lfns, size_t n);
static int convert_to_utf16le (const char *name, char **out, size_t *output_len);
static void free_lfns (struct lfn *lfns, size_t n);
-static ssize_t extend_dir_table (size_t di, struct virtual_floppy *floppy);
+static ssize_t append_dir_table (size_t di, const struct dir_entry *entry, struct virtual_floppy *floppy);
/* Create the on disk directory table for dirs[di]. */
int
@@ -178,10 +178,9 @@ add_volume_label (const char *label, size_t di, struct virt...
2018 Oct 28
0
[PATCH nbdkit 4/4] Add floppy plugin.
...y);
+static void set_times (const struct stat *statbuf, struct dir_entry *entry);
+static int convert_long_file_names (struct lfn *lfns, size_t n);
+static int convert_to_utf16le (const char *name, char **out, size_t *output_len);
+static void free_lfns (struct lfn *lfns, size_t n);
+static ssize_t extend_dir_table (size_t di, struct virtual_floppy *floppy);
+
+/* Create the on disk directory table for dirs[di]. */
+int
+create_directory (size_t di, const char *label,
+ struct virtual_floppy *floppy)
+{
+ size_t i;
+ const size_t nr_subdirs = floppy->dirs[di].nr_subdirs;
+ const siz...
2018 Oct 28
6
[PATCH nbdkit 0/4] Add floppy plugin.
Add nbdkit-floppy-plugin, “inspired” by qemu's VVFAT driver, but
without the ability to handle writes.
The implementation is pretty complete, supporting FAT32, LFNs, volume
labels, timestamps, etc, and it passes both ‘make check’ and ‘make
check-valgrind’.
Usage is simple; to serve the current directory:
$ nbdkit floppy .
Then using guestfish (or any NBD client):
$ guestfish --ro
2018 Oct 30
2
Re: [PATCH nbdkit 4/4] Add floppy plugin.
...lfn_entry.checksum = checksum;
> +
> + /* Copy the name portion to the fields in the LFN entry. */
> + memcpy (lfn_entry.name1, &s[0], 5*2);
> + memcpy (lfn_entry.name2, &s[5], 6*2);
> + memcpy (lfn_entry.name3, &s[11], 2*2);
And again.
> +
> + i = extend_dir_table (di, floppy);
> + if (i == -1)
> + return -1;
> + memcpy (&floppy->dirs[di].table[i], &lfn_entry, sizeof (struct dir_entry));
> + }
> +
> + /* Create the 8.3 (short name / DOS-compatible) entry. */
> + memset (&entry, 0, sizeof entry);
> + m...
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated!
The basic purpose of the patch series is to set $nbdkit_stdio_safe to
"0" or "1" in sh and eval plugin scripts.
To do that, I ended up adding a nicer way to manipulate environ lists,
and to do that, I ended up adding a whole generic vector
implementation which is applicable in a lot of different places.