similar to: How to get file info of a directory in linux kernel space?

Displaying 20 results from an estimated 2000 matches similar to: "How to get file info of a directory in linux kernel space?"

2018 Oct 30
1
Re: [PATCH nbdkit 4/4] Add floppy plugin.
On 10/30/18 11:42 AM, Richard W.M. Jones wrote: > >>> + errno = 0; >>> + while ((d = readdir (DIR)) != NULL) { >>> + if (strcmp (d->d_name, ".") == 0 || >>> + strcmp (d->d_name, "..") == 0) >>> + continue; strcmp() leaves errno alone (well, POSIX doesn't guarantee that, but no sane implementation of
2018 Oct 30
2
Re: [PATCH nbdkit 4/4] Add floppy plugin.
On 10/28/18 5:13 AM, Richard W.M. Jones wrote: > Create a virtual FAT-formatted floppy disk from a directory of files. > > For example: > > nbdkit floppy /path/to/directory > > The implementation of this is quite different from nbdkit-iso-plugin > since we cannot use an external program. Instead this plugin > synthesizes the MBR partition and FAT32 structures that
2016 Jun 14
1
[PATCH supermin] init: Delete initramfs files before chrooting into the appliance.
After supermin has finished running, the initramfs files sit around occupying swappable memory but serving no further purpose. This saves a little memory, at the cost of about 1ms of extra boot time. --- init/init.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/init/init.c b/init/init.c index 733d66e..5ac53e9 100644 ---
2009 Aug 03
2
[PATCH] New commands to list devices by UUID and label
This isn't very well tested at the moment because my main testing machine is broken. So just for comment, only to be applied with caution. This patch has two new commands which make it much easier to look up filesystems by their UUID or label. They are: list-devices-by-uuid list-devices-by-label Each returns a hashtable (or whatever the equivalent structure is in your favourite
2009 Jun 03
0
How to get all the sectors of a file in domU?
hi, all when domU read a file , it will put request into request queue, and the request contain all the sectors number need to read. use req->bio->bi_sector can get the first sector. but how to get all the sectors of the file? -- Best regards, 张树坤 北京理工大学,计算机科学技术学院 Sucan Computer Department,Beijing Institute of Technology,China _______________________________________________ Xen-devel
2017 Feb 14
4
[PATCH v2 0/2] GCC 7: Misc fixes
v1 -> v2: - Use intprops macro suggested by danpb. Rich.
2017 Feb 14
2
[PATCH 1/2] GCC 7: Add __attribute__((noreturn)) to some usage functions which call exit.
This happens with GCC 7.0.1. The errors were all of the form: qemu-speed-test.c: In function 'main': qemu-speed-test.c:153:7: error: this statement may fall through [-Werror=implicit-fallthrough=] usage (EXIT_SUCCESS); ^~~~~~~~~~~~~~~~~~~~ qemu-speed-test.c:155:5: note: here default: ^~~~~~~ --- builder/index-validate.c | 2 +-
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
2003 Jan 07
1
klibc-0.72 released
This adds [f]getc() and fgets() for parsing config files. Probably hard to avoid. Still trying to decide if I actually want to add system() or not. -hpa
2011 Aug 17
2
[PATCH] btrfs: fix d_off in the first dirent
Since the d_off in the first dirent for "." (that originates from the 4th argument "offset" of filldir() for the 2nd dirent for "..") is wrongly assigned in btrfs_real_readdir(), telldir returns same offset for different locations. | # mkfs.btrfs /dev/sdb1 | # mount /dev/sdb1 fs0 | # cd fs0 | # touch file0 file1 | # ../test | telldir: 0 | readdir: d_off = 2,
2002 Apr 03
2
cross compilation?
../openssh-3.1p1/configure --host=mips-linux --build=i686-linux --with-pam does not work. It selects the correct toolchain prefix, but the configure script bails on cross-compilation. Attached is a patch that *might* make the right paranoid assumptions, but I am not positive. -- bryan --- configure.ac.orig Tue Feb 26 22:12:35 2002 +++ configure.ac Wed Mar 27 14:28:02 2002 @@ -437,20 +437,6
2016 Feb 17
8
[PATCH supermin 0/2] Allow an alternate libc to be used for init.
v1 -> v2: - If we split out the init program into a separate init/ directory, that makes it much easier to build against an alternate libc. I tried to build against uClibc, but uClibc requires an entire build chain, which looked like it was going to be a massive ballache. Rich.
2010 Mar 11
2
[PATCH FOR DISCUSSION ONLY] Rewrite libguestfs-supermin-helper in C.
This needs loads more testing before we include it. However it's in good shape for testing and review. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/ -------------- next part
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
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. -
2017 Feb 14
0
[PATCH 2/2] GCC 7: Allocate sufficient space for sprintf output.
GCC 7.0.1 can determine if there is likely to be sufficient space in the output buffer when using sprintf/snprintf, based on the format string. The errors were all either of this form: bindtests.c:717:29: error: '%zu' directive output may be truncated writing between 1 and 19 bytes into a region of size 16 [-Werror=format-truncation=] snprintf (strs[i], 16, "%zu", i);
2009 Aug 06
1
[PATCH] Fix errno check in readdir in devsparts.c
--- daemon/devsparts.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index b89682c..e9c5e8f 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -40,7 +40,6 @@ foreach_block_device (block_dev_func_t func) int size = 0, alloc = 0; DIR *dir; - struct dirent *d; int err = 0; dir = opendir
2017 Feb 14
0
[PATCH v2 2/2] GCC 7: Allocate sufficient space for sprintf output.
GCC 7.0.1 can determine if there is likely to be sufficient space in the output buffer when using sprintf/snprintf, based on the format string. The errors were all either of this form: bindtests.c:717:29: error: '%zu' directive output may be truncated writing between 1 and 19 bytes into a region of size 16 [-Werror=format-truncation=] snprintf (strs[i], 16, "%zu", i);
2013 Apr 25
1
[syslinux:rockridge] iso9660.c did not copy terminating 0 of Rock Ridge name
On 04/25/2013 07:03 AM, syslinux-bot for Thomas Schmitt wrote: > Commit-ID: 5de463f724da515fd6c5ea49ded6dde178362181 > Gitweb: http://www.syslinux.org/commit/5de463f724da515fd6c5ea49ded6dde178362181 > Author: Thomas Schmitt <scdbackup at gmx.net> > AuthorDate: Thu, 4 Apr 2013 20:02:37 +0200 > Committer: Matt Fleming <matt.fleming at intel.com> > CommitDate:
2018 Oct 30
0
Re: [PATCH nbdkit 4/4] Add floppy plugin.
On Tue, Oct 30, 2018 at 09:12:55AM -0500, Eric Blake wrote: > >+/* Used for dealing with VFAT LFNs when creating a directory. */ > >+struct lfn { > >+ const char *name; /* Original Unix filename. */ > >+ char short_base[8]; /* Short basename. */ > >+ char short_ext[3]; /* Short file extension. */ > >+ char *lfn;