search for: is_device_mounted

Displaying 20 results from an estimated 20 matches for "is_device_mounted".

2016 Jun 22
1
[PATCH] ext: change e2fsck retcode processing during resize
....c b/daemon/ext2.c index 5dd67c7..95a65ae 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -192,24 +192,18 @@ do_get_e2uuid (const char *device) static int if_not_mounted_run_e2fsck (const char *device) { - CLEANUP_FREE char *err = NULL; - int r, mounted; + int r = 0, mounted; mounted = is_device_mounted (device); if (mounted == -1) return -1; if (!mounted) { - r = commandf (NULL, &err, - COMMAND_FLAG_FOLD_STDOUT_ON_STDERR, - str_e2fsck, "-fy", device, NULL); - if (r == -1) { - reply_with_error ("%s", err); - ret...
2015 Oct 22
2
[PATCH] Added btrfs support for vfs_min_size.
--- daemon/btrfs.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++ daemon/daemon.h | 1 + daemon/fs-min-size.c | 50 ++++++++++++++++++++++++++++++++++++- generator/actions.ml | 6 ++++- 4 files changed, 124 insertions(+), 2 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index ddb029d..d2d85f3 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -2190,3 +2190,72
2012 Mar 09
5
[PATCH 0/5] Fixes to resize2fs (RHBZ#755729, RHBZ#801640)
https://bugzilla.redhat.com/show_bug.cgi?id=755729 This bug reports that the error message printed by the resize2fs API calls (which comes directly from the resize2fs command) says: Please run 'e2fsck -f /dev/vda1' first. That command is not possible from guestfish (where it would be 'e2fsck-f' or 'e2fsck ... forceall:true'). Fixing that bug caused this bug:
2017 Jul 14
0
[PATCH 09/27] daemon: Reimplement ‘mount’, ‘mount_ro’, ‘mount_options’, ‘mount_vfs’ APIs in OCaml.
...e_t *mountable, - const char *mp, const char *user_mp); - /* Growable strings buffer. */ struct stringsbuf { char **argv; diff --git a/daemon/mount.c b/daemon/mount.c index 0ad9626a7..962b86079 100644 --- a/daemon/mount.c +++ b/daemon/mount.c @@ -111,105 +111,6 @@ is_device_mounted (const char *device) return 0; } -/* The "simple mount" call offers no complex options, you can just - * mount a device on a mountpoint. The variations like mount_ro, - * mount_options and mount_vfs let you set progressively more things. - * - * It's tempting to try a direct mo...
2017 May 04
4
[PATCH 0/3] generator: Allow returned strings to be annotated as devices.
If we want to permit more than 255 drives to be added, then we will have to add the disks to the same virtio-scsi target using different unit (LUN) numbers. Unfortunately SCSI LUN enumeration in the Linux is not deterministic (eg. two disks with target=0, lun=[0,1] can be enumerated as /dev/sda or /dev/sdb randomly). Dealing with that will require some very complex device name translation on the
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but don't update apis which must return mountables. Matt
2012 Aug 30
1
[PATCH] collect list of called external commands
...{ reply_with_error ("%s", err); free (err); @@ -192,9 +198,8 @@ if_not_mounted_run_e2fsck (const char *device) { char *err; int r, mounted; - char prog[] = "e2fsck"; - if (e2prog (prog) == -1) + if (e2prog (str_e2fsck) == -1) return -1; mounted = is_device_mounted (device); @@ -202,7 +207,7 @@ if_not_mounted_run_e2fsck (const char *device) return -1; if (!mounted) { - r = command (NULL, &err, prog, "-fy", device, NULL); + r = command (NULL, &err, str_e2fsck, "-fy", device, NULL); if (r == -1) { reply_wi...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...m\n", "/proc/mounts"); - exit (EXIT_FAILURE); - } + if (fp == NULL) + error (EXIT_FAILURE, errno, "setmntent: %s", "/proc/mounts"); while ((m = getmntent (fp)) != NULL) { /* Allow a mount directory like "/sysroot". */ @@ -91,10 +91,8 @@ is_device_mounted (const char *device) * that requires custom parsing code. */ fp = setmntent ("/proc/mounts", "r"); - if (fp == NULL) { - fprintf (stderr, "setmntent: %s: %m\n", "/proc/mounts"); - exit (EXIT_FAILURE); - } + if (fp == NULL) + error (EXIT...
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option ‘./guestfsd --print-external-commands’
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.
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
This type is initially identical to Device. --- generator/bindtests.ml | 2 +- generator/c.ml | 7 +++++-- generator/csharp.ml | 6 ++++-- generator/daemon.ml | 4 ++-- generator/erlang.ml | 6 +++--- generator/fish.ml | 8 ++++---- generator/gobject.ml | 11 ++++++----- generator/haskell.ml | 11 +++++++---- generator/java.ml | 10 +++++-----
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
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did: if (something_bad) { perror (...); exit (EXIT_FAILURE); } replace this with use of the error(3) function: if (something_bad) error (EXIT_FAILURE, errno, ...); The error(3) function is supplied by glibc, or by gnulib on platforms which don't have it, and is much more flexible than perror(3). Since we already use error(3), there seems to be
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 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
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