search for: is_dir

Displaying 20 results from an estimated 161 matches for "is_dir".

2019 Jul 10
2
Scope of classes in CFE 3.10.2 on CentOS 7
..."ws-2.example.com", "webserver.example.com", }; methods: any:: "scope_of_class_b1" usebundle => scope_of_class_b1( $(scope_of_class.web_servers) ); } bundle agent scope_of_class_b1( server ) { classes: any:: "is_dir" expression => isdir( "/tmp/scope_of_class/$(server)" ), scope => "bundle"; reports: is_dir:: "is_dir is SET"; !is_dir:: "is_dir is UNset"; any:: "server = $(server)"; } ----END--...
2011 Dec 07
2
failure converting Linux ESX guest to KVM hypervisor
..."/" libguestfs: trace: mount_ro "/dev/sda3" "/" libguestfs: trace: mount_ro = 0 libguestfs: trace: is_file "/grub/menu.lst" libguestfs: trace: is_file = 0 libguestfs: trace: is_file "/grub/grub.conf" libguestfs: trace: is_file = 0 libguestfs: trace: is_dir "/etc" libguestfs: trace: is_dir = 1 libguestfs: trace: is_dir "/bin" libguestfs: trace: is_dir = 1 libguestfs: trace: is_file "/etc/fstab" libguestfs: trace: is_file = 1 libguestfs: trace: exists "/etc/redhat-release" libguestfs: trace: exists = 1 libguestfs...
2014 Oct 31
4
[PATCH] fish: fix dir completion on filesystems w/o dirent.d_type (RHBZ#1153844).
...index f224106..df1ec00 100644 --- a/fish/destpaths.c +++ b/fish/destpaths.c @@ -191,7 +191,13 @@ complete_dest_paths_generator (const char *text, int state) else { words = w; words[nr_words].name = p; - words[nr_words].is_dir = dirents->val[i].ftyp == 'd'; + if (dirents->val[i].ftyp == 'u' + || dirents->val[i].ftyp == '?') { + int is_dir = guestfs_is_dir_opts (g, words[nr_words].name, + GUESTFS_IS_DIR_O...
2017 Mar 13
2
virt-customize fail to inject firstboot script when running it from script.
...: part_list "/dev/sda" libguestfs: trace: part_list = <struct guestfs_partition_list(2) = [0]{part_num: 1, part_start: 1048576, part_end: 500170751, part_size: 499122176, } [1]{part_num: 2, part_start: 500170752, part_end: 10736369663, part_size: 10236198912, }> libguestfs: trace: is_dir "/etc" libguestfs: trace: is_dir = 0 libguestfs: trace: is_dir "/bin" libguestfs: trace: is_dir = 0 libguestfs: trace: is_dir "/share" libguestfs: trace: is_dir = 0 libguestfs: trace: is_file "/grub/menu.lst" libguestfs: trace: is_file = 0 libguestfs:...
2017 Mar 14
0
Re: virt-customize fail to inject firstboot script when running it from script.
...t "/dev/sda" > libguestfs: trace: part_list = <struct guestfs_partition_list(2) = [0]{part_num: 1, part_start: 1048576, part_end: 500170751, part_size: 499122176, } [1]{part_num: 2, part_start: 500170752, part_end: 10736369663, part_size: 10236198912, }> > libguestfs: trace: is_dir "/etc" > libguestfs: trace: is_dir = 0 > libguestfs: trace: is_dir "/bin" > libguestfs: trace: is_dir = 0 > libguestfs: trace: is_dir "/share" > libguestfs: trace: is_dir = 0 > libguestfs: trace: is_file "/grub/menu.lst" > libguest...
2017 Mar 14
2
Re: virt-customize fail to inject firstboot script when running it from script.
...t;/dev/sda" >> libguestfs: trace: part_list = <struct guestfs_partition_list(2) = [0]{part_num: 1, part_start: 1048576, part_end: 500170751, part_size: 499122176, } [1]{part_num: 2, part_start: 500170752, part_end: 10736369663, part_size: 10236198912, }> >> libguestfs: trace: is_dir "/etc" >> libguestfs: trace: is_dir = 0 >> libguestfs: trace: is_dir "/bin" >> libguestfs: trace: is_dir = 0 >> libguestfs: trace: is_dir "/share" >> libguestfs: trace: is_dir = 0 >> libguestfs: trace: is_file "/grub/menu.lst&qu...
2017 Jul 14
0
[PATCH 07/27] daemon: Reimplement ‘is_dir’, ‘is_file’ and ‘is_symlink’ APIs in OCaml.
...ode_t mode; - int r; - - if (!(optargs_bitmask & GUESTFS_IS_FILE_FOLLOWSYMLINKS_BITMASK)) - followsymlinks = 0; - - r = get_mode (path, &mode, followsymlinks); - if (r <= 0) return r; - return S_ISREG (mode); -} - -/* Takes optional arguments, consult optargs_bitmask. */ -int -do_is_dir (const char *path, int followsymlinks) -{ - mode_t mode; - int r; - - if (!(optargs_bitmask & GUESTFS_IS_DIR_FOLLOWSYMLINKS_BITMASK)) - followsymlinks = 0; - - r = get_mode (path, &mode, followsymlinks); - if (r <= 0) return r; - return S_ISDIR (mode); -} - -/* Takes optional ar...
2013 Jun 14
3
[PATCH 0/2] Fix inspection of Fedora guests (RHBZ#974489).
Here is a preliminary fix for this bug. I'm running the test suite on this now. Rich.
2023 Apr 05
2
[rhel-9.2 v2v PATCH 0/2] detect_kernels: deal with RHEL's kernel-core / kernel-modules-core split
https://bugzilla.redhat.com/show_bug.cgi?id=2175703 In RHEL-9.2, the "detect_kernels" function still exists in virt-v2v, not in the common submodule. Because we need to fix RHBZ#2175703 for RHEL-9.2.z as well, port of the identically named libguestfs-common patch series <http://mid.mail-archive.com/20230320115301.43051-1-lersek at redhat.com> to RHEL-9.2 virt-v2v. This port is
2014 Oct 31
0
Re: [PATCH] fish: fix dir completion on filesystems w/o dirent.d_type (RHBZ#1153844).
...--- a/fish/destpaths.c > +++ b/fish/destpaths.c > @@ -191,7 +191,13 @@ complete_dest_paths_generator (const char *text, int state) > else { > words = w; > words[nr_words].name = p; > - words[nr_words].is_dir = dirents->val[i].ftyp == 'd'; > + if (dirents->val[i].ftyp == 'u' > + || dirents->val[i].ftyp == '?') { > + int is_dir = guestfs_is_dir_opts (g, words[nr_words].name, > +...
2015 Sep 10
1
[PATCH] launch: libvirt: Better error when bridge / virbr0 doesn't exist (RHBZ#1262127).
...ble_network && check_bridge_exists (g, data->network_bridge) == -1) + goto cleanup; + /* Locate and/or build the appliance. */ TRACE0 (launch_build_libvirt_appliance_start); @@ -1988,6 +1992,49 @@ is_blk (const char *path) return S_ISBLK (statbuf.st_mode); } +static int +is_dir (const char *path) +{ + struct stat statbuf; + + if (stat (path, &statbuf) == -1) + return 0; + return S_ISDIR (statbuf.st_mode); +} + +/* Used to check the network_bridge exists, or give a useful error + * message. + */ +static int +check_bridge_exists (guestfs_h *g, const char *brname)...
2023 Mar 20
3
[libguestfs-common PATCH 0/2] detect_kernels: deal with RHEL's kernel-core / kernel-modules-core split
https://bugzilla.redhat.com/show_bug.cgi?id=2175703 Vera Wu's testing covered a backport of this series to the virt-v2v project's rhel-9.2 branch (on top of commit 86517b17be98), where the "detect_kernels" function is still unique/internal to the virt-v2v project. The backport / cherry-pick from libguestfs-common to virt-v2v cannot be automated, but it's not difficult; only
2015 Oct 05
0
Re: [PATCH 3/6] v2v:test:win: actually check the eventual layout
...k areas [ 5.9] Closing the overlay [ 6.0] Checking if the guest needs BIOS or UEFI to boot [ 6.0] Assigning disks to buses [ 6.0] Copying disk 1/1 to test-v2v-windows-conversion.d/windows-sda (raw) (100.00/100%) [ 6.2] Creating output metadata [ 6.2] Finishing off libguestfs: trace: is_dir "/Program Files/Red Hat/Firstboot" libguestfs: trace: is_dir = 1 libguestfs: trace: is_file "/Program Files/Red Hat/Firstboot/firstboot.bat" libguestfs: trace: is_file = 1 libguestfs: trace: is_dir "/Program Files/Red Hat/Firstboot/scripts" libguestfs: trace: is_dir =...
2015 May 28
3
Re: Concurrent scanning of same disk
...ysroot/ [ 2.938232] fuse init (API version 7.23) libguestfs: trace: mount_ro = 0 libguestfs: trace: part_to_partnum "/dev/sda1" guestfsd: main_loop: proc 73 (mount_ro) took 0.19 seconds guestfsd: main_loop: new request, len 0x38 libguestfs: trace: part_to_partnum = 1 libguestfs: trace: is_dir "/etc" guestfsd: main_loop: proc 293 (part_to_partnum) took 0.00 seconds guestfsd: main_loop: new request, len 0x34 guestfsd: main_loop: proc 38 (is_dir) took 0.00 seconds libguestfs: trace: is_dir = 0 libguestfs: trace: is_dir "/bin" guestfsd: main_loop: new request, len 0x34 g...
2008 Mar 19
0
[PATCH] Unsnarl missing_below/dry_run logic.
...file, int ndx, char *fnamecmp, *partialptr, *backupptr = NULL; char fnamecmpbuf[MAXPATHLEN]; uchar fnamecmp_type; - int implied_dirs_are_missing = relative_paths && !implied_dirs && protocol_version < 30; int del_opts = delete_mode || force_delete ? DEL_RECURSE : 0; int is_dir = !S_ISDIR(file->mode) ? 0 : inc_recurse && ndx != cur_flist->ndx_start - 1 ? -1 @@ -1258,22 +1268,16 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, return; } - if (missing_below >= 0) { - if (F_DEPTH(file) <= missing_below - || (im...
2009 Jul 24
1
[PATCH] Make read-only optional in mount_operating_system()
...# Have to mount / first. Luckily '/' is early in the ASCII # character set, so this should be OK. foreach (sort keys %$mounts) { - $g->mount_ro ($mounts->{$_}, $_) - if $_ ne "swap" && $_ ne "none" && ($_ eq '/' || $g->is_dir ($_)); + if($_ ne "swap" && $_ ne "none" && ($_ eq '/' || $g->is_dir ($_))) { + if($ro) { + $g->mount_ro ($mounts->{$_}, $_) + } else { + $g->mount ($mounts->{$_}, $_) +...
2015 May 27
3
Concurrent scanning of same disk
Greetings, I am suffering of several weird errors which show randomly and make me suspect some concurrency issue. Libguestfs version is 1.28.1, linux kernel 3.16, libvirt 1.2.9 and qemu 2.1. What I'm trying to do is comparing the disk state at two different point of a guest execution. Disk snapshots are taken through libvirt in different moments (I am aware of caching issue), from such
2004 Apr 09
3
include/exclude bug in rsync 2.6.0/2.6.1pre1
...apparent on noting that the 0 return code from check_exclude in the include case is now simply ignored in check_exclude_file (rather than preventing lists with lower precedence to be examined, as was the case in earlier versions): ... if (exclude_list && check_exclude(exclude_list, fname, is_dir)) return 1; if (local_exclude_list && check_exclude(local_exclude_list, fname, is_dir)) return 1; ... If you look at the equivalent section of code in 2.5.7, the behaviour is different (in the case of an included pattern, local_exclude list is not examined): if (exclude_list) {...
2015 Oct 05
3
Re: [PATCH 3/6] v2v:test:win: actually check the eventual layout
On Mon, Oct 05, 2015 at 03:40:03PM +0300, Roman Kagan wrote: > v2v/test-v2v-windows-conversion.sh used to query if the expected > directories and filed were present in the VM upon conversion; however it > would ignore the results of that query. > > That lead to the test passing even though the checks failed. Good point. Fix is kinda ugly though. How about: output=$( guestfish
2010 Jun 02
1
DO NOT REPLY [Bug 7489] New: rsyncd segfaults using daemon exclude filter
...ee(sxp->acc_acl); <<<<<<< uninitialized In version 3.0.6 the 'bad' goto is at line 1315: rprintf(FERROR_XFER, "skipping daemon-excluded %s \"%s\"\n", is_dir ? "directory" : "file", fname); if (is_dir) goto skipping_dir_contents; <<<<<<<<<<<<<<<<< bad goto The fix is to move the initialization earlier in the code: # diff -c...