search for: is_swap

Displaying 20 results from an estimated 21 matches for "is_swap".

2013 Feb 07
2
[PATCH 1/2] Fix bogus partition number passed to guestfs___check_for_filesystem_on
...d * another entry in g->fses. */ int -guestfs___check_for_filesystem_on (guestfs_h *g, const char *device, - int is_block, int is_partnum) +guestfs___check_for_filesystem_on (guestfs_h *g, const char *device) { - CLEANUP_FREE char *vfs_type = NULL; - int is_swap, r; - struct inspect_fs *fs; + int r; /* Get vfs-type in order to check if it's a Linux(?) swap device. * If there's an error we should ignore it, so to do that we have to * temporarily replace the error handler with a null one. */ guestfs_push_error_handler (g, NULL,...
2013 Jan 24
2
[PATCH 1/2] lib: Add CLEANUP_FREE macro which automatically calls 'free' when leaving scope.
From: "Richard W.M. Jones" <rjones@redhat.com> Use the macro like this to create temporary variables which are automatically cleaned up when the scope is exited: { CLEANUP_FREE (char *, foo, strdup (bar)); /* char *foo = strdup (bar) */ ... // no need to call free (foo)! } On GCC and LLVM, this is implemented using __attribute__((cleanup(...))). On other
2002 Jul 11
1
help with porting patch from 1.62 to 1.75
...video cli ; Point of no return @@ -4162,6 +4164,91 @@ linear_color db 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0 UsingVGA db 0 +; +; Check for magic "swap" kernel -- wingel +; +check_for_swap: + mov si,swap_name + mov di,KernelName + mov cx,11 + repe cmpsb + je is_swap + ret + +is_swap: + call crlf + mov si,swap_loading + call cwritestr + + push bx + mov ax,0201h ; read disk, 1 sector + mov bx,trackbuf + mov cx,1 ; track 0, sector 1 + xor dh,dh ; head 0 + mov dl,81h ; second hard drive + int 13h + pop bx + jnc swap...
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/
2015 Jun 04
3
[PATCH] Use safe_realloc() in favor of realloc overall.
...int *partnum_ret, int *nr_partitions_ret); /* Find out if 'device' contains a filesystem. If it does, add @@ -75,8 +75,7 @@ guestfs_int_check_for_filesystem_on (guestfs_h *g, const char *mountable) mountable, vfs_type ? vfs_type : "failed to get vfs type"); if (is_swap) { - if (extend_fses (g) == -1) - return -1; + extend_fses (g); fs = &g->fses[g->nr_fses-1]; fs->mountable = safe_strdup (g, mountable); return 0; @@ -95,8 +94,7 @@ guestfs_int_check_for_filesystem_on (guestfs_h *g, const char *mountable) } if (whole_d...
2013 Feb 12
7
Remaining btrfs patches
[PATCH 1/7] mount: Add mount_vfs_nochroot This is significantly reworked from before. umount is gone as discussed, and variable motion is minimised. [PATCH 2/7] btrfs: Update btrfs_subvolume_list to take Already provisionally ACKed. Previous comment was that cleanup could be tidier. I looked into creating a new cleanup function for fs_buf, but it isn't possible (or simple, anyway) in this
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
2017 Aug 09
0
[PATCH v12 09/11] daemon: Implement inspection of Linux and other Unix-like operating systems.
...ntf + +open Std_utils + +open Mountable +open Inspect_types +open Inspect_utils + +let rec check_for_filesystem_on mountable vfs_type = + if verbose () then + eprintf "check_for_filesystem_on: %s (%s)\n%!" + (Mountable.to_string mountable) vfs_type; + + let role = + let is_swap = vfs_type = "swap" in + if is_swap then + Some RoleSwap + else ( + (* Try mounting the device. Ignore errors if we can't do this. *) + let mounted = + if vfs_type = "ufs" then ( (* Hack for the *BSDs. *) + (* FreeBSD fs is a variant of...
2017 Jul 31
0
[PATCH v11 08/10] daemon: Implement inspection of Linux and other Unix-like operating systems.
...ntf + +open Std_utils + +open Mountable +open Inspect_types +open Inspect_utils + +let rec check_for_filesystem_on mountable vfs_type = + if verbose () then + eprintf "check_for_filesystem_on: %s (%s)\n%!" + (Mountable.to_string mountable) vfs_type; + + let role = + let is_swap = vfs_type = "swap" in + if is_swap then + Some RoleSwap + else ( + (* Try mounting the device. Ignore errors if we can't do this. *) + let mounted = + if vfs_type = "ufs" then ( (* Hack for the *BSDs. *) + (* FreeBSD fs is a variant of...
2017 Jun 12
1
[PATCH] UNFINISHED daemon: Reimplement most inspection APIs in the daemon.
This is the (incomplete) patch which reimplements inspection APIs in the daemon. All ‘XXX’s in this patch indicate areas which are not yet implemented or need further work. Rich.
2017 Jul 21
10
[PATCH v10 00/10] Reimplement inspection in the daemon.
v9 was here: https://www.redhat.com/archives/libguestfs/2017-July/msg00139.html This depends on these three series (the first two being single minor patches): https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html https://www.redhat.com/archives/libguestfs/2017-July/msg00215.html There is no substantive change. I
2017 Jul 17
12
[PATCH v9 00/11] Reimplement inspection in the daemon.
This depends on the patch series "[PATCH 00/27] Reimplement many daemon APIs in OCaml." (https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html) v8 was posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00274.html v9: - I split up the mega-patch into a more reviewable series of smaller, incremental patches. There are some other changes vs v8, but
2017 Aug 09
16
[PATCH v12 00/11] Reimplement inspection in the daemon.
This fixes almost everything. Note that it adds an extra commit which fixes the whole utf8/iconv business. It's probably better to list what isn't fixed: (1) I didn't leave the osinfo code around because I'm still haven't looked too closely at virt-builder-repository. Can't we just fetch this code from the git history when we need it? (2) I didn't change the way
2017 Jul 31
16
[PATCH v11 00/10] Reimplement inspection in the daemon.
v10: https://www.redhat.com/archives/libguestfs/2017-July/msg00245.html No actual change here, but I rebased and retested. Also this series now does not depend on any other patch series since everything else needed is upstream. Rich.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...($file =~ /ext4 filesystem data/) { - $r{fstype} = "ext4"; - $r{fsos} = "linux"; + $r{fstype} = "ext4"; + $r{fsos} = "linux"; } elsif ($file =~ m{Linux/i386 swap file}) { - $r{fstype} = "swap"; - $r{fsos} = "linux"; - $r{is_swap} = 1; + $r{fstype} = "swap"; + $r{fsos} = "linux"; + $r{is_swap} = 1; } # If it's ext2/3/4, then we want the UUID and label. if (exists $r{fstype} && $r{fstype} =~ /^ext/) { - $r{uuid} = $g->get_e2uuid ($dev); - $r{label} = $g-...
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
2017 Jun 15
45
[PATCH v6 00/41] Refactor utilities, reimplement inspection in the daemon.
v5: https://www.redhat.com/archives/libguestfs/2017-June/msg00065.html Since v5, this now implements inspection almost completely for Linux and Windows guests. Rich.
2017 Jun 21
45
[PATCH v8 00/42] Refactor utilities and reimplement inspection.
v7 was: https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html https://www.redhat.com/archives/libguestfs/2017-June/msg00184.html I believe this addresses all comments received so far. Also it now passes a test where I compared about 100 disk images processed with old and new virt-inspector binaries. The output is identical in all cases except one which is caused by a bug in blkid