Displaying 20 results from an estimated 22 matches for "guestfs_file".
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of
local disk.
Rich.
2015 Jun 19
2
boot loader detection
Hello,
I was looking for a way to detect the installed boot loader of an image
and I found this: https://github.com/arvidjaar/bootinfoscript
This script will inspection a lot of things on a running system and will
output a Report. The most interesting part is that it uses known Master
and Volume Boot Record byte-patterns to determine the installed boot loader:
2015 Jun 19
0
Re: boot loader detection
...s some sort of detection like this:
# file -bsL /dev/sdb
DOS/MBR boot sector; partition 1 : ID=0x83, start-CHS (0x0,32,33), end-CHS (0xce,29,63), startsector 2048, 250067632 sectors, extended partition table (last)
Adding it to file means it will be available in libguestfs automatically
(via 'guestfs_file' API), and means it would be generally useful
to other people as well.
However I'm not opposed to adding it to libguestfs if for some reason
it's not possible to add this to file.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programm...
2009 Jul 28
1
[PATCH] guestfs_file_arch command
This patch adds a new function, guestfs_file_arch, which is like
guestfs_file but specifically intended to determine the architecture
of binaries and libraries.
Usage is:
guestfs_file_arch (g, "/bin/ls")
==> "x86_64" (or whatever)
What it can do:
- ELF binaries
- ELF shared libraries
- Windows Win32 and Wi...
2013 Jan 25
4
[PATCH 0/3] Use __attribute__((cleanup(...)))
This patch series changes a small part of the library to use
__attribute__((cleanup(...))) to automatically free memory when
pointers go out of the current scope.
In general terms this seems to be a small win although you do have to
use it carefully. For functions where you can completely get rid of
the "exit code paths", it can simplify things. For a good example,
see the
2010 Aug 02
5
[PATCH v3 0/5] Inspection code in C
The first three patches were posted previously:
https://www.redhat.com/archives/libguestfs/2010-July/msg00082.html
The last two patches in this series change guestfish -i to use
this new code.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to
2010 Jul 29
4
[PATCH 0/3] Inspection code in C
These three patches (two were previously posted) can do simple
operating system inspection in C.
Example of use:
><fs> add-ro rhel55.img
><fs> run
><fs> inspect-os
/dev/VolGroup00/LogVol00
><fs> inspect-get-type /dev/VolGroup00/LogVol00
linux
><fs> inspect-get-distro /dev/VolGroup00/LogVol00
rhel
><fs> inspect-get-arch
2010 Aug 17
8
[PATCH v4 0/8] Inspection code in C
Previously discussed here:
https://www.redhat.com/archives/libguestfs/2010-August/msg00002.html
--
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/
2019 Aug 12
1
[PATCH] Fix small issues in documentations of APIs
...od>.
+This command runs L<file(1)> after first decompressing C<path>
+using C<meth>.
-C<method> must be one of C<gzip>, C<compress> or C<bzip2>.
+C<meth> must be one of C<gzip>, C<compress> or C<bzip2>.
Since 1.0.63, use C<guestfs_file> instead which can now
process compressed files." };
@@ -390,7 +390,7 @@ process compressed files." };
];
shortdesc = "return lines matching a pattern";
longdesc = "\
-This calls the external C<egrep> program and returns the
+This calls the external...
2017 Jul 14
0
[PATCH 12/27] daemon: Reimplement ‘file_architecture’ API in OCaml.
...intf");
- return NULL;
- }
-
- if (strstr (file, "gzip"))
- method = "zcat";
- else if (strstr (file, "bzip2"))
- method = "bzcat";
- else
- method = "cat";
-
- /* Security: Refuse to download initrd if it is huge. */
- size = guestfs_filesize (g, path);
- if (size == -1 || size > 100000000) {
- error (g, _("size of %s unreasonable (%" PRIi64 " bytes)"),
- path, size);
- goto out;
- }
-
- if (mkdtemp (dir) == NULL) {
- perrorf (g, "mkdtemp");
- goto out;
- }
-
- initrd = saf...
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...gth %d\n",
entry[i].attrname, entry[i].attrval.attrval_len);
diff --git a/examples/to-xml.c b/examples/to-xml.c
index 4317619..ee1b3bf 100644
--- a/examples/to-xml.c
+++ b/examples/to-xml.c
@@ -120,7 +120,7 @@ display_partition (guestfs_h *g, const char *dev)
CALL (what = guestfs_file (g, dev), NULL);
- if (strcmp (what, "x86 boot sector") == 0)
+ if (STREQ (what, "x86 boot sector"))
/* This is what 'file' program shows for Windows/NTFS partitions. */
printf ("<windows/>\n");
else if (strstr (what, "boot sector&quo...
2017 Jun 03
12
[PATCH v2 00/12] Allow APIs to be implemented in OCaml.
Version 1 was here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00003.html
This patch series reimplements a few more APIs in OCaml, including
some very important core APIs like ?list_filesystems? and ?mount?.
All the tests pass after this.
The selection of APIs that I have moved may look a little random, but
in fact they are all APIs consumed by the inspection code (and some
more
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change.
I'll get back to that series shortly ;-)
It turned into a factorization and constification exercise
during which I got a taste of ocaml. Thanks to Rich Jones
for help with a few snippets in generator.ml.
The overall result is that many previously-manually-maintained
bits from daemon/*.c functions are now hoisted into the automatically-
2017 Jun 05
19
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
v2 was here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00008.html
This series gets as far as a working (and faster) reimplementation of
‘guestfs_list_filesystems’.
I also have another patch series on top of this one which reimplements
the inspection APIs inside the daemon, but that needs a bit more work
still, since inspection turns out to be a very large piece of code.
Rich.
2017 Feb 18
8
[PATCH 0/6] generator: Split up generator/actions.ml
Split up the huge generator/actions.ml into several smaller files.
Rich.
2017 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned:
- Added the Optgroups module as suggested.
- Remove command temporary files.
- Replace command ~flags with ?fold_stdout_on_stderr.
- Nest _with_mounted function.
- Rebase & retest.
Rich.
2017 Jul 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
v1 was posted here:
https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html
This series now depends on two small patches which I posted separately:
https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html
https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html
v1 -> v2:
- Previously changes to generator/daemon.ml were made incrementally
through the patch
2017 Jul 14
45
[PATCH 00/27] Reimplement many daemon APIs in OCaml.
Previously posted as part of the mega utilities/inspection
series here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00232.html
What I've done is to extract just the parts related to rewriting
daemon APIs in OCaml, rebase them on top of the current master, fix a
few things, and recompile and test everything.
Rich.
2017 Jun 12
32
[PATCH v5 00/32] Refactor utilities, implement some APIs in OCaml.
This is a combination of:
https://www.redhat.com/archives/libguestfs/2017-June/msg00046.html
[PATCH 00/12] Refactor utility functions.
plus:
https://www.redhat.com/archives/libguestfs/2017-June/msg00023.html
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
with the second patches rebased on top of the utility refactoring, and
some other adjustments and extensions.
This passes
2017 Jun 19
29
[PATCH v7 00/29] Reimplement inspection in the daemon.
v6 was posted here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html
and this requires the utilities refactoring posted here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html
Inspection is now complete[*], although not very well tested. I'm
intending to compare the output of many guests using old & new
virt-inspector to see if I can find any