search for: guestfs_readlink

Displaying 15 results from an estimated 15 matches for "guestfs_readlink".

2016 Mar 17
2
[PATCH] inspect: improve UsrMove detection (RHBZ#1186935)
...@@ -366,6 +366,22 @@ get_partition_context (guestfs_h *g, const char *partition, return 0; } +static int +is_symlink_to (guestfs_h *g, const char *file, const char *wanted_target) +{ + CLEANUP_FREE char *target = NULL; + + if (guestfs_is_symlink (g, file) == 0) + return 0; + + target = guestfs_readlink (g, file); + /* This should not fail, but play safe. */ + if (target == NULL) + return 0; + + return STREQ (target, wanted_target); +} + int guestfs_int_is_file_nocase (guestfs_h *g, const char *path) { -- 2.5.0
2016 Mar 17
0
Re: [PATCH] inspect: improve UsrMove detection (RHBZ#1186935)
...onst char *partition, > return 0; > } > > +static int > +is_symlink_to (guestfs_h *g, const char *file, const char *wanted_target) > +{ > + CLEANUP_FREE char *target = NULL; > + > + if (guestfs_is_symlink (g, file) == 0) > + return 0; > + > + target = guestfs_readlink (g, file); > + /* This should not fail, but play safe. */ > + if (target == NULL) > + return 0; > + > + return STREQ (target, wanted_target); > +} > + > int > guestfs_int_is_file_nocase (guestfs_h *g, const char *path) > { Yup, pretty good solution. ACK. Ho...
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.
2014 Sep 22
2
[PATCH] New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).
...csum = guestfs_checksum (g, checksum, path); if (!csum) exit (EXIT_FAILURE); @@ -534,7 +534,7 @@ show_file (const char *dir, const char *name, output_string (path); - if (is_lnk (stat->mode)) + if (is_lnk (stat->st_mode)) /* XXX Fix this for NTFS. */ link = guestfs_readlink (g, path); if (link) @@ -703,7 +703,7 @@ output_int64_perms (int64_t i) } static void -output_int64_time (int64_t i) +output_int64_time (int64_t secs, int64_t nsecs) { int r; @@ -713,19 +713,19 @@ output_int64_time (int64_t i) if (time_t_output) { switch (time_relative) {...
2012 Mar 28
2
[PATCH v2] New APIs: mount-local and umount-local using FUSE
This version doesn't crash or cause hung processes or stuck mountpoints, so that's an improvement. Rich.
2012 Mar 27
3
[PATCH 0/3] Enable FUSE support in the API via 'mount-local' call.
This patch is just for review. It enables FUSE support in the API via two new calls, 'guestfs_mount_local' and 'guestfs_umount_local'. FUSE turns out to be very easy to deadlock (necessitating that the machine be rebooted). Running the test from the third patch is usually an effective way to demonstrate this. However I have not yet managed to produce a simple reproducer that
2012 Mar 29
3
[PATCH v3] New APIs: mount-local, mount-local-run and umount-local using FUSE
This changes the proposed API slightly. Previously 'mount-local' generating a 'mounted' event when the filesystem was ready, and from the 'mounted' event you had to effectively do a fork. Now, 'mount-local' just initializes the mountpoint and you have to call 'mount-local-run' to enter the FUSE main loop. Between these calls you can do a fork or whatever
2017 Sep 26
5
[PATCH 0/5] Miscellaneous refactoring of common/utils, create common/mltools
Miscellaneous refactoring, but the main one is to rename mllib/ as common/mltools/ 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.
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