search for: vfs_type

Displaying 20 results from an estimated 220 matches for "vfs_type".

2014 Sep 27
2
Re: Virt-v2v conversion issue
...issue : libguestfs: trace: is_file = 0 libguestfs: trace: is_file "/freedos/freedos.ico" libguestfs: trace: is_file = 0 libguestfs: trace: is_file "/boot/loader.rc" libguestfs: trace: is_file = 0 libguestfs: trace: umount_all libguestfs: trace: umount_all = 0 libguestfs: trace: vfs_type "/dev/sda2" libguestfs: trace: vfs_type = "ntfs" libguestfs: trace: internal_parse_mountable "/dev/sda2" libguestfs: trace: internal_parse_mountable = <struct guestfs_internal_mountable *> libguestfs: trace: is_whole_device "/dev/sda2" libguestfs: trace...
2014 Sep 09
2
CoreOS support
Hello, is CoreOS supported by libguestfs? I was trying to run several commands some were successful others ended up with an error: for example virt-df was OK but when I tried to do virt-resize I got the following error message: root@ny2proxd03:/var/lib/vz/images/100# virt-resize --expand /dev/sda3 vm-100-disk-1.qcow2 vm-100-disk-1.qcow2.resized Examining vm-100-disk-1.qcow2 ... 100%
2013 Sep 06
1
答复: python-guestfs
trace: >>> g.inspect_os() libguestfs: trace: inspect_os libguestfs: trace: umount_all libguestfs: trace: umount_all = 0 libguestfs: trace: list_devices libguestfs: trace: list_devices = ["/dev/vda"] libguestfs: trace: vfs_type "/dev/vda" libguestfs: trace: vfs_type = "" libguestfs: trace: mount_ro "/dev/vda" "/" libguestfs: trace: mount_ro = -1 (error) libguestfs: trace: list_partitions libguestfs: trace: list_partitions = ["/dev/vda1", "/dev/vda2"] libguestfs:...
2015 Jul 02
1
[PATCH v6] New API: set_uuid_random
...5238f3e..20eabe3 100644 --- a/daemon/uuids.c +++ b/daemon/uuids.c @@ -85,3 +85,35 @@ do_set_uuid (const char *device, const char *uuid) return r; } + +int +do_set_uuid_random (const char *device) +{ + int r; + + /* How we set the UUID depends on the filesystem type. */ + CLEANUP_FREE char *vfs_type = get_blkid_tag (device, "TYPE"); + if (vfs_type == NULL) + return -1; + + CLEANUP_FREE char *uuid_random = get_random_uuid (); + if (uuid_random == NULL) + return -1; + + if (fstype_is_extfs (vfs_type)) + r = ext_set_uuid_random (device); + + else if (STREQ (vfs_type, &quot...
2015 Jun 26
0
[PATCH v3.1 9/9] New API: set_uuid_random
...5238f3e..4530491 100644 --- a/daemon/uuids.c +++ b/daemon/uuids.c @@ -85,3 +85,34 @@ do_set_uuid (const char *device, const char *uuid) return r; } + +int +do_set_uuid_random (const char *device) +{ + int r; + + /* How we set the UUID depends on the filesystem type. */ + CLEANUP_FREE char *vfs_type = get_blkid_tag (device, "TYPE"); + if (vfs_type == NULL) + return -1; + + if (fstype_is_extfs (vfs_type)) + r = set_e2uuid_random (device); + + else if (STREQ (vfs_type, "xfs")) + r = xfs_set_uuid_random (device); + + else if (STREQ (vfs_type, "swap")) +...
2015 Jun 30
0
[PATCH v4 7/7] New API: set_uuid_random
...5238f3e..cd5787f 100644 --- a/daemon/uuids.c +++ b/daemon/uuids.c @@ -85,3 +85,34 @@ do_set_uuid (const char *device, const char *uuid) return r; } + +int +do_set_uuid_random (const char *device) +{ + int r; + + /* How we set the UUID depends on the filesystem type. */ + CLEANUP_FREE char *vfs_type = get_blkid_tag (device, "TYPE"); + if (vfs_type == NULL) + return -1; + + if (fstype_is_extfs (vfs_type)) + r = set_e2uuid_random (device); + + else if (STREQ (vfs_type, "xfs")) + r = xfs_set_uuid_random (device); + + else if (STREQ (vfs_type, "swap")) +...
2020 Jan 22
3
[PATCH 1/1] sparsify: support LUKS-encrypted partitions
...* vfs-type to check for filesystems on devices. Some block devices cannot @@ -30,6 +31,7 @@ let rec list_filesystems () = (* Devices. *) let devices = Devsparts.list_devices () in + let devices = List.filter is_not_partitioned_device devices in let ret = List.filter_map check_with_vfs_type devices in @@ -144,9 +146,20 @@ and check_with_vfs_type device = else if String.is_suffix vfs_type "_member" then None - (* Ignore LUKS-encrypted partitions. These are also containers, as above. *) - else if vfs_type = "crypto_LUKS" then - None + (* If a LUKS-...
2013 Feb 07
2
[PATCH 1/2] Fix bogus partition number passed to guestfs___check_for_filesystem_on
...esystem. If it does, add * 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_e...
2015 Jul 01
5
[PATCH v5 0/3] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - Introduce set_uuid_random - uuids.c did a lot of deplicated work for changing uuid of fs. Use existing functions. v5: use NOT_SUPPORTED macro improve testcases v4: introduce get_random_uuid improve testcases squash internal API patches v3.1: fix typos v3: set errno
2017 Jul 14
0
[PATCH 19/27] daemon: Reimplement ‘list_filesystems’ API in the daemon, in OCaml.
...y using part-to-dev. + *) + let devices = List.fold_left ( + fun devices part -> + let d = Devsparts.part_to_dev part in + List.filter ((<>) d) devices + ) devices partitions in + + (* Use vfs-type to check for filesystems on devices. *) + let ret = filter_map check_with_vfs_type devices in + + (* Use vfs-type to check for filesystems on partitions, but + * ignore MBR partition type 42 used by LDM. + *) + let ret = + ret @ + filter_map ( + fun part -> + if not has_ldm || not (is_mbr_partition_type_42 part) then + check_with_vfs_ty...
2014 Sep 27
0
Re: Virt-v2v conversion issue
...= 0 > libguestfs: trace: is_file "/freedos/freedos.ico" > libguestfs: trace: is_file = 0 > libguestfs: trace: is_file "/boot/loader.rc" > libguestfs: trace: is_file = 0 > libguestfs: trace: umount_all > libguestfs: trace: umount_all = 0 > libguestfs: trace: vfs_type "/dev/sda2" > libguestfs: trace: vfs_type = "ntfs" > libguestfs: trace: internal_parse_mountable "/dev/sda2" > libguestfs: trace: internal_parse_mountable = <struct guestfs_internal_mountable *> > libguestfs: trace: is_whole_device "/dev/sda2&quo...
2017 Jul 14
0
[PATCH 04/27] daemon: Reimplement ‘vfs_type’ API in OCaml.
....ml \ + mountable.ml \ chroot.ml \ + blkid.ml \ file.ml \ callbacks.ml \ daemon.ml diff --git a/daemon/blkid.c b/daemon/blkid.c index 1fe5ff93a..7757b5ad0 100644 --- a/daemon/blkid.c +++ b/daemon/blkid.c @@ -69,12 +69,6 @@ get_blkid_tag (const char *device, const char *tag) } char * -do_vfs_type (const mountable_t *mountable) -{ - return get_blkid_tag (mountable->device, "TYPE"); -} - -char * do_vfs_label (const mountable_t *mountable) { CLEANUP_FREE char *type = do_vfs_type (mountable); diff --git a/daemon/blkid.ml b/daemon/blkid.ml new file mode 100644 index 000000000....
2015 Oct 27
1
[PATCHv3] Added btrfs support to vfs_minimum_size.
...rror ("device not mounted: %s", device); + return NULL; +} + int64_t do_vfs_minimum_size (const mountable_t *mountable) { int64_t r; - /* How we set the label depends on the filesystem type. */ + /* How we get minimum size depends on the filesystem type. */ CLEANUP_FREE char *vfs_type = do_vfs_type (mountable); if (vfs_type == NULL) return -1; @@ -41,6 +66,13 @@ do_vfs_minimum_size (const mountable_t *mountable) else if (STREQ (vfs_type, "ntfs")) r = ntfs_minimum_size (mountable->device); + else if (STREQ (vfs_type, "btrfs")) { + CLEAN...
2020 Jan 21
12
[PATCH 0/1] WIP: Support LUKS-encrypted partitions
The following patch attempts to implement sparsification of LUKS-encrypted partitions. It uses lsblk to pair the underlying LUKS block device with its mapped name. Also, --allow-discards was added by default to luks_open(). There are several potential issues that I can think of: 1) If and entire device is encrypted (not just one of more partitions), the lsblk trick might not work. 2) The
2014 Nov 28
3
[PATCH 1/3] uuid: add support to change uuid of swap partition
...waplabel, "-U", uuid, device, NULL); + if (r == -1) { + reply_with_error ("%s", err); + return -1; + } + + return 0; +} + int do_set_uuid (const char *device, const char *uuid) { @@ -91,6 +107,9 @@ do_set_uuid (const char *device, const char *uuid) else if (STREQ (vfs_type, "xfs")) r = xfsuuid (device, uuid); + else if (STREQ (vfs_type, "swap")) + r = swapuuid (device, uuid); + else { reply_with_error ("don't know how to set the UUID for '%s' filesystems", vfs_type); diff --git a/sysp...
2015 Jun 26
14
[PATCH v3.1 0/9] uuid: add btrfs uuid change support and set_uuid_random
- Btrfs-progs v4.1 introduced new feature of changing uuid of btrfs partition. This patch add support of this. - Introduce set_uuid_random - uuids.c did a lot of deplicated work for changing uuid of fs. Use existing functions. v3.1: fix typos v3: set errno if feature is not available. Chen Hanxiao (9): uuid: add support to change uuid of btrfs partition uuid: use existing function of
2015 Jul 01
0
[PATCH v5 3/3] New API: set_uuid_random
...5238f3e..002f595 100644 --- a/daemon/uuids.c +++ b/daemon/uuids.c @@ -85,3 +85,35 @@ do_set_uuid (const char *device, const char *uuid) return r; } + +int +do_set_uuid_random (const char *device) +{ + int r; + + /* How we set the UUID depends on the filesystem type. */ + CLEANUP_FREE char *vfs_type = get_blkid_tag (device, "TYPE"); + if (vfs_type == NULL) + return -1; + + CLEANUP_FREE char *uuid_random = get_random_uuid (); + if (uuid_random == NULL) + return -1; + + if (fstype_is_extfs (vfs_type)) + r = ext_set_e2uuid_random (device); + + else if (STREQ (vfs_type, &qu...
2015 Oct 22
2
[PATCH] Added btrfs support for vfs_min_size.
...rror ("device not mounted: %s", device); + return NULL; +} + int64_t do_vfs_minimum_size (const mountable_t *mountable) { int64_t r; - /* How we set the label depends on the filesystem type. */ + /* How we get minimum size depends on the filesystem type. */ CLEANUP_FREE char *vfs_type = do_vfs_type (mountable); if (vfs_type == NULL) return -1; @@ -41,6 +82,13 @@ do_vfs_minimum_size (const mountable_t *mountable) else if (STREQ (vfs_type, "ntfs")) r = ntfs_minimum_size (mountable->device); + else if (STREQ (vfs_type, "btrfs")) { + CLEAN...
2014 Feb 11
2
[PATCH] list-filesystems: Do not segfault if guestfs_btrfs_subvolume_list returns an error (RHBZ#1064008).
...+++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/listfs.c b/src/listfs.c index 9102c55..bbdb0a2 100644 --- a/src/listfs.c +++ b/src/listfs.c @@ -39,7 +39,7 @@ */ static void remove_from_list (char **list, const char *item); -static void check_with_vfs_type (guestfs_h *g, const char *dev, struct stringsbuf *sb); +static int check_with_vfs_type (guestfs_h *g, const char *dev, struct stringsbuf *sb); static int is_mbr_partition_type_42 (guestfs_h *g, const char *partition); char ** @@ -78,17 +78,21 @@ guestfs__list_filesystems (guestfs_h *g) /*...
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