search for: dev_or_path

Displaying 20 results from an estimated 78 matches for "dev_or_path".

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
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
...diff --git a/generator/bindtests.ml b/generator/bindtests.ml index 55c39cb..0ca5af9 100644 --- a/generator/bindtests.ml +++ b/generator/bindtests.ml @@ -127,7 +127,7 @@ print_strings (guestfs_h *g, char *const *argv) List.iter ( function | Pathname n - | Device n | Dev_or_Path n + | Device n | Mountable n | Dev_or_Path n | String n | FileIn n | FileOut n diff --git a/generator/c.ml b/generator/c.ml index 518ac1b..afa81ed 100644 --- a/generator/c.ml +++ b/generator/c.ml @@ -121,7 +121,7 @@ let rec generate_prototype ?(extern = true) ?(sta...
2014 Feb 10
5
[PATCH 0/4] add GUID validation (RHBZ#1008417)
Hi, this patch serie adds a new GUID type in the generator, which would do the same as String, but also validating (just in the C output) the passed GUID string. This allows to reject invalid GUIDs before passing them to low-level tools. Pino Toscano (4): utils: add a function to validate a GUID string generator: add a GUID parameter type generator: generate code for parameter validation
2012 Jan 16
1
[PATCH] generator: Add an explicit Cancellable flag
...1, [NotInFish; NotInDocs; Cancellable], [], "internal test function - do not use", "\ @@ -2714,7 +2714,8 @@ Reread the partition table on C<device>. This uses the L<blockdev(8)> command."); - ("upload", (RErr, [FileIn "filename"; Dev_or_Path "remotefilename"], []), 66, [Progress], + ("upload", (RErr, [FileIn "filename"; Dev_or_Path "remotefilename"], []), 66, + [Progress; Cancellable], [InitScratchFS, Always, TestOutput ( (* Pick a file from cwd which isn't likely to change. *)...
2017 Aug 08
1
Re: [PATCH 3/6] daemon: Refine check for Device and Dev_or_Path parameters (RHBZ#1477623).
On Thursday, 3 August 2017 19:13:48 CEST Richard W.M. Jones wrote: > + fprintf (stderr, "mode = %o\n", statbuf.st_mode); > + if (S_ISBLK (statbuf.st_mode)) > + /* continue */; > + else if (S_ISDIR (statbuf.st_mode)) { > + fprintf (stderr, "S_ISDIR\n"); The two unconditional fprintf() look like debugging leftovers. > + fd = open (device,
2017 Aug 03
0
[PATCH 3/6] daemon: Refine check for Device and Dev_or_Path parameters (RHBZ#1477623).
For Device parameters we expect a block device name. However we were only testing for "/dev/..." and so chardevs (from the appliance) could be passed here, resulting in strange effects. This adds a function is_device_parameter which tests for a valid block device name. For Dev_or_Path parameters much the same, except we can also use the is_device_parameter function elsewhere in the daemon to distinguish if we were called with a device or path parameter. Previously we used a simple test if the path begins with "/dev/...". Reported by Mathieu Tarral. --- daemon/daemon...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...-- a/generator/GObject.ml +++ b/generator/GObject.ml @@ -77,19 +77,10 @@ let generate_gobject_proto name ?(single_line = true) pr "gint32 %s" n | Int64 n-> pr "gint64 %s" n - | String n - | Device n | Mountable n - | Pathname n - | Dev_or_Path n | Mountable_or_Path n - | OptString n - | Key n - | FileIn n - | FileOut n - | GUID n -> + | String (_, n) + | OptString n -> pr "const gchar *%s" n - | StringList n - | DeviceList n - | FilenameList n -> + | Strin...
2012 Jul 24
3
[PATCH V4 1/3] umount: add force umount and lazy umount
Add the option force and lazy for force and lazy umount. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- daemon/mount.c | 25 +++++++++++++++++++++++-- generator/generator_actions.ml | 23 ++++++++++++----------- gobject/Makefile.inc | 2 ++ po/POTFILES | 1 + 4 files changed, 38 insertions(+), 13 deletions(-) diff --git
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky for development (too easy to miss new ones) so I spent some time last week and today working on removing them. The first patch gets us down to almost no warnings with the original -Wall setting. That was by far the hardest part. Once I'd done that, I enabled nearly all of gcc's warnings via gnulib's warnings and manywarnings modules
2017 Mar 02
1
[PATCH] generator: Move some deprecated functions to actions_core_deprecated.ml.
...this case -the content cannot contain embedded ASCII NULs). - -I<NB.> Owing to a bug, writing content containing ASCII NUL -characters does I<not> work, even if the length is specified." }; - - { defaults with name = "umount"; added = (0, 0, 8); style = RErr, [Dev_or_Path "pathordevice"], [OBool "force"; OBool "lazyunmount"]; fish_alias = ["unmount"]; @@ -5479,26 +5425,6 @@ calls to associate logical volumes and volume groups. See also C<guestfs_vgpvuuids>." }; { defaults with - name = "copy_size&...
2012 Jul 23
3
[PATCH V2 1/4] mount: add a macro to resolve path or device
Add a macro STRDUP_RESOLVE_DEVICE_OR_PATH to resolve path or device. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- daemon/daemon.h | 16 ++++++++++++++++ daemon/mount.c | 13 ++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 85eec45..f7d0c75 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -336,6
2009 Nov 09
1
[PATCH libguestfs] indent with spaces, not TABs
...our New Libraries diff --git a/src/generator.ml b/src/generator.ml old mode 100755 new mode 100644 index 11322a6..3c1ff2b --- a/src/generator.ml +++ b/src/generator.ml @@ -4688,7 +4688,7 @@ and generate_xdr () = List.iter ( function | Pathname n | Device n | Dev_or_Path n | String n -> - pr " string %s<>;\n" n + pr " string %s<>;\n" n | OptString n -> pr " str *%s;\n" n | StringList n | DeviceList n -> pr " str %s<>;\n" n | Bool n -&gt...
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
...pe filename): an array of strings" | BufferIn n -> pr " (transfer none) (array length=%s_size) (element-type guint8): an array of binary data\n" n; @@ -1211,7 +1212,7 @@ guestfs_session_close (GuestfsSession *session, GError **err) | Pathname n | Dev_or_Path n | Mountable_or_Path n | OptString n | StringList n | DeviceList n | Key n | FileIn n | FileOut n - | GUID n -> + | GUID n | RelativePathnameList n -> pr "%s" n | Pointer (_, n) -> pr "%s" n d...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
...pe filename): an array of strings" | BufferIn n -> pr " (transfer none) (array length=%s_size) (element-type guint8): an array of binary data\n" n; @@ -1211,7 +1212,7 @@ guestfs_session_close (GuestfsSession *session, GError **err) | Pathname n | Dev_or_Path n | Mountable_or_Path n | OptString n | StringList n | DeviceList n | Key n | FileIn n | FileOut n - | GUID n -> + | GUID n | FilenameList n -> pr "%s" n | Pointer (_, n) -> pr "%s" n diff --gi...
2009 Aug 12
1
factorization would be nice
...-> pr " char *%s = args.%s;\n" n n; pr " ABS_PATH (%s, goto done);\n" n; | Device n -> pr " char *%s = args.%s;\n" n n; pr " RESOLVE_DEVICE (%s, goto done);" n; | Dev_or_Path n -> pr " char *%s = args.%s;\n" n n; pr " REQUIRE_ROOT_OR_RESOLVE_DEVICE (%s, goto done);" n; | String n -> pr " char *%s = args.%s;\n" n n | OptString n -> pr " %s = args.%s ? *args.%s : NU...
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change. I'll get back to that series shortly ;-) It turned into a factorization and constification exercise during which I got a taste of ocaml. Thanks to Rich Jones for help with a few snippets in generator.ml. The overall result is that many previously-manually-maintained bits from daemon/*.c functions are now hoisted into the automatically-
2017 Jul 14
0
[PATCH 07/27] daemon: Reimplement ‘is_dir’, ‘is_file’ and ‘is_symlink’ APIs in OCaml.
...pr " v = "; @@ -651,7 +652,7 @@ return_string_list (value retv) | Bool n -> pr "Val_bool (%s)" n | Int n -> pr "Val_int (%s)" n | Int64 n -> pr "caml_copy_int64 (%s)" n - | String ((PlainString|Device|Dev_or_Path), n) -> + | String ((PlainString|Device|Pathname|Dev_or_Path), n) -> pr "caml_copy_string (%s)" n | String (Mountable, n) -> pr "copy_mountable (%s)" n -- 2.13.2
2017 May 04
1
[PATCH] perl: drop %guestfs_introspection stuff
...ng, n) -> pr "[ '%s', 'string', %d ]" n i - | String (Device, n) -> pr "[ '%s', 'string(device)', %d ]" n i - | String (Mountable, n) -> pr "[ '%s', 'string(mountable)', %d ]" n i - | String (Dev_or_Path, n) -> - pr "[ '%s', 'string(dev_or_path)', %d ]" n i - | String (Mountable_or_Path, n) -> - pr "[ '%s', 'string(mountable_or_path)', %d ]" n i - | String (GUID, n) -> pr "[ '%s', 'guid...
2015 Jun 19
2
[PATCH v2 1/2] Modify the function: analyze_line, make it more flexible
Mofify the function from a fixed delimiter to a variable. So, it can be used in more APIs later. Also modified the existing callers Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> --- daemon/btrfs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 39392f7..caa28ca 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@